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;
* the static method <code>JavaModelManager.getJavaModelManager()</code>.
*/
public class JavaModelManager implements ISaveParticipant {
-
- /**
+ /**
* Unique handle onto the JavaModel
*/
final JavaModel javaModel = new JavaModel();
/**
* 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.
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.
// }
//
// // 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();
/**
* 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);
+ }
+ }