Revision f13a970a
Added by Patrick Plitzner almost 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/DataImportEditorContextMenu.java | ||
---|---|---|
6 | 6 |
|
7 | 7 |
import org.apache.http.client.ClientProtocolException; |
8 | 8 |
import org.apache.log4j.Logger; |
9 |
import org.eclipse.core.runtime.IProgressMonitor; |
|
10 |
import org.eclipse.core.runtime.IStatus; |
|
11 |
import org.eclipse.core.runtime.Status; |
|
12 |
import org.eclipse.core.runtime.jobs.Job; |
|
13 | 9 |
import org.eclipse.jface.action.ContributionItem; |
14 | 10 |
import org.eclipse.jface.action.IContributionItem; |
15 | 11 |
import org.eclipse.jface.viewers.ISelection; |
... | ... | |
19 | 15 |
import org.eclipse.swt.widgets.Listener; |
20 | 16 |
import org.eclipse.swt.widgets.Menu; |
21 | 17 |
import org.eclipse.swt.widgets.MenuItem; |
22 |
import org.eclipse.ui.IEditorPart; |
|
23 | 18 |
import org.eclipse.ui.IWorkbenchWindow; |
24 | 19 |
import org.eclipse.ui.PlatformUI; |
25 | 20 |
import org.eclipse.ui.actions.CompoundContributionItem; |
26 | 21 |
|
27 | 22 |
import eu.etaxonomy.cdm.api.service.IOccurrenceService; |
28 |
import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery; |
|
29 | 23 |
import eu.etaxonomy.cdm.ext.occurrence.gbif.DataSetResponse; |
30 | 24 |
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifDataSetProtocol; |
31 | 25 |
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifQueryServiceWrapper; |
... | ... | |
48 | 42 |
@Override |
49 | 43 |
public void fill(Menu menu, int index) { |
50 | 44 |
final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); |
51 |
final IEditorPart activeEditor = AbstractUtility.getActiveEditor();
|
|
45 |
final Object activeEditor = AbstractUtility.getActiveE4Editor();
|
|
52 | 46 |
final ISelection selection = window.getActivePage().getSelection(); |
53 | 47 |
if(selection instanceof StructuredSelection){ |
54 | 48 |
final StructuredSelection structuredSelection = (StructuredSelection)selection; |
Also available in: Unified diff
ref #6596 Refactored selection handling to support e3 and e4 parts