Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2016-01-22 08:31:41 +0000
committerAlexander Kurtakov2016-01-22 08:31:41 +0000
commit2d4ac8684a0567d57326a2dad7f4f600d30c9b1d (patch)
treea3567537a5adf997065e087402e0326aa87506b3
parentc01fa14197018e717a241161f9ed916e9412c839 (diff)
downloadeclipse.platform.ui.tools-2d4ac8684a0567d57326a2dad7f4f600d30c9b1d.tar.gz
eclipse.platform.ui.tools-2d4ac8684a0567d57326a2dad7f4f600d30c9b1d.tar.xz
eclipse.platform.ui.tools-2d4ac8684a0567d57326a2dad7f4f600d30c9b1d.zip
Handle o.e.e4.tools.compat. Change-Id: I30000242ac167ded234310aa91d841d031b13f4b Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java
index 785056a9..c7900e01 100644
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java
+++ b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2015 BestSolution.at and others.
+ * Copyright (c) 2010, 2016 BestSolution.at and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -41,7 +41,7 @@ public class PartHelper {
// Hack to get the MPart-Context
try {
final Class<?> clazz = Util.getBundle("org.eclipse.e4.ui.model.workbench").loadClass( //$NON-NLS-1$
- "org.eclipse.e4.ui.model.application.ui.basic.MPart"); //$NON-NLS-1$
+ "org.eclipse.e4.ui.model.application.ui.basic.MPart"); //$NON-NLS-1$
final Object instance = site.getService(clazz);
final Method m = clazz.getMethod("getContext", new Class[0]); //$NON-NLS-1$
IEclipseContext ctx = (IEclipseContext) m.invoke(instance);
@@ -85,21 +85,21 @@ public class PartHelper {
static class SelectionProviderImpl implements ISelectionProvider {
private ISelection currentSelection = StructuredSelection.EMPTY;
- private final ListenerList listeners = new ListenerList();
+ private final ListenerList<ISelectionChangedListener> listeners = new ListenerList<>();
@Override
public void setSelection(ISelection selection) {
currentSelection = selection;
final SelectionChangedEvent evt = new SelectionChangedEvent(this, selection);
- for (final Object l : listeners.getListeners()) {
- ((ISelectionChangedListener) l).selectionChanged(evt);
+ for (final ISelectionChangedListener l : listeners) {
+ l.selectionChanged(evt);
}
}
@Override
public void removeSelectionChangedListener(
- ISelectionChangedListener listener) {
+ ISelectionChangedListener listener) {
listeners.remove(listener);
}
@@ -115,11 +115,11 @@ public class PartHelper {
}
public static void disposeContextIfE3(IEclipseContext parentContext,
- IEclipseContext context) {
+ IEclipseContext context) {
// Check if running in 3.x, otherwise there was no dedicated context
// created
if (parentContext
- .get(ORG_ECLIPSE_E4_UI_WORKBENCH_I_PRESENTATION_ENGINE) == null) {
+ .get(ORG_ECLIPSE_E4_UI_WORKBENCH_I_PRESENTATION_ENGINE) == null) {
context.dispose();
context = null;
}

Back to the top