]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.ui/src/org/simantics/ui/workbench/ResourceEditorInput2.java
Fixed IEditorPart reference (memory) leaks from ResourceEditorSupport
[simantics/platform.git] / bundles / org.simantics.ui / src / org / simantics / ui / workbench / ResourceEditorInput2.java
index e1ec2f52106cbbcfc4a0ae1d52157e8bf309702b..d40197722a239f9752c68547de0230d87fcdcbde 100644 (file)
@@ -56,7 +56,7 @@ import org.simantics.utils.ui.workbench.StringMemento;
 public class ResourceEditorInput2 extends PlatformObject implements IResourceEditorInput2, IPersistableElement {
 
     private final static boolean          DEBUG_EXISTS    = false;
-    private final static boolean          DEBUG_UPDATE    = false;
+    private final static boolean          DEBUG_UPDATE    = true;
 
     private static final String           NO_NAME         = ResourceEditorInput.NO_NAME;
 
@@ -345,9 +345,8 @@ public class ResourceEditorInput2 extends PlatformObject implements IResourceEdi
     /* (non-Javadoc)
      * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
      */
-    @SuppressWarnings("rawtypes")
     @Override
-    public Object getAdapter(Class adapter) {
+    public <T> T getAdapter(Class<T> adapter) {
         //System.out.println("[ResourceEditorInput] getAdapter: " + adapter.getName());
         return null;
     }
@@ -421,7 +420,7 @@ public class ResourceEditorInput2 extends PlatformObject implements IResourceEdi
             System.out.println("update(" + this + ")");
 
         try {
-            assertExists(g);
+            //assertExists(g);
 
             name = g.syncRequest(new TitleRequest(editorID, this));
             if (name == null)