Bug 505601: Adopt samples support that was removed from pde.ui

- encapsulate discouraged access
diff --git a/plugins/org.eclipse.objectteams.otdt.samples/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.objectteams.otdt.samples/.settings/org.eclipse.jdt.core.prefs
index 728cb85..14b415b 100644
--- a/plugins/org.eclipse.objectteams.otdt.samples/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.objectteams.otdt.samples/.settings/org.eclipse.jdt.core.prefs
@@ -1,9 +1,103 @@
 eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
 org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
 org.eclipse.jdt.core.compiler.source=1.7
 org.eclipse.objectteams.otdt.compiler.option.scoped_keywords=enabled
 org.eclipse.objectteams.otdt.compiler.option.weaving_scheme=OTDRE
diff --git a/plugins/org.eclipse.objectteams.otdt.samples/META-INF/MANIFEST.MF b/plugins/org.eclipse.objectteams.otdt.samples/META-INF/MANIFEST.MF
index e84a54a..a6fa7ff 100644
--- a/plugins/org.eclipse.objectteams.otdt.samples/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.objectteams.otdt.samples/META-INF/MANIFEST.MF
@@ -14,6 +14,7 @@
  org.eclipse.ui.ide;bundle-version="[3.7.0,4.0.0)",
  org.eclipse.ui.forms;bundle-version="[3.5.100,4.0.0)",
  org.eclipse.debug.ui;bundle-version="[3.7.0,4.0.0)",
+ org.eclipse.jdt.debug.ui;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.jdt.core;bundle-version="[3.10.0.v_OTDT_r230,4.0.0)",
  org.eclipse.objectteams.otdt.ui.help;bundle-version="[2.5.0,3.0.0)"
 Export-Package: org.eclipse.objectteams.otdt.internal.samples;x-internal:="true"
diff --git a/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/PDEImages.java b/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/PDEImages.java
new file mode 100644
index 0000000..6d4d7b0
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/PDEImages.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2016 GK Software AG, 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Stephan Herrmann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.objectteams.otdt.internal.samples;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.pde.internal.ui.PDELabelProvider;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.pde.internal.ui.PDEPluginImages;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Encapsulate discouraged access to images from PDE/UI via their label provider.
+ */
+@SuppressWarnings("restriction")
+public class PDEImages {
+
+	public static final ImageDescriptor DESC_NEWEXP_WIZ= PDEPluginImages.DESC_NEWEXP_WIZ;
+	public static final ImageDescriptor DESC_RUN_EXC = PDEPluginImages.DESC_RUN_EXC;
+	public static final ImageDescriptor DESC_DEBUG_EXC = PDEPluginImages.DESC_DEBUG_EXC;
+	public static final ImageDescriptor DESC_NEWEXP_TOOL = PDEPluginImages.DESC_NEWEXP_TOOL;
+
+	private PDELabelProvider provider;
+
+	public PDEImages(PDELabelProvider provider) {
+		this.provider = provider;
+	}
+
+	public static PDEImages connect(Object consumer) {
+		PDELabelProvider provider = PDEPlugin.getDefault().getLabelProvider();
+		provider.connect(consumer);
+		return new PDEImages(provider);
+	}
+
+	public void disconnect(Object consumer) {
+		provider.disconnect(consumer);
+		provider = null;
+	}
+
+	public Image get(ImageDescriptor desc) {
+		return provider.get(desc);
+	}
+}
diff --git a/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SampleEditor.java b/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SampleEditor.java
index 3127ca6..1f434bc 100644
--- a/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SampleEditor.java
+++ b/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SampleEditor.java
@@ -13,15 +13,16 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
+
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.ui.*;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.*;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.forms.events.HyperlinkAdapter;
 import org.eclipse.ui.forms.events.HyperlinkEvent;
 import org.eclipse.ui.forms.widgets.*;
@@ -34,6 +35,7 @@
 	private FormText descText;
 	private FormText instText;
 	private InputFileListener inputFileListener;
