fixed outline refresh bug
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / JavaModelManager.java
index 3410fbc..6ed2fdb 100644 (file)
@@ -52,6 +52,7 @@ import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IResourceDelta;
@@ -83,8 +84,7 @@ import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
  * the static method <code>JavaModelManager.getJavaModelManager()</code>.
  */
 public class JavaModelManager implements ISaveParticipant {    
-       /**
+       /**
         * Unique handle onto the JavaModel
         */
        final JavaModel javaModel = new JavaModel();
@@ -519,7 +519,7 @@ public class JavaModelManager implements ISaveParticipant {
        /**
         * Used to update the JavaModel for <code>IJavaElementDelta</code>s.
         */
-//     private final ModelUpdater modelUpdater =new ModelUpdater();
+       private final ModelUpdater modelUpdater =new ModelUpdater();
        /**
         * Workaround for bug 15168 circular errors not reported  
         * This is a cache of the projects before any project addition/deletion has started.
@@ -1191,6 +1191,7 @@ public class JavaModelManager implements ISaveParticipant {
                IPath workingLocation = project.getWorkingLocation(JavaCore.PLUGIN_ID);
                return workingLocation.append("state.dat").toFile(); //$NON-NLS-1$
        }
+       
        /*
         * Returns the temporary cache for newly opened elements for the current thread.
         * Creates it if not already created.
@@ -1317,8 +1318,8 @@ public class JavaModelManager implements ISaveParticipant {
 //             }
 //             
 //             // load variables and containers from preferences into cache
-//             Preferences preferences = PHPCore.getPlugin().getPluginPreferences();
-//
+//             Preferences preferences = PHPeclipsePlugin.getDefault().getPluginPreferences();
+
 //             // only get variable from preferences not set to their default
 //             String[] propertyNames = preferences.propertyNames();
 //             int variablePrefixLength = CP_VARIABLE_PREFERENCES_PREFIX.length();
@@ -1826,17 +1827,17 @@ public class JavaModelManager implements ISaveParticipant {
        /**
         * Update Java Model given some delta
         */
-//     public void updateJavaModel(IJavaElementDelta customDelta) {
-//
-//             if (customDelta == null){
-//                     for (int i = 0, length = this.javaModelDeltas.size(); i < length; i++){
-//                             IJavaElementDelta delta = (IJavaElementDelta)this.javaModelDeltas.get(i);
-//                             this.modelUpdater.processJavaDelta(delta);
-//                     }
-//             } else {
-//                     this.modelUpdater.processJavaDelta(customDelta);
-//             }
-//     }
+       public void updateJavaModel(IJavaElementDelta customDelta) {
+
+               if (customDelta == null){
+                       for (int i = 0, length = this.javaModelDeltas.size(); i < length; i++){
+                               IJavaElementDelta delta = (IJavaElementDelta)this.javaModelDeltas.get(i);
+                               this.modelUpdater.processJavaDelta(delta);
+                       }
+               } else {
+                       this.modelUpdater.processJavaDelta(customDelta);
+               }
+       }