import java.util.Collection;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.NotEnabledException;
-import org.eclipse.core.commands.NotHandledException;
-import org.eclipse.core.commands.common.NotDefinedException;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
*/
@Override
public void doubleClick(DoubleClickEvent event) {
- String commandId = "eu.etaxonomy.taxeditor.navigation.command.update.editSelection";
-
- IHandlerService handlerService = (IHandlerService) AbstractUtility.getService(IHandlerService.class);
- try {
- handlerService.executeCommand(commandId, null);
- } catch (ExecutionException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (NotDefinedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (NotEnabledException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (NotHandledException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+// String commandId = "eu.etaxonomy.taxeditor.navigation.command.update.editSelection";
+//
+// IHandlerService handlerService = (IHandlerService) AbstractUtility.getService(IHandlerService.class);
+// try {
+// handlerService.executeCommand(commandId, null);
+// } catch (ExecutionException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// } catch (NotDefinedException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// } catch (NotEnabledException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// } catch (NotHandledException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// }
// if(event.getSelection() instanceof StructuredSelection){
private void createDerivedUnitBaseElementSection(RootElement parent) {
destroySections();
- //different order of sections (Specimen Details as second section and expanded)
- if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
- DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(derivedUnitGeneralDetailSection);
-
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(derivedUnitBaseDetailSection);
-
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- OriginalLabelDataSection originalLabelDataSection = formFactory.createOriginalLabelDataSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(originalLabelDataSection);
+ DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ addPart(derivedUnitGeneralDetailSection);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(taxonAssociationDetailSection);
- }
- else{
- DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(derivedUnitGeneralDetailSection);
-
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- addPart(gatheringEventDetailSection);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ addPart(derivedUnitBaseDetailSection);
- FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- addPart(fieldUnitDetailSection);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ OriginalLabelDataSection originalLabelDataSection = formFactory.createOriginalLabelDataSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ addPart(originalLabelDataSection);
- DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- addPart(derivedUnitBaseDetailSection);
+ if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
addPart(determinationDetailSection);
}
+ if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS)){
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ addPart(taxonAssociationDetailSection);
+ }
}