Revision 8f065066
Added by Patrick Plitzner almost 8 years ago
eu.etaxonomy.taxeditor.editor/plugin.xml | ||
---|---|---|
1011 | 1011 |
</menuContribution> |
1012 | 1012 |
<menuContribution |
1013 | 1013 |
allPopups="false" |
1014 |
locationURI="toolbar:eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView"> |
|
1015 |
<command |
|
1016 |
commandId="eu.etaxonomy.taxeditor.editor.derivative.listenToSelectionChange" |
|
1017 |
icon="icons/synced.gif" |
|
1018 |
label="Link with Taxon Editor" |
|
1019 |
style="toggle"> |
|
1020 |
<visibleWhen |
|
1021 |
checkEnabled="false"> |
|
1022 |
<reference |
|
1023 |
definitionId="isCdmStoreConnected"> |
|
1024 |
</reference> |
|
1025 |
</visibleWhen> |
|
1026 |
</command> |
|
1014 |
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=eu.etaxonomy.taxeditor.navigation.search.toolbar"> |
|
1015 |
<toolbar |
|
1016 |
id="eu.etaxonomy.taxeditor.editor.derivativeViewToolbar"> |
|
1017 |
<command |
|
1018 |
commandId="eu.etaxonomy.taxeditor.editor.derivative.listenToSelectionChange" |
|
1019 |
icon="icons/synced.gif" |
|
1020 |
label="Link with Taxon Selection" |
|
1021 |
style="toggle"> |
|
1022 |
<visibleWhen |
|
1023 |
checkEnabled="true"> |
|
1024 |
<with |
|
1025 |
variable="activePartId"> |
|
1026 |
<equals |
|
1027 |
value="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView"> |
|
1028 |
</equals> |
|
1029 |
</with> |
|
1030 |
</visibleWhen> |
|
1031 |
</command> |
|
1032 |
</toolbar> |
|
1027 | 1033 |
</menuContribution> |
1028 | 1034 |
</extension> |
1029 | 1035 |
<extension |
... | ... | |
1490 | 1496 |
<command |
1491 | 1497 |
defaultHandler="eu.etaxonomy.taxeditor.editor.view.derivate.handler.ListenToSelectionChangeHandler" |
1492 | 1498 |
id="eu.etaxonomy.taxeditor.editor.derivative.listenToSelectionChange" |
1493 |
name="Link with editor">
|
|
1499 |
name="Link with taxon selection">
|
|
1494 | 1500 |
</command> |
1495 | 1501 |
|
1496 | 1502 |
</extension> |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/searchFilter/DerivateSearchComposite.java | ||
---|---|---|
43 | 43 |
private Label lbltaxonAssignment; |
44 | 44 |
private Combo comboTaxonAssignment; |
45 | 45 |
private Label lblTitleCache; |
46 |
private Button buttonToggleLink; |
|
47 | 46 |
|
48 | 47 |
/** |
49 | 48 |
* Create the composite. |
... | ... | |
82 | 81 |
formToolkit.adapt(comboTaxonAssignment); |
83 | 82 |
formToolkit.paintBordersFor(comboTaxonAssignment); |
84 | 83 |
comboTaxonAssignment.select(ALL_SPECIMENS); |
85 |
|
|
86 |
buttonToggleLink = new Button(this, SWT.NONE); |
|
87 |
buttonToggleLink.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); |
|
88 |
buttonToggleLink.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.editor", "icons/synced.gif")); |
|
89 |
formToolkit.adapt(buttonToggleLink, true, true); |
|
84 |
new Label(this, SWT.NONE); |
|
90 | 85 |
|
91 | 86 |
lblTitleCache = new Label(this, SWT.NONE); |
92 | 87 |
lblTitleCache.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); |
... | ... | |
161 | 156 |
public Label getLbltaxonAssignment() { |
162 | 157 |
return lbltaxonAssignment; |
163 | 158 |
} |
164 |
public Button getButtonToggleLink() { |
|
165 |
return buttonToggleLink; |
|
166 |
} |
|
167 | 159 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/searchFilter/DerivateSearchCompositeController.java | ||
---|---|---|
65 | 65 |
derivateSearchComposite.getButtonSearch().addListener(SWT.Selection, this); |
66 | 66 |
derivateSearchComposite.getBtnBrowseTaxa().addListener(SWT.Selection, this); |
67 | 67 |
derivateSearchComposite.getBtnClearTaxon().addListener(SWT.Selection, this); |
68 |
derivateSearchComposite.getButtonToggleLink().addListener(SWT.Selection, this); |
|
69 | 68 |
|
70 | 69 |
} |
71 | 70 |
|
... | ... | |
146 | 145 |
derivateSearchComposite.getComboTaxonAssignment().setEnabled(true); |
147 | 146 |
derivateSearchComposite.getLbltaxonAssignment().setEnabled(true); |
148 | 147 |
} |
149 |
else if(eventSource==derivateSearchComposite.getButtonToggleLink()){ |
|
150 |
derivativeEditor.toggleListenToSelectionChange(); |
|
151 |
} |
|
152 | 148 |
} |
153 | 149 |
|
154 | 150 |
/** |
Also available in: Unified diff
Move "link with taxon selection" action to main toolbar