Revision 41c668f3
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/NewTaxonNodeHandlerE4.java | ||
---|---|---|
14 | 14 |
import org.eclipse.core.runtime.IStatus; |
15 | 15 |
import org.eclipse.e4.core.di.annotations.CanExecute; |
16 | 16 |
import org.eclipse.e4.core.di.annotations.Execute; |
17 |
import org.eclipse.e4.ui.model.application.MApplication; |
|
17 | 18 |
import org.eclipse.e4.ui.services.IServiceConstants; |
19 |
import org.eclipse.e4.ui.workbench.modeling.EModelService; |
|
20 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
|
18 | 21 |
import org.eclipse.jface.viewers.ITreeSelection; |
19 | 22 |
import org.eclipse.jface.viewers.TreeSelection; |
20 | 23 |
import org.eclipse.jface.wizard.WizardDialog; |
... | ... | |
33 | 36 |
public class NewTaxonNodeHandlerE4 { |
34 | 37 |
|
35 | 38 |
@Execute |
36 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell, |
|
37 |
@Named(IServiceConstants.ACTIVE_SELECTION)ITreeSelection selection) throws Exception { |
|
39 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, |
|
40 |
@Named(IServiceConstants.ACTIVE_SELECTION) ITreeSelection selection, EModelService modelService, |
|
41 |
EPartService partService, MApplication application) throws Exception { |
|
38 | 42 |
|
39 | 43 |
final NewTaxonNodeWizard wizard = new NewTaxonNodeWizard(); |
40 | 44 |
wizard.init(null, selection); |
... | ... | |
52 | 56 |
if(wizard.openEmpty()){ |
53 | 57 |
EditorUtil.openEmptyE4(wizard.getParentTreeNode().getUuid()); |
54 | 58 |
}else if(wizard.getTaxonNode() != null){ |
55 |
EditorUtil.openTaxonNodeE4(wizard.getTaxonNode().getUuid()); |
|
59 |
EditorUtil.openTaxonNodeE4(wizard.getTaxonNode().getUuid(), modelService, partService, application);
|
|
56 | 60 |
} |
57 | 61 |
} |
58 | 62 |
} |
Also available in: Unified diff
ref #6595 code refactoring