X-Git-Url: http://git.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 e47f5c4..64872e2 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; @@ -296,7 +297,13 @@ public class JavaCore { */ public static final String COMPILER_PB_PHP_VAR_DEPRECATED = PLUGIN_ID + ".compiler.problem.phpVarDeprecatedWarning"; //$NON-NLS-1$ - + + public static final String COMPILER_PB_PHP_KEYWORD = PLUGIN_ID + + ".compiler.problem.phpBadStyleKeywordWarning"; //$NON-NLS-1$ + + public static final String COMPILER_PB_PHP_UPPERCASE_IDENTIFIER = PLUGIN_ID + + ".compiler.problem.phpBadStyleUppercaseIdentifierWarning"; //$NON-NLS-1$ + /** * Possible configurable option ID. * @@ -1604,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. * @@ -2888,7 +2910,11 @@ public class JavaCore { preferences.setDefault(COMPILER_PB_PHP_VAR_DEPRECATED, WARNING); optionNames.add(COMPILER_PB_PHP_VAR_DEPRECATED); - + preferences.setDefault(COMPILER_PB_PHP_KEYWORD, WARNING); + optionNames.add(COMPILER_PB_PHP_KEYWORD); + preferences.setDefault(COMPILER_PB_PHP_UPPERCASE_IDENTIFIER, IGNORE); + optionNames.add(COMPILER_PB_PHP_UPPERCASE_IDENTIFIER); + preferences.setDefault(COMPILER_PB_UNREACHABLE_CODE, ERROR); optionNames.add(COMPILER_PB_UNREACHABLE_CODE);