added syntax color for {} operators
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / WorkingCopyManager.java
index 38fc5c0..e0f9212 100644 (file)
@@ -15,17 +15,14 @@ package net.sourceforge.phpeclipse.phpeditor;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.jface.text.Assert;
-
-import org.eclipse.ui.IEditorInput;
-
 import net.sourceforge.phpdt.core.ICompilationUnit;
-
 import net.sourceforge.phpdt.ui.IWorkingCopyManager;
 import net.sourceforge.phpdt.ui.IWorkingCopyManagerExtension;
 
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.Assert;
+import org.eclipse.ui.IEditorInput;
+
 
 /**
  * This working copy manager works together with a given compilation unit document provider and
@@ -92,13 +89,12 @@ public class WorkingCopyManager implements IWorkingCopyManager, IWorkingCopyMana
         * @see org.eclipse.jdt.internal.ui.javaeditor.IWorkingCopyManagerExtension#setWorkingCopy(org.eclipse.ui.IEditorInput, org.eclipse.jdt.core.ICompilationUnit)
         */
        public void setWorkingCopy(IEditorInput input, ICompilationUnit workingCopy) {
-               if (fDocumentProvider.isConnected(input)) {
+               if (fDocumentProvider.getDocument(input) != null) {
                        if (fMap == null)
                                fMap= new HashMap();
                        fMap.put(input, workingCopy);
                }
        }
-       
        /*
         * @see org.eclipse.jdt.internal.ui.javaeditor.IWorkingCopyManagerExtension#removeWorkingCopy(org.eclipse.ui.IEditorInput)
         */