Revision 0db2412a
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/DefaultOpenHandlerBase.java | ||
---|---|---|
7 | 7 |
import org.eclipse.core.commands.ExecutionException; |
8 | 8 |
import org.eclipse.core.commands.ParameterType; |
9 | 9 |
import org.eclipse.core.commands.common.NotDefinedException; |
10 |
import org.eclipse.jface.viewers.ISelection; |
|
11 |
import org.eclipse.jface.viewers.IStructuredSelection; |
|
12 |
import org.eclipse.ui.handlers.HandlerUtil; |
|
13 | 10 |
|
14 | 11 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
12 |
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin; |
|
15 | 13 |
|
16 | 14 |
public abstract class DefaultOpenHandlerBase <T> extends AbstractHandler { |
17 | 15 |
|
... | ... | |
35 | 33 |
} |
36 | 34 |
//if not try current selection |
37 | 35 |
else{ |
38 |
ISelection selection = HandlerUtil.getCurrentSelection(event); |
|
39 |
if(selection instanceof IStructuredSelection){ |
|
40 |
open(event, (T) ((IStructuredSelection) selection).getFirstElement()); |
|
41 |
} |
|
36 |
MessagingUtils.errorDialog("Default Handler", this, "Migrate handler!!!", TaxeditorStorePlugin.PLUGIN_ID, null, false); |
|
37 |
// ISelection selection = HandlerUtil.getCurrentSelection(event); |
|
38 |
// if(selection instanceof IStructuredSelection){ |
|
39 |
// open(event, (T) ((IStructuredSelection) selection).getFirstElement()); |
|
40 |
// } |
|
42 | 41 |
} |
43 | 42 |
return null; |
44 | 43 |
} |
Also available in: Unified diff
ref #6909, #6598 migrate default open handlers