X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.xml.sax.ui%2Fsrc%2Forg%2Fsimantics%2Fxml%2Fsax%2Fui%2Fwizard%2FInputSelectionPage.java;h=e8dce2cefe6c6cd3825b07a9327035289d0e40a6;hb=dd3b2c7ecd5f4b60734f2602b16637aa8be2a263;hp=80e0b37c3f019c2dc65af24cdb47d24282d96ca0;hpb=47791aa9453c9d90786bc8ca7de102fb3ee90f3b;p=simantics%2Finterop.git diff --git a/org.simantics.xml.sax.ui/src/org/simantics/xml/sax/ui/wizard/InputSelectionPage.java b/org.simantics.xml.sax.ui/src/org/simantics/xml/sax/ui/wizard/InputSelectionPage.java index 80e0b37..e8dce2c 100644 --- a/org.simantics.xml.sax.ui/src/org/simantics/xml/sax/ui/wizard/InputSelectionPage.java +++ b/org.simantics.xml.sax.ui/src/org/simantics/xml/sax/ui/wizard/InputSelectionPage.java @@ -3,7 +3,10 @@ package org.simantics.xml.sax.ui.wizard; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.simantics.utils.ui.widgets.DirectorySelectionWidget; import org.simantics.utils.ui.widgets.FileOrDirectorySelectionWidget; @@ -19,6 +22,10 @@ public class InputSelectionPage extends WizardPage implements FileSelectionListe private FileSelectionWidget schemaSelection; private FileSelectionWidget configurationSelection; private DirectorySelectionWidget pluginSelection; + + boolean createPGraph = true; + boolean createImporter = true; + boolean createExporter = true; @Override public void createControl(Composite parent) { @@ -39,6 +46,34 @@ public class InputSelectionPage extends WizardPage implements FileSelectionListe schemaSelection.addListener(this); pluginSelection.addListener(this); + final Button pGraphButton = new Button(composite, SWT.CHECK); + final Button importButton = new Button(composite, SWT.CHECK); + final Button exportButton = new Button(composite, SWT.CHECK); + pGraphButton.setText("Create Ontology / .pgraph file"); + importButton.setText("Create Importer"); + exportButton.setText("Create Exporter"); + pGraphButton.setSelection(createPGraph); + importButton.setSelection(createImporter); + exportButton.setSelection(createExporter); + pGraphButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + createPGraph = pGraphButton.getSelection(); + } + }); + importButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + createImporter = importButton.getSelection(); + } + }); + exportButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + createExporter = exportButton.getSelection(); + } + }); + setControl(composite); setPageComplete(false); } @@ -49,6 +84,18 @@ public class InputSelectionPage extends WizardPage implements FileSelectionListe } + public boolean isCreateExporter() { + return createExporter; + } + + public boolean isCreateImporter() { + return createImporter; + } + + public boolean isCreatePGraph() { + return createPGraph; + } + public String getSchemaFilename() { if (schemaSelection.getFilename() == null ||schemaSelection.getFilename().length == 0) return null;