Revision 243636c2
Added by Patrick Plitzner over 8 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationCdmViewer.java | ||
---|---|---|
4 | 4 |
import java.util.Map; |
5 | 5 |
|
6 | 6 |
import org.apache.log4j.Logger; |
7 |
import org.eclipse.core.commands.ExecutionEvent; |
|
8 | 7 |
import org.eclipse.jface.wizard.WizardDialog; |
9 |
import org.eclipse.ui.handlers.HandlerUtil;
|
|
8 |
import org.eclipse.ui.PlatformUI;
|
|
10 | 9 |
|
11 | 10 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
12 | 11 |
import eu.etaxonomy.taxeditor.newWizard.NewClassificationWizard; |
... | ... | |
18 | 17 |
@SuppressWarnings("unused") |
19 | 18 |
private final Logger logger = Logger.getLogger(NavigationCdmViewer.class); |
20 | 19 |
|
21 |
/* (non-Javadoc) |
|
22 |
* @see eu.etaxonomy.taxeditor.view.ICdmViewer#show(java.lang.Object) |
|
23 |
*/ |
|
24 | 20 |
@Override |
25 |
public void show(Object input, Class<?> viewerClass, ExecutionEvent event) {
|
|
21 |
public void show(Object input, Class<?> viewerClass) { |
|
26 | 22 |
if(viewerClass.equals(NewClassificationWizard.class)){ |
27 | 23 |
if(input instanceof Classification){ |
28 | 24 |
Classification classification = (Classification)input; |
29 | 25 |
NewClassificationWizard classificationWizard = new NewClassificationWizard(); |
30 | 26 |
classificationWizard.init(null, null); |
31 | 27 |
classificationWizard.setEntity(classification); |
32 |
WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), classificationWizard);
|
|
28 |
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), classificationWizard);
|
|
33 | 29 |
dialog.open(); |
34 | 30 |
} |
35 | 31 |
} |
36 | 32 |
} |
37 | 33 |
|
38 |
/* (non-Javadoc) |
|
39 |
* @see eu.etaxonomy.taxeditor.view.ICdmViewer#getViewerClasses(java.lang.Object) |
|
40 |
*/ |
|
41 | 34 |
@Override |
42 | 35 |
public Map<Class<?>, String> getViewerClasses(Object input) { |
43 | 36 |
Map<Class<?>, String> viewerNameMap = new HashMap<Class<?>, String>(); |
Also available in: Unified diff
Refactor ICdmViewer framework
Removed unnecessary ExecutionEvent