Revision 80313393
Added by Patrick Plitzner about 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/OpenReferencingObjectsViewHandler.java | ||
---|---|---|
10 | 10 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
11 | 11 |
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState; |
12 | 12 |
|
13 |
import eu.etaxonomy.taxeditor.bulkeditor.AppModelId; |
|
14 |
|
|
13 | 15 |
public class OpenReferencingObjectsViewHandler { |
14 | 16 |
|
15 | 17 |
@Execute |
16 |
public void execute(EPartService partService, @Named(IServiceConstants.ACTIVE_PART)MPart activePart) {
|
|
17 |
MPart part = partService.createPart("eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.e4.ReferencingObjectsViewE4");
|
|
18 |
public void execute(EPartService partService) { |
|
19 |
MPart part = partService.createPart(AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_BULKEDITOR_REFERENCINGOBJECTS_E4_REFERENCINGOBJECTSVIEWE4);
|
|
18 | 20 |
part = partService.showPart(part, PartState.ACTIVATE); |
19 | 21 |
} |
20 | 22 |
|
... | ... | |
23 | 25 |
@Named(IServiceConstants.ACTIVE_PART)MPart activePart, |
24 | 26 |
MHandledMenuItem menuItem) { |
25 | 27 |
boolean canExecute = false; |
26 |
MPart part = partService.findPart("eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.e4.ReferencingObjectsViewE4");
|
|
28 |
MPart part = partService.findPart(AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_BULKEDITOR_REFERENCINGOBJECTS_E4_REFERENCINGOBJECTSVIEWE4);
|
|
27 | 29 |
canExecute = !part.equals(activePart); |
28 | 30 |
menuItem.setVisible(canExecute); |
29 | 31 |
return canExecute; |
Also available in: Unified diff
fix #7009 Replace part descriptor IDs in open handler with constants