A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / WorkingCopyManager.java
index 33bd236..1f96fb2 100644 (file)
@@ -11,7 +11,6 @@
 
 package net.sourceforge.phpeclipse.phpeditor;
 
-
 import java.util.HashMap;
 import java.util.Map;
 
@@ -23,26 +22,30 @@ 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
- * additionally offers to "overwrite" the working copy provided by this document provider.
+ * This working copy manager works together with a given compilation unit
+ * document provider and additionally offers to "overwrite" the working copy
+ * provided by this document provider.
  */
-public class WorkingCopyManager implements IWorkingCopyManager, IWorkingCopyManagerExtension {
-       
+public class WorkingCopyManager implements IWorkingCopyManager,
+               IWorkingCopyManagerExtension {
+
        private ICompilationUnitDocumentProvider fDocumentProvider;
+
        private Map fMap;
+
        private boolean fIsShuttingDown;
 
        /**
         * Creates a new working copy manager that co-operates with the given
         * compilation unit document provider.
         * 
-        * @param provider the provider
+        * @param provider
+        *            the provider
         */
        public WorkingCopyManager(ICompilationUnitDocumentProvider provider) {
                Assert.isNotNull(provider);
-               fDocumentProvider= provider;
+               fDocumentProvider = provider;
        }
 
        /*
@@ -51,28 +54,28 @@ public class WorkingCopyManager implements IWorkingCopyManager, IWorkingCopyMana
        public void connect(IEditorInput input) throws CoreException {
                fDocumentProvider.connect(input);
        }
-       
+
        /*
         * @see net.sourceforge.phpdt.ui.IWorkingCopyManager#disconnect(org.eclipse.ui.IEditorInput)
         */
        public void disconnect(IEditorInput input) {
                fDocumentProvider.disconnect(input);
        }
-       
+
        /*
         * @see net.sourceforge.phpdt.ui.IWorkingCopyManager#shutdown()
         */
        public void shutdown() {
                if (!fIsShuttingDown) {
-                       fIsShuttingDown= true;
+                       fIsShuttingDown = true;
                        try {
                                if (fMap != null) {
                                        fMap.clear();
-                                       fMap= null;
+                                       fMap = null;
                                }
                                fDocumentProvider.shutdown();
                        } finally {
-                               fIsShuttingDown= false;
+                               fIsShuttingDown = false;
                        }
                }
        }
@@ -81,26 +84,29 @@ public class WorkingCopyManager implements IWorkingCopyManager, IWorkingCopyMana
         * @see net.sourceforge.phpdt.ui.IWorkingCopyManager#getWorkingCopy(org.eclipse.ui.IEditorInput)
         */
        public ICompilationUnit getWorkingCopy(IEditorInput input) {
-               ICompilationUnit unit= fMap == null ? null : (ICompilationUnit) fMap.get(input);
+               ICompilationUnit unit = fMap == null ? null : (ICompilationUnit) fMap
+                               .get(input);
                return unit != null ? unit : fDocumentProvider.getWorkingCopy(input);
        }
-       
+
        /*
-        * @see net.sourceforge.phpdt.internal.ui.javaeditor.IWorkingCopyManagerExtension#setWorkingCopy(org.eclipse.ui.IEditorInput, net.sourceforge.phpdt.core.ICompilationUnit)
+        * @see net.sourceforge.phpdt.internal.ui.javaeditor.IWorkingCopyManagerExtension#setWorkingCopy(org.eclipse.ui.IEditorInput,
+        *      net.sourceforge.phpdt.core.ICompilationUnit)
         */
        public void setWorkingCopy(IEditorInput input, ICompilationUnit workingCopy) {
                if (fDocumentProvider.getDocument(input) != null) {
                        if (fMap == null)
-                               fMap= new HashMap();
+                               fMap = new HashMap();
                        fMap.put(input, workingCopy);
                }
        }
+
        /*
         * @see net.sourceforge.phpdt.internal.ui.javaeditor.IWorkingCopyManagerExtension#removeWorkingCopy(org.eclipse.ui.IEditorInput)
         */
        public void removeWorkingCopy(IEditorInput input) {
                fMap.remove(input);
                if (fMap.isEmpty())
-                       fMap= null;
+                       fMap = null;
        }
 }