]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sharedontology/wizard/SharedOntologyExportPage.java
Improved shared library structure dump to take more types into account
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / sharedontology / wizard / SharedOntologyExportPage.java
index 90a155231e279dce3026c0c30126df579ac28ad1..2b193094e2837dae0fa64993ca6dc36da9a7b403 100644 (file)
@@ -30,6 +30,7 @@ import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -162,16 +163,20 @@ public class SharedOntologyExportPage extends WizardPage {
         });
         String prop = System.getProperty("org.simantics.modeling.exportTgAndPgraph");
         if (prop != null || Platform.inDevelopmentMode()) {
-            Button tgAndPgraph = new Button(container, SWT.CHECK);
-            tgAndPgraph.setText("&Generate TG and Pgraph with export");
-            tgAndPgraph.setSelection(exportModel.tgAndPgraph);
-            GridDataFactory.fillDefaults().grab(true, false).span(3, 1).applyTo(tgAndPgraph);
-            tgAndPgraph.addSelectionListener(new SelectionAdapter() {
-                @Override
-                public void widgetSelected(SelectionEvent e) {
-                    exportModel.tgAndPgraph = tgAndPgraph.getSelection();
-                }
-            });
+            Button generateTg = new Button(container, SWT.CHECK);
+            generateTg.setText("&Generate transferable graph");
+            generateTg.setSelection(exportModel.writeTransferableGraph);
+            GridDataFactory.fillDefaults().grab(true, false).span(3, 1).applyTo(generateTg);
+            generateTg.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
+                exportModel.writeTransferableGraph = generateTg.getSelection();
+            }));
+            Button dumpStructure = new Button(container, SWT.CHECK);
+            dumpStructure.setText("&Dump textual shared library structure");
+            dumpStructure.setSelection(exportModel.dumpStructure);
+            GridDataFactory.fillDefaults().grab(true, false).span(3, 1).applyTo(dumpStructure);
+            dumpStructure.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
+                exportModel.dumpStructure = dumpStructure.getSelection();
+            }));
         }
 
         try {