import eu.etaxonomy.cdm.api.service.IClassificationService;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.common.ICdmBase;
+import eu.etaxonomy.cdm.model.common.ITreeNode;
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.TaxonNaturalComparator;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
}
TaxonNodeNavigatorComparator viewerComparator = new TaxonNodeNavigatorComparator(comparator);
this.getCommonViewer().setComparator(viewerComparator);
+ //this.getCommonViewer().setAutoExpandLevel(2);
setLinkingEnabled(true);
// this.getCommonViewer().addSelectionChangedListener(new ISelectionChangedListener() {
//
// closing the whole application
// should be handled by the state manager too
root = new Root(conversation);
+
return root;
}
return new EmptyRoot();
CdmApplicationState.getCurrentDataChangeService().register(this);
}
CdmStore.getLoginManager().addObserver(this);
+
+
}
/**
* @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
*/
@Override
- public List<Classification> getRootEntities() {
+ public List<ITreeNode> getRootEntities() {
if(root != null) {
return root.getParentBeans();
}
classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
true, false, 2, 1));
}
- if (outputModelExport){
- Label zipLabel = new Label(composite, SWT.NONE);
- zipLabel.setText("Create zip-File");
- Button zip = new Button(composite, SWT.CHECK);
- zip.addSelectionListener(new SelectionAdapter() {
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
- * .swt.events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- super.widgetSelected(e);
- ((CdmLightExportConfigurator)configurator).setCreateZipFile(zip.getSelection());
- }
- });
- }else {
- Label fileLabel = new Label(composite, SWT.NONE);
- fileLabel.setText("File");
- text_exportFileName = new Text(composite, SWT.BORDER);
- text_exportFileName.setText(generateFilename());
- text_exportFileName.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
- true, false));
- }
+
Label folderLabel = new Label(composite, SWT.NONE);
folderLabel.setText("Select Folder for exported files");
folderLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
true, false, 2, 1));
folderDialog = new DirectoryDialog(parent.getShell());
+ folderDialog.setFilterPath(PreferencesUtil.getPreferenceStore().getString(EXPORT_FOLDER));
text_folder = new Text(composite, SWT.BORDER);
text_folder.setEditable(false);
@Override
public void widgetSelected(SelectionEvent e) {
super.widgetSelected(e);
+
String path = folderDialog.open();
if (path != null) { // a folder was selected
text_folder.setText(path);
}
}
});
-
+ if (outputModelExport){
+ Label zipLabel = new Label(composite, SWT.NONE);
+ zipLabel.setText("Create zip-File");
+ Button zip = new Button(composite, SWT.CHECK);
+ zip.addSelectionListener(new SelectionAdapter() {
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
+ * .swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ super.widgetSelected(e);
+ ((CdmLightExportConfigurator)configurator).setCreateZipFile(zip.getSelection());
+ }
+ });
+ }else {
+ Label fileLabel = new Label(composite, SWT.NONE);
+ fileLabel.setText("File");
+ text_exportFileName = new Text(composite, SWT.BORDER);
+ text_exportFileName.setText(generateFilename());
+ text_exportFileName.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
+ true, false));
+ }
// make the composite the wizard pages control
setControl(composite);
}