Bug 414750 - DIViewPart does not handle the @PreDestroy correctly
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java
index f5ea188..c7053dd 100644
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java
+++ b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java
@@ -148,18 +148,10 @@
 
 	@Override
 	public void dispose() {
-		disposeContextIfE3((IEclipseContext) getSite().getService(
+		PartHelper.disposeContextIfE3((IEclipseContext) getSite().getService(
 				IEclipseContext.class), context);
 		super.dispose();
 	}
 
-	public static void disposeContextIfE3(IEclipseContext parentContext, IEclipseContext context) {
-		// Check if running in 3.x, otherwise there was no dedicated context
-		// created
-		if (parentContext
-				.get("org.eclipse.e4.ui.workbench.IPresentationEngine") == null) {
-			context.dispose();
-			context = null;
-		}
-	}
+	
 }