+	private PDEImages pdeImages;
 
 	class InputFileListener implements IResourceChangeListener, IResourceDeltaVisitor {
 		@Override
@@ -64,7 +66,7 @@
 	}
 
 	public SampleEditor() {
-		PDEPlugin.getDefault().getLabelProvider().connect(this);
+		pdeImages = PDEImages.connect(this);
 	}
 
 	/**
@@ -107,7 +109,7 @@
 		StringBuffer buf = new StringBuffer();
 		buf.append(Messages.SampleEditor_content);
 		instText.setText(buf.toString(), true, false);
-		final SampleRunner runner = new SampleRunner(properties.getProperty("id"));
+		final SampleRunner runner = new SampleRunner(properties.getProperty("id")); //$NON-NLS-1$
 		instText.addHyperlinkListener(new HyperlinkAdapter() {
 			@Override
 			public void linkActivated(HyperlinkEvent e) {
@@ -121,8 +123,8 @@
 				}
 			}
 		});
-		instText.setImage("run", PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_RUN_EXC)); //$NON-NLS-1$
-		instText.setImage("debug", PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_DEBUG_EXC)); //$NON-NLS-1$
+		instText.setImage("run", pdeImages.get(PDEImages.DESC_RUN_EXC)); //$NON-NLS-1$
+		instText.setImage("debug", pdeImages.get(PDEImages.DESC_DEBUG_EXC)); //$NON-NLS-1$
 		instText.setImage("help", PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK)); //$NON-NLS-1$
 	}
 
@@ -149,7 +151,7 @@
 			inputFileListener = null;
 		}
 		toolkit.dispose();
-		PDEPlugin.getDefault().getLabelProvider().disconnect(this);
+		pdeImages.disconnect(this);
 		super.dispose();
 	}
 
@@ -199,7 +201,7 @@
 		setSite(site);
 		setInput(input);
 		inputFileListener = new InputFileListener();
-		PDEPlugin.getWorkspace().addResourceChangeListener(inputFileListener);
+		ResourcesPlugin.getWorkspace().addResourceChangeListener(inputFileListener);
 	}
 
 	public void close() {
diff --git a/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SampleStandbyContent.java b/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SampleStandbyContent.java
index a4e4488..28c5164 100644
--- a/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SampleStandbyContent.java
+++ b/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SampleStandbyContent.java
@@ -18,7 +18,6 @@
 import org.eclipse.core.runtime.*;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.ui.*;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
@@ -42,6 +41,7 @@
 	private IConfigurationElement sample;
 	// cached input.
 	private String input;
+	private PDEImages pdeImages;
 
 	private static String MEMENTO_SAMPLE_ID_ATT = "sampleId"; //$NON-NLS-1$
 
@@ -49,7 +49,7 @@
 	 *
 	 */
 	public SampleStandbyContent() {
-		PDEPlugin.getDefault().getLabelProvider().connect(this);
+		this.pdeImages = PDEImages.connect(this);
 	}
 
 	@Override
@@ -82,7 +82,7 @@
 		buf.append(Messages.SampleStandbyContent_content);
 		instText.setText(buf.toString(), true, false);
 		
-		final SampleRunner runner = new SampleRunner(sample.getAttribute("id"));
+		final SampleRunner runner = new SampleRunner(sample.getAttribute("id")); //$NON-NLS-1$
 		instText.addHyperlinkListener(new HyperlinkAdapter() {
 			@Override
 			public void linkActivated(HyperlinkEvent e) {
@@ -98,10 +98,8 @@
 				}
 			}
 		});
