X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/JavaCore.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/JavaCore.java index 9ae3318..e16da97 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/JavaCore.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/JavaCore.java @@ -26,6 +26,7 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.ISavedState; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.IWorkspaceRoot; @@ -1610,6 +1611,21 @@ public class JavaCore { } /** + * Adds the given listener for POST_CHANGE resource change events to the Java core. + * The listener is guarantied to be notified of the POST_CHANGE resource change event before + * the Java core starts processing the resource change event itself. + *

+ * Has no effect if an identical listener is already registered. + *

+ * + * @param listener the listener + * @see #removePreProcessingResourceChangedListener(IResourceChangeListener) + * @since 3.0 + */ + public static void addPreProcessingResourceChangedListener(IResourceChangeListener listener) { + JavaModelManager.getJavaModelManager().deltaState.addPreResourceChangedListener(listener); + } + /** * Configures the given marker for the given Java element. Used for markers, * which denote a Java element rather than a resource. * @@ -1883,7 +1899,7 @@ public class JavaCore { // causing some grief // Platform.run(new ISafeRunnable() { // public void handleException(Throwable exception) { - // Util.log(exception, "Exception occurred in classpath container + // ProjectPrefUtil.log(exception, "Exception occurred in classpath container // initializer: "+initializer); //$NON-NLS-1$ // } // public void run() throws Exception { @@ -2032,7 +2048,7 @@ public class JavaCore { // be causing some grief // Platform.run(new ISafeRunnable() { // public void handleException(Throwable exception) { - // Util.log(exception, "Exception occurred in classpath variable + // ProjectPrefUtil.log(exception, "Exception occurred in classpath variable // initializer: "+initializer+" while initializing variable: // "+variableName); //$NON-NLS-1$ //$NON-NLS-2$ // } @@ -2762,7 +2778,7 @@ public class JavaCore { .isExported()); case IResource.FILE: - // if (Util.isArchiveFileName(resolvedResource.getName())) { + // if (ProjectPrefUtil.isArchiveFileName(resolvedResource.getName())) { // // internal binary archive // return JavaCore.newLibraryEntry( // resolvedPath, @@ -3955,14 +3971,14 @@ public class JavaCore { // if (JavaModelManager.CP_RESOLVE_VERBOSE){ // System.out.println("CPContainer SET - setting container: // ["+containerPath+"] for projects: {" //$NON-NLS-1$ //$NON-NLS-2$ - // + (Util.toString(affectedProjects, - // new Util.Displayable(){ + // + (ProjectPrefUtil.toString(affectedProjects, + // new ProjectPrefUtil.Displayable(){ // public String displayString(Object o) { return ((IJavaProject) // o).getElementName(); } // })) // + "} with values: " //$NON-NLS-1$ - // + (Util.toString(respectiveContainers, - // new Util.Displayable(){ + // + (ProjectPrefUtil.toString(respectiveContainers, + // new ProjectPrefUtil.Displayable(){ // public String displayString(Object o) { return ((IClasspathContainer) // o).getDescription(); } // })) @@ -4315,8 +4331,8 @@ public class JavaCore { // // if (JavaModelManager.CP_RESOLVE_VERBOSE){ // System.out.println("CPVariable SET - setting variables: {" + - // Util.toString(variableNames) //$NON-NLS-1$ - // + "} with values: " + Util.toString(variablePaths)); //$NON-NLS-1$ + // ProjectPrefUtil.toString(variableNames) //$NON-NLS-1$ + // + "} with values: " + ProjectPrefUtil.toString(variablePaths)); //$NON-NLS-1$ // } // // int varLength = variableNames.length; @@ -4429,7 +4445,7 @@ public class JavaCore { // if (JavaModelManager.CP_RESOLVE_VERBOSE){ // System.out.println("CPVariable SET - updating affected project: // ["+project.getElementName()+"] due to setting variables: "+ - // Util.toString(dbgVariableNames)); //$NON-NLS-1$ //$NON-NLS-2$ + // ProjectPrefUtil.toString(dbgVariableNames)); //$NON-NLS-1$ //$NON-NLS-2$ // } // // project @@ -4449,7 +4465,7 @@ public class JavaCore { // } catch (CoreException e) { // if (JavaModelManager.CP_RESOLVE_VERBOSE){ // System.out.println("CPVariable SET - FAILED DUE TO EXCEPTION: - // "+Util.toString(dbgVariableNames)); //$NON-NLS-1$ + // "+ProjectPrefUtil.toString(dbgVariableNames)); //$NON-NLS-1$ // e.printStackTrace(); // } // if (e instanceof JavaModelException) { @@ -4498,7 +4514,7 @@ public class JavaCore { // // process deltas since last activated in indexer thread so that indexes // are up-to-date. // // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=38658 - // Job processSavedState = new Job(Util.bind("savedState.jobName")) { + // Job processSavedState = new Job(ProjectPrefUtil.bind("savedState.jobName")) { // //$NON-NLS-1$ // protected IStatus run(IProgressMonitor monitor) { // try {