</menuContribution>
<menuContribution
allPopups="false"
- locationURI="toolbar:eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView">
- <command
- commandId="eu.etaxonomy.taxeditor.editor.derivative.listenToSelectionChange"
- icon="icons/synced.gif"
- label="Link with Taxon Editor"
- style="toggle">
- <visibleWhen
- checkEnabled="false">
- <reference
- definitionId="isCdmStoreConnected">
- </reference>
- </visibleWhen>
- </command>
+ locationURI="toolbar:org.eclipse.ui.main.toolbar?after=eu.etaxonomy.taxeditor.navigation.search.toolbar">
+ <toolbar
+ id="eu.etaxonomy.taxeditor.editor.derivativeViewToolbar">
+ <command
+ commandId="eu.etaxonomy.taxeditor.editor.derivative.listenToSelectionChange"
+ icon="icons/synced.gif"
+ label="Link with Taxon Selection"
+ style="toggle">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="activePartId">
+ <equals
+ value="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView">
+ </equals>
+ </with>
+ </visibleWhen>
+ </command>
+ </toolbar>
</menuContribution>
</extension>
<extension
<command
defaultHandler="eu.etaxonomy.taxeditor.editor.view.derivate.handler.ListenToSelectionChangeHandler"
id="eu.etaxonomy.taxeditor.editor.derivative.listenToSelectionChange"
- name="Link with editor">
+ name="Link with taxon selection">
</command>
</extension>
private Label lbltaxonAssignment;
private Combo comboTaxonAssignment;
private Label lblTitleCache;
- private Button buttonToggleLink;
/**
* Create the composite.
formToolkit.adapt(comboTaxonAssignment);
formToolkit.paintBordersFor(comboTaxonAssignment);
comboTaxonAssignment.select(ALL_SPECIMENS);
-
- buttonToggleLink = new Button(this, SWT.NONE);
- buttonToggleLink.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- buttonToggleLink.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.editor", "icons/synced.gif"));
- formToolkit.adapt(buttonToggleLink, true, true);
+ new Label(this, SWT.NONE);
lblTitleCache = new Label(this, SWT.NONE);
lblTitleCache.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
public Label getLbltaxonAssignment() {
return lbltaxonAssignment;
}
- public Button getButtonToggleLink() {
- return buttonToggleLink;
- }
}
derivateSearchComposite.getButtonSearch().addListener(SWT.Selection, this);
derivateSearchComposite.getBtnBrowseTaxa().addListener(SWT.Selection, this);
derivateSearchComposite.getBtnClearTaxon().addListener(SWT.Selection, this);
- derivateSearchComposite.getButtonToggleLink().addListener(SWT.Selection, this);
}
derivateSearchComposite.getComboTaxonAssignment().setEnabled(true);
derivateSearchComposite.getLbltaxonAssignment().setEnabled(true);
}
- else if(eventSource==derivateSearchComposite.getButtonToggleLink()){
- derivativeEditor.toggleListenToSelectionChange();
- }
}
/**