-		instText.setImage("run", PDEPlugin.getDefault().getLabelProvider().get( //$NON-NLS-1$
-				PDEPluginImages.DESC_RUN_EXC));
-		instText.setImage("debug", PDEPlugin.getDefault().getLabelProvider() //$NON-NLS-1$
-				.get(PDEPluginImages.DESC_DEBUG_EXC));
+		instText.setImage("run", pdeImages.get( PDEImages.DESC_RUN_EXC)); //$NON-NLS-1$
+		instText.setImage("debug", pdeImages.get(PDEImages.DESC_DEBUG_EXC)); //$NON-NLS-1$
 		instText.setImage("help", PlatformUI.getWorkbench().getSharedImages() //$NON-NLS-1$
 				.getImage(ISharedImages.IMG_OBJS_INFO_TSK));
 	}
@@ -230,7 +228,7 @@
 
 	@Override
 	public void dispose() {
-		PDEPlugin.getDefault().getLabelProvider().disconnect(this);
+		pdeImages.disconnect(this);
 	}
 
 	@Override
diff --git a/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SampleWizard.java b/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SampleWizard.java
index 40900e1..0096f7b 100644
--- a/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SampleWizard.java
+++ b/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SampleWizard.java
@@ -27,7 +27,6 @@
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.objectteams.otdt.ui.help.OTHelpPlugin;
 import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.ui.*;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.*;
 import org.eclipse.ui.activities.IWorkbenchActivitySupport;
@@ -46,6 +45,7 @@
 	private boolean selectRevealEnabled = true;
 	private boolean activitiesEnabled = true;
 	private IProject[] createdProjects;
+	private PDEImages pdeImages;
 
 	private class ImportOverwriteQuery implements IOverwriteQuery {
 		@Override
@@ -72,8 +72,8 @@
 	}
 
 	public SampleWizard() {
-		PDEPlugin.getDefault().getLabelProvider().connect(this);
-		setDefaultPageImageDescriptor(PDEPluginImages.DESC_NEWEXP_WIZ);
+		pdeImages = PDEImages.connect(this);
+		setDefaultPageImageDescriptor(PDEImages.DESC_NEWEXP_WIZ);
 		samples = Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.pde.ui.samples"); //$NON-NLS-1$ //FIXME
 		namesPage = new ProjectNamesPage(this);
 		lastPage = new ReviewPage(this);
@@ -83,7 +83,7 @@
 
 	@Override
 	public void dispose() {
-		PDEPlugin.getDefault().getLabelProvider().disconnect(this);
+		pdeImages.disconnect(this);
 		super.dispose();
 	}
 
diff --git a/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SelectionPage.java b/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SelectionPage.java
index 601f4fd..50c0f66 100644
--- a/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SelectionPage.java
+++ b/plugins/org.eclipse.objectteams.otdt.samples/src/org/eclipse/objectteams/otdt/internal/samples/SelectionPage.java
@@ -14,7 +14,6 @@
 import org.eclipse.jface.viewers.*;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.parts.TablePart;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
@@ -28,9 +27,10 @@
 	private SelectionPart part;
 	private Text desc;
 	private SampleWizard wizard;
+	private PDEImages pdeImages;
 
 	@SuppressWarnings("restriction")
-	class SelectionPart extends TablePart {
+	class SelectionPart extends org.eclipse.pde.internal.ui.parts.TablePart {
 		public SelectionPart() {
 			super(new String[] {"More Info"}); //$NON-NLS-1$
 		}
@@ -68,7 +68,7 @@
 		private Image image;
 
 		public SampleLabelProvider() {
-			image = PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_NEWEXP_TOOL);
+			image = pdeImages.get(PDEImages.DESC_NEWEXP_TOOL);
 		}
 
 		@Override
@@ -92,6 +92,7 @@
 		setTitle(Messages.SelectionPage_title);
 		setDescription(Messages.SelectionPage_desc);
 		part = new SelectionPart();
+		pdeImages = PDEImages.connect(this);
 	}
 
 	@Override
@@ -114,6 +115,12 @@
 
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.SELECTION);
 	}
+	
+	@Override
+	public void dispose() {
+		pdeImages.disconnect(this);
+		super.dispose();
+	}
 
 	private void doMoreInfo() {
 		if (wizard.getSelection() != null) {