Revision 43e9ee3f
Added by Patrick Plitzner about 6 years ago
eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/bundle.properties | ||
---|---|---|
31 | 31 |
specification.label = Merge Candidate Annotation |
32 | 32 |
specification.label.0 = Merge Target Annotation |
33 | 33 |
command.name.10 = convert Person to Team |
34 |
command.label.OPEN_REFERENCING_OBJECTS_VIEW = Referencing Objects View |
|
35 |
command.name.OPEN_REFERENCING_OBJECTS_VIEW = Open Referencing Objects View |
|
36 | 34 |
command.name.OPEN_BULK_EDITOR_FOR_TAXON_NODE = Open bulk editor for taxon node |
37 | 35 |
viewCommandMapping.viewerName.REFERENCING_OBJECTS_VIEW = Referencing Objects View |
38 | 36 |
viewCommandMapping.viewerName.BULK_EDITOR = Bulk Editor |
eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/bundle_de.properties | ||
---|---|---|
31 | 31 |
specification.label = Kandidat-Annotation zusammenf?gen |
32 | 32 |
specification.label.0 = Ziel-Annotation zusammenf?gen |
33 | 33 |
command.name.10 = Person in Team umwandeln |
34 |
command.label.OPEN_REFERENCING_OBJECTS_VIEW = Referenzierende Objekte |
|
35 |
command.name.OPEN_REFERENCING_OBJECTS_VIEW = ?ffne Referenzierende Objekte |
|
36 | 34 |
command.name.OPEN_BULK_EDITOR_FOR_TAXON_NODE = ?ffne Bulk Editor f?r Taxonknoten |
37 | 35 |
viewCommandMapping.viewerName.REFERENCING_OBJECTS_VIEW = Referenzierende Objekte |
38 | 36 |
viewCommandMapping.viewerName.BULK_EDITOR = Bulk Editor |
eu.etaxonomy.taxeditor.bulkeditor/plugin.xml | ||
---|---|---|
13 | 13 |
</extension> |
14 | 14 |
<extension |
15 | 15 |
point="org.eclipse.ui.commands"> |
16 |
<command |
|
17 |
id="eu.etaxonomy.taxeditor.openReferencingObjectsView" |
|
18 |
name="%command.name.OPEN_REFERENCING_OBJECTS_VIEW"> |
|
19 |
</command> |
|
20 | 16 |
<command |
21 | 17 |
id="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity" |
22 | 18 |
name="Open bulk editor for identifiable entity"> |
eu.etaxonomy.taxeditor.editor/plugin.xml | ||
---|---|---|
435 | 435 |
</with> |
436 | 436 |
</enabledWhen> |
437 | 437 |
</handler> |
438 |
<handler |
|
439 |
class="eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsView" |
|
440 |
commandId="eu.etaxonomy.taxeditor.openReferencingObjectsView"> |
|
441 |
<activeWhen> |
|
442 |
<with |
|
443 |
variable="activePartId"> |
|
444 |
<equals |
|
445 |
value="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView"> |
|
446 |
</equals> |
|
447 |
</with> |
|
448 |
</activeWhen> |
|
449 |
</handler> |
|
450 | 438 |
<handler |
451 | 439 |
class="eu.etaxonomy.taxeditor.editor.key.polytomous.handler.RefreshNodeNumberingHandler" |
452 | 440 |
commandId="eu.etaxonomy.taxeditor.key.polytomous.command.refresh"> |
eu.etaxonomy.taxeditor.navigation/fragment.e4xmi | ||
---|---|---|
20 | 20 |
<command href="../eu.etaxonomy.taxeditor.editor/fragment.e4xmi#_j2cfsJMmEeeR4YRjNqCKeA"/> |
21 | 21 |
</handlers> |
22 | 22 |
<menus xsi:type="menu:PopupMenu" xmi:id="_XNXnkJIvEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigator.popupmenu.taxonnavigator"> |
23 |
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_CXyJoKj1Eeejedk4mZQIGw" coreExpressionId="isCdmStoreConnected"/> |
|
23 | 24 |
<children xsi:type="menu:Menu" xmi:id="_yzFmYJIvEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.menu.new" label="%menu.label"> |
24 | 25 |
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_7FKxUJIvEeeJAdt8ZUxyaw" coreExpressionId="isCdmStoreConnected"/> |
25 | 26 |
<children xsi:type="menu:HandledMenuItem" xmi:id="_wzftMJIvEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.menu.new.taxon" label="%command.label.2" command="_Nx06MJIvEeeJAdt8ZUxyaw"/> |
eu.etaxonomy.taxeditor.navigation/plugin.xml | ||
---|---|---|
80 | 80 |
</extension> |
81 | 81 |
<extension |
82 | 82 |
point="org.eclipse.ui.handlers"> |
83 |
<handler |
|
84 |
class="eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsView" |
|
85 |
commandId="eu.etaxonomy.taxeditor.openReferencingObjectsView"> |
|
86 |
<activeWhen> |
|
87 |
<with |
|
88 |
variable="activePartId"> |
|
89 |
<equals |
|
90 |
value="eu.etaxonomy.taxeditor.navigation.navigator"> |
|
91 |
</equals> |
|
92 |
</with> |
|
93 |
</activeWhen> |
|
94 |
</handler> |
|
95 | 83 |
</extension> |
96 | 84 |
<extension |
97 | 85 |
point="org.eclipse.ui.navigator.navigatorContent"> |
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle.properties | ||
---|---|---|
178 | 178 |
wizard.name.23 = Excel Distribution Data Update |
179 | 179 |
wizard.name.24 = RIS Reference |
180 | 180 |
command.label.25 = Import Preferences |
181 |
partdescriptor.label.featureTreeEditor = Feature Tree Editor |
|
181 |
partdescriptor.label.featureTreeEditor = Feature Tree Editor |
|
182 |
command.name.OPEN_REFERENCING_OBJECTS_VIEW = Open Referencing Objects View |
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle_de.properties | ||
---|---|---|
179 | 179 |
wizard.name.23 = Excel Verbreitungsdaten Update |
180 | 180 |
wizard.name.24 = RIS Referenzen |
181 | 181 |
command.label.25 = Import Pr?ferenzen |
182 |
partdescriptor.label.featureTreeEditor = Merkmalsbaum-Editor |
|
182 |
partdescriptor.label.featureTreeEditor = Merkmalsbaum-Editor |
|
183 |
command.name.OPEN_REFERENCING_OBJECTS_VIEW = ?ffne Referenzierende Objekte |
eu.etaxonomy.taxeditor.store/fragment.e4xmi | ||
---|---|---|
98 | 98 |
<elements xsi:type="commands:Command" xmi:id="_LMwG4IfSEeecZ4F2Y9Z0Og" elementId="eu.etaxonomy.taxeditor.editor.definedTerms.newKindOfTerm" commandName="New kind-of term"/> |
99 | 99 |
<elements xsi:type="commands:Command" xmi:id="_cE510JMBEeeR4YRjNqCKeA" elementId="eu.etaxonomy.taxeditor.command.openTaxonNodeWizard" commandName="%command.name.OPEN_TAXONNODE_WIZARD"/> |
100 | 100 |
<elements xsi:type="commands:Command" xmi:id="_zJ4-8JMCEeeR4YRjNqCKeA" elementId="eu.etaxonomy.taxeditor.command.openClassificationWizard" commandName="%command.name.OPEN_CLASSIFICATION_WIZARD"/> |
101 |
<elements xsi:type="commands:Command" xmi:id="_l-AGEKjzEeejedk4mZQIGw" elementId="eu.etaxonomy.taxeditor.openReferencingObjectsView" commandName="%command.name.OPEN_REFERENCING_OBJECTS_VIEW"/> |
|
101 | 102 |
</fragments> |
102 | 103 |
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_swGH0GhvEee3K4uKJljEYg" featurename="handlers" parentElementId="org.eclipse.e4.legacy.ide.application"> |
103 | 104 |
<elements xsi:type="commands:Handler" xmi:id="_rVEdIGcjEee0qLTtA2ZpVQ" elementId="eu.etaxonomy.taxeditor.featuretree.e4.handler.RemoveFeatureHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.featuretree.e4.handler.RemoveFeatureHandler" command="_fNBtQGcjEee0qLTtA2ZpVQ"/> |
104 | 105 |
<elements xsi:type="commands:Handler" xmi:id="_tyCPYIdPEeecZ4F2Y9Z0Og" elementId="eu.etaxonomy.taxeditor.editor.definedterm.e4.handler.OpenDefinedTermEditorHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.editor.definedterm.e4.handler.OpenDefinedTermEditorHandlerE4" command="_qEMrsIdPEeecZ4F2Y9Z0Og"/> |
105 | 106 |
<elements xsi:type="commands:Handler" xmi:id="_XF8ogJMBEeeR4YRjNqCKeA" elementId="eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenTaxonNodeWizardHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenTaxonNodeWizardHandlerE4" command="_cE510JMBEeeR4YRjNqCKeA"/> |
106 | 107 |
<elements xsi:type="commands:Handler" xmi:id="_8HUM8JMCEeeR4YRjNqCKeA" elementId="eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenClassificationWizardHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenClassificationWizardHandlerE4" command="_zJ4-8JMCEeeR4YRjNqCKeA"/> |
108 |
<elements xsi:type="commands:Handler" xmi:id="_fKcuoKjzEeejedk4mZQIGw" elementId="eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsViewHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsViewHandler" command="_l-AGEKjzEeejedk4mZQIGw"/> |
|
107 | 109 |
</fragments> |
108 | 110 |
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_qT4hgIfTEeecZ4F2Y9Z0Og" featurename="children" parentElementId="eu.etaxonomy.taxeditor.workbench.menu.window" positionInList="before:eu.etaxonomy.taxeditor.application.windowMenu.last"> |
109 | 111 |
<elements xsi:type="menu:Menu" xmi:id="_LT3P8IfcEeecZ4F2Y9Z0Og" elementId="eu.etaxonomy.taxeditor.store.menu.termeditor" label="Term Editor"> |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/OpenReferencingObjectsView.java | ||
---|---|---|
1 |
package eu.etaxonomy.taxeditor.handler.defaultHandler; |
|
2 |
|
|
3 |
import org.eclipse.core.commands.AbstractHandler; |
|
4 |
import org.eclipse.core.commands.ExecutionEvent; |
|
5 |
import org.eclipse.core.commands.ExecutionException; |
|
6 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
|
7 |
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState; |
|
8 |
|
|
9 |
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin; |
|
10 |
|
|
11 |
public class OpenReferencingObjectsView extends AbstractHandler { |
|
12 |
|
|
13 |
@Override |
|
14 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
|
15 |
TaxeditorStorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getService(EPartService.class).showPart( |
|
16 |
eu.etaxonomy.taxeditor.bulkeditor.AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_BULKEDITOR_REFERENCINGOBJECTS_E4_REFERENCINGOBJECTSVIEWE4, |
|
17 |
PartState.ACTIVATE); |
|
18 |
return null; |
|
19 |
} |
|
20 |
|
|
21 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/OpenReferencingObjectsViewHandler.java | ||
---|---|---|
1 |
package eu.etaxonomy.taxeditor.handler.defaultHandler; |
|
2 |
|
|
3 |
import javax.inject.Named; |
|
4 |
|
|
5 |
import org.eclipse.e4.core.di.annotations.CanExecute; |
|
6 |
import org.eclipse.e4.core.di.annotations.Execute; |
|
7 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
|
8 |
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem; |
|
9 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
10 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
|
11 |
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState; |
|
12 |
|
|
13 |
public class OpenReferencingObjectsViewHandler { |
|
14 |
|
|
15 |
@Execute |
|
16 |
public void execute(EPartService partService) { |
|
17 |
MPart part = partService.createPart("eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.e4.ReferencingObjectsViewE4"); |
|
18 |
part = partService.showPart(part, PartState.ACTIVATE); |
|
19 |
} |
|
20 |
|
|
21 |
@CanExecute |
|
22 |
public boolean canExecute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart, |
|
23 |
MPart thisPart, MHandledMenuItem menuItem){ |
|
24 |
boolean canExecute = false; |
|
25 |
System.out.println(activePart.getObject()); |
|
26 |
System.out.println(thisPart); |
|
27 |
canExecute = activePart.getObject() != thisPart.getObject(); |
|
28 |
menuItem.setVisible(canExecute); |
|
29 |
return canExecute; |
|
30 |
} |
|
31 |
|
|
32 |
} |
Also available in: Unified diff
ref #6910 Fix "Open in referencing objects view" menu visibility