Revision 843eefc4
Added by Katja Luther almost 3 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/handler/SetMergeTargetHandlerE4.java | ||
---|---|---|
18 | 18 |
import org.eclipse.jface.viewers.IStructuredSelection; |
19 | 19 |
|
20 | 20 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
21 |
import eu.etaxonomy.taxeditor.bulkeditor.e4.BulkEditorE4;
|
|
21 |
import eu.etaxonomy.taxeditor.bulkeditor.e4.BulkEditor; |
|
22 | 22 |
import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput; |
23 | 23 |
|
24 | 24 |
/** |
... | ... | |
31 | 31 |
|
32 | 32 |
@Execute |
33 | 33 |
public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart) { |
34 |
BulkEditorE4 editor = (BulkEditorE4) activePart.getObject();
|
|
34 |
BulkEditor editor = (BulkEditor) activePart.getObject();
|
|
35 | 35 |
CdmBase cdmBase = (CdmBase) editor.getSelection().getFirstElement(); |
36 | 36 |
AbstractBulkEditorInput input = editor.getEditorInput(); |
37 | 37 |
if(input.getMergeCandidates().contains(cdmBase)){ |
... | ... | |
45 | 45 |
public boolean canExecute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart, |
46 | 46 |
MHandledMenuItem menuItem) { |
47 | 47 |
boolean canExecute = false; |
48 |
BulkEditorE4 editor = (BulkEditorE4) activePart.getObject();
|
|
49 |
IStructuredSelection selection = ((BulkEditorE4)activePart.getObject()).getSelection();
|
|
48 |
BulkEditor editor = (BulkEditor) activePart.getObject();
|
|
49 |
IStructuredSelection selection = ((BulkEditor)activePart.getObject()).getSelection(); |
|
50 | 50 |
Object firstElement = selection.getFirstElement(); |
51 | 51 |
canExecute = selection.size()==1 |
52 | 52 |
&& editor.getEditorInput().isMergingEnabled() |
Also available in: Unified diff
ref #9448: remove E4 from file names - bulkeditor package