Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 56879 Details for
Bug 138599
[model][classpath] Need a way to mark a classpath variable as deprecated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Complete proposed patch
v03.txt (text/plain), 48.53 KB, created by
Frederic Fusier
on 2007-01-14 06:57:54 EST
(
hide
)
Description:
Complete proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2007-01-14 06:57:54 EST
Size:
48.53 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/plugin.xml,v >retrieving revision 1.29 >diff -u -r1.29 plugin.xml >--- plugin.xml 19 Oct 2006 02:47:24 -0000 1.29 >+++ plugin.xml 14 Jan 2007 11:36:54 -0000 >@@ -12,6 +12,16 @@ > <classpathVariableInitializer > variable="TEST_ROOT" > class="org.eclipse.jdt.core.tests.model.VariablesInitializer"/> >+ <classpathVariableInitializer >+ class="org.eclipse.jdt.core.tests.model.VariablesInitializer" >+ deprecated="Test deprecated flag" >+ variable="TEST_DEPRECATED"> >+ </classpathVariableInitializer> >+ <classpathVariableInitializer >+ class="org.eclipse.jdt.core.tests.model.VariablesInitializer" >+ readOnly="true" >+ variable="TEST_READ_ONLY"> >+ </classpathVariableInitializer> > </extension> > > <!-- Classpath container initializer --> >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/core/IJavaModelStatusConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModelStatusConstants.java,v >retrieving revision 1.37 >diff -u -r1.37 IJavaModelStatusConstants.java >--- model/org/eclipse/jdt/core/IJavaModelStatusConstants.java 10 May 2006 18:03:42 -0000 1.37 >+++ model/org/eclipse/jdt/core/IJavaModelStatusConstants.java 14 Jan 2007 11:37:01 -0000 >@@ -320,4 +320,16 @@ > * @since 3.2 > */ > public static final int UNKNOWN_JAVADOC_FORMAT = 1009; >+ /** >+ * <p>Status constant indicating that the variable is deprecated.</p> >+ * >+ * @since 3.3 >+ */ >+ public static final int DEPRECATED_VARIABLE = 1010; >+ /** >+ * <p>Status constant indicating that the variable is read-only.</p> >+ * >+ * @since 3.3 >+ */ >+ public static final int READ_ONLY_VARIABLE = 1011; > } >Index: model/org/eclipse/jdt/core/IClasspathEntry.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathEntry.java,v >retrieving revision 1.59 >diff -u -r1.59 IClasspathEntry.java >--- model/org/eclipse/jdt/core/IClasspathEntry.java 29 Sep 2006 17:13:57 -0000 1.59 >+++ model/org/eclipse/jdt/core/IClasspathEntry.java 14 Jan 2007 11:36:58 -0000 >@@ -15,7 +15,7 @@ > /** > * An entry on a Java project classpath identifying one or more package fragment > * roots. A classpath entry has a content kind (either source, >- * <code>K_SOURCE</code>, or binary, <code>K_BINARY</code>), which is inherited >+ * {@link IPackageFragmentRoot#K_SOURCE}, or binary, {@link IPackageFragmentRoot#K_BINARY}), which is inherited > * by each package fragment root and package fragment associated with the entry. > * <p> > * A classpath entry can refer to any of the following:<ul> >@@ -29,7 +29,7 @@ > * represent compilation units. All compilation units will be compiled when > * the project is built. The classpath entry must specify the > * absolute path to the root folder. Entries of this kind are >- * associated with the <code>CPE_SOURCE</code> constant. >+ * associated with the {@link #CPE_SOURCE} constant. > * Source classpath entries can carry inclusion and exclusion patterns for > * selecting which source files appear as compilation > * units and get compiled when the project is built. >@@ -40,7 +40,7 @@ > * package fragments and <code>.class</code> files. The classpath entry > * must specify the absolute path to the JAR (or root folder), and in case it refers > * to an external JAR, then there is no associated resource in the workbench. Entries >- * of this kind are associated with the <code>CPE_LIBRARY</code> constant.</li> >+ * of this kind are associated with the {@link #CPE_LIBRARY} constant.</li> > * > * <li>A required project. In this case the entry identifies another project in > * the workspace. The required project is used as a binary library when compiling >@@ -51,50 +51,50 @@ > * is performed against a required project's source code, and compilation is > * performed against a required project's last built state. The > * classpath entry must specify the absolute path to the >- * project. Entries of this kind are associated with the <code>CPE_PROJECT</code> >+ * project. Entries of this kind are associated with the {@link #CPE_PROJECT} > * constant. > * Note: referencing a required project with a classpath entry refers to the source > * code or associated <code>.class</code> files located in its output location. > * It will also automatically include any other libraries or projects that the required project's classpath > * refers to, iff the corresponding classpath entries are tagged as being exported >- * (<code>IClasspathEntry#isExported</code>). >+ * ({@link IClasspathEntry#isExported}). > * Unless exporting some classpath entries, classpaths are not chained by default - > * each project must specify its own classpath in its entirety.</li> > * > * <li> A path beginning in a classpath variable defined globally to the workspace. >- * Entries of this kind are associated with the <code>CPE_VARIABLE</code> constant. >- * Classpath variables are created using <code>JavaCore#setClasspathVariable</code>, >+ * Entries of this kind are associated with the {@link #CPE_VARIABLE} constant. >+ * Classpath variables are created using {@link JavaCore#setClasspathVariable(String, IPath, org.eclipse.core.runtime.IProgressMonitor)}, > * and gets resolved, to either a project or library entry, using >- * <code>JavaCore#getResolvedClasspathVariable</code>. >- * It is also possible to register an automatic initializer (<code>ClasspathVariableInitializer</code>), >+ * {@link JavaCore#getResolvedClasspathEntry(IClasspathEntry)}. >+ * It is also possible to register an automatic initializer ({@link ClasspathVariableInitializer}), > * which will be invoked through the extension point "org.eclipse.jdt.core.classpathVariableInitializer". > * After resolution, a classpath variable entry may either correspond to a project or a library entry. </li> > * > * <li> A named classpath container identified by its container path. > * A classpath container provides a way to indirectly reference a set of classpath entries through >- * a classpath entry of kind <code>CPE_CONTAINER</code>. Typically, a classpath container can >+ * a classpath entry of kind {@link #CPE_CONTAINER}. Typically, a classpath container can > * be used to describe a complex library composed of multiple JARs, projects or classpath variables, > * considering also that containers can be mapped differently on each project. Several projects can > * reference the same generic container path, but have each of them actually bound to a different > * container object. > * The container path is a formed by a first ID segment followed with extra segments, > * which can be used as additional hints for resolving this container reference. If no container was ever >- * recorded for this container path onto this project (using <code>setClasspathContainer</code>, >- * then a <code>ClasspathContainerInitializer</code> will be activated if any was registered for this >+ * recorded for this container path onto this project (using {@link JavaCore#setClasspathContainer}, >+ * then a {@link ClasspathContainerInitializer} will be activated if any was registered for this > * container ID onto the extension point "org.eclipse.jdt.core.classpathContainerInitializer". >- * A classpath container entry can be resolved explicitly using <code>JavaCore#getClasspathContainer</code> >+ * A classpath container entry can be resolved explicitly using {@link JavaCore#getClasspathContainer} > * and the resulting container entries can contain any non-container entry. In particular, it may contain variable > * entries, which in turn needs to be resolved before being directly used. > * <br> Also note that the container resolution APIs include an IJavaProject argument, so as to allow the same > * container path to be interpreted in different ways for different projects. </li> > * </ul> > * </p> >- * The result of <code>IJavaProject#getResolvedClasspath</code> will have all entries of type >- * <code>CPE_VARIABLE</code> and <code>CPE_CONTAINER</code> resolved to a set of >- * <code>CPE_SOURCE</code>, <code>CPE_LIBRARY</code> or <code>CPE_PROJECT</code> >+ * The result of {@link IJavaProject#getResolvedClasspath} will have all entries of type >+ * {@link #CPE_VARIABLE} and {@link #CPE_CONTAINER} resolved to a set of >+ * {@link #CPE_SOURCE}, {@link #CPE_LIBRARY} or {@link #CPE_PROJECT} > * classpath entries. > * <p> >- * Any classpath entry other than a source folder (kind <code>CPE_SOURCE</code>) can >+ * Any classpath entry other than a source folder (kind {@link #CPE_SOURCE}) can > * be marked as being exported. Exported entries are automatically contributed to > * dependent projects, along with the project's default output folder, which is > * implicitly exported, and any auxiliary output folders specified on source >@@ -102,7 +102,7 @@ > * followed by the any exported entries. > * <p> > * This interface is not intended to be implemented by clients. >- * Classpath entries can be created via methods on <code>JavaCore</code>. >+ * Classpath entries can be created via methods on {@link JavaCore}. > * </p> > * > * @see JavaCore#newLibraryEntry(org.eclipse.core.runtime.IPath, org.eclipse.core.runtime.IPath, org.eclipse.core.runtime.IPath) >@@ -170,11 +170,11 @@ > * Returns the kind of files found in the package fragments identified by this > * classpath entry. > * >- * @return <code>IPackageFragmentRoot.K_SOURCE</code> for files containing >- * source code, and <code>IPackageFragmentRoot.K_BINARY</code> for binary >+ * @return {@link IPackageFragmentRoot#K_SOURCE} for files containing >+ * source code, and {@link IPackageFragmentRoot#K_BINARY} for binary > * class files. >- * There is no specified value for an entry denoting a variable (<code>CPE_VARIABLE</code>) >- * or a classpath container (<code>CPE_CONTAINER</code>). >+ * There is no specified value for an entry denoting a variable ({@link #CPE_VARIABLE}) >+ * or a classpath container ({@link #CPE_CONTAINER}). > */ > int getContentKind(); > >@@ -183,16 +183,16 @@ > * > * @return one of: > * <ul> >- * <li><code>CPE_SOURCE</code> - this entry describes a source root in >+ * <li>{@link #CPE_SOURCE} - this entry describes a source root in > its project >- * <li><code>CPE_LIBRARY</code> - this entry describes a folder or JAR >+ * <li>{@link #CPE_LIBRARY} - this entry describes a folder or JAR > containing binaries >- * <li><code>CPE_PROJECT</code> - this entry describes another project >+ * <li>{@link #CPE_PROJECT} - this entry describes another project > * >- * <li><code>CPE_VARIABLE</code> - this entry describes a project or library >+ * <li>{@link #CPE_VARIABLE} - this entry describes a project or library > * indirectly via a classpath variable in the first segment of the path > * * >- * <li><code>CPE_CONTAINER</code> - this entry describes set of entries >+ * <li>{@link #CPE_CONTAINER} - this entry describes set of entries > * referenced indirectly via a classpath container > * </ul> > */ >@@ -344,11 +344,11 @@ > /** > * Returns the full path to the specific location where the builder writes > * <code>.class</code> files generated for this source entry >- * (entry kind <code>CPE_SOURCE</code>). >+ * (entry kind {@link #CPE_SOURCE}). > * <p> > * Source entries can optionally be associated with a specific output location. > * If none is provided, the source entry will be implicitly associated with its project >- * default output location (see <code>IJavaProject#getOutputLocation</code>). >+ * default output location (see {@link IJavaProject#getOutputLocation}). > * </p><p> > * NOTE: A specific output location cannot coincidate with another source/library entry. > * </p> >@@ -364,24 +364,24 @@ > * Returns the path of this classpath entry. > * > * The meaning of the path of a classpath entry depends on its entry kind:<ul> >- * <li>Source code in the current project (<code>CPE_SOURCE</code>) - >+ * <li>Source code in the current project ({@link #CPE_SOURCE}) - > * The path associated with this entry is the absolute path to the root folder. </li> >- * <li>A binary library in the current project (<code>CPE_LIBRARY</code>) - the path >+ * <li>A binary library in the current project ({@link #CPE_LIBRARY}) - the path > * associated with this entry is the absolute path to the JAR (or root folder), and > * in case it refers to an external JAR, then there is no associated resource in > * the workbench. >- * <li>A required project (<code>CPE_PROJECT</code>) - the path of the entry denotes the >+ * <li>A required project ({@link #CPE_PROJECT}) - the path of the entry denotes the > * path to the corresponding project resource.</li> >- * <li>A variable entry (<code>CPE_VARIABLE</code>) - the first segment of the path >+ * <li>A variable entry ({@link #CPE_VARIABLE}) - the first segment of the path > * is the name of a classpath variable. If this classpath variable > * is bound to the path <i>P</i>, the path of the corresponding classpath entry > * is computed by appending to <i>P</i> the segments of the returned > * path without the variable.</li> >- * <li> A container entry (<code>CPE_CONTAINER</code>) - the path of the entry >+ * <li> A container entry ({@link #CPE_CONTAINER}) - the path of the entry > * is the name of the classpath container, which can be bound indirectly to a set of classpath > * entries after resolution. The containerPath is a formed by a first ID segment followed with > * extra segments that can be used as additional hints for resolving this container >- * reference (also see <code>IClasspathContainer</code>). >+ * reference (also see {@link IClasspathContainer}). > * </li> > * </ul> > * >@@ -410,7 +410,7 @@ > * Returns the path within the source archive or folder where package fragments > * are located. An empty path indicates that packages are located at > * the root of the source archive or folder. Returns a non-<code>null</code> value >- * if and only if <code>getSourceAttachmentPath</code> returns >+ * if and only if {@link #getSourceAttachmentPath} returns > * a non-<code>null</code> value. > * > * @return the path within the source archive or folder, or <code>null</code> if >@@ -421,7 +421,7 @@ > /** > * Returns whether this entry is exported to dependent projects. > * Always returns <code>false</code> for source entries (kind >- * <code>CPE_SOURCE</code>), which cannot be exported. >+ * {@link #CPE_SOURCE}), which cannot be exported. > * > * @return <code>true</code> if exported, and <code>false</code> otherwise > * @since 2.0 >Index: model/org/eclipse/jdt/core/ClasspathVariableInitializer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ClasspathVariableInitializer.java,v >retrieving revision 1.12 >diff -u -r1.12 ClasspathVariableInitializer.java >--- model/org/eclipse/jdt/core/ClasspathVariableInitializer.java 10 May 2006 18:03:42 -0000 1.12 >+++ model/org/eclipse/jdt/core/ClasspathVariableInitializer.java 14 Jan 2007 11:36:58 -0000 >@@ -25,6 +25,13 @@ > */ > public abstract class ClasspathVariableInitializer { > >+ /** >+ * Initialized variable flags. >+ */ >+ int flags = 0; // default is no flag >+ final static int DEPRECATED = 0x01; >+ final static int READ_ONLY = 0x02; >+ > /** > * Creates a new classpath variable initializer. > */ >@@ -49,4 +56,26 @@ > * @see JavaCore#setClasspathVariables(String[], org.eclipse.core.runtime.IPath[], org.eclipse.core.runtime.IProgressMonitor) > */ > public abstract void initialize(String variable); >+ >+ /** >+ * Return whether the initialized variable is deprecated or not. >+ * >+ * @return <code>true</code> if the initialized variable is deprecated, >+ * <code>false</code> otherwise. >+ * @since 3.3 >+ */ >+ public final boolean isDeprecated() { >+ return (this.flags & DEPRECATED) != 0; >+ } >+ >+ /** >+ * Return whether the initialized variable is read-only or not. >+ * >+ * @return <code>true</code> if the initialized variable is read-only, >+ * <code>false</code> otherwise. >+ * @since 3.3 >+ */ >+ public final boolean isReadOnly() { >+ return (this.flags & READ_ONLY) != 0; >+ } > } >Index: model/org/eclipse/jdt/core/JavaCore.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java,v >retrieving revision 1.559 >diff -u -r1.559 JavaCore.java >--- model/org/eclipse/jdt/core/JavaCore.java 12 Jan 2007 17:58:48 -0000 1.559 >+++ model/org/eclipse/jdt/core/JavaCore.java 14 Jan 2007 11:37:19 -0000 >@@ -1617,55 +1617,7 @@ > return variablePath; > } > >- // even if persisted value exists, initializer is given priority, only if no initializer is found the persisted value is reused >- final ClasspathVariableInitializer initializer = JavaCore.getClasspathVariableInitializer(variableName); >- if (initializer != null){ >- if (JavaModelManager.CP_RESOLVE_VERBOSE){ >- Util.verbose( >- "CPVariable INIT - triggering initialization\n" + //$NON-NLS-1$ >- " variable: " + variableName + '\n' + //$NON-NLS-1$ >- " initializer: " + initializer + '\n' + //$NON-NLS-1$ >- " invocation stack trace:"); //$NON-NLS-1$ >- new Exception("<Fake exception>").printStackTrace(System.out); //$NON-NLS-1$ >- } >- manager.variablePut(variableName, JavaModelManager.VARIABLE_INITIALIZATION_IN_PROGRESS); // avoid initialization cycles >- boolean ok = false; >- try { >- // let OperationCanceledException go through >- // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=59363) >- initializer.initialize(variableName); >- >- variablePath = manager.variableGet(variableName); // initializer should have performed side-effect >- if (variablePath == JavaModelManager.VARIABLE_INITIALIZATION_IN_PROGRESS) return null; // break cycle (initializer did not init or reentering call) >- if (JavaModelManager.CP_RESOLVE_VERBOSE){ >- Util.verbose( >- "CPVariable INIT - after initialization\n" + //$NON-NLS-1$ >- " variable: " + variableName +'\n' + //$NON-NLS-1$ >- " variable path: " + variablePath); //$NON-NLS-1$ >- } >- manager.variablesWithInitializer.add(variableName); >- ok = true; >- } catch (RuntimeException e) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) { >- e.printStackTrace(); >- } >- throw e; >- } catch (Error e) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) { >- e.printStackTrace(); >- } >- throw e; >- } finally { >- if (!ok) JavaModelManager.getJavaModelManager().variablePut(variableName, null); // flush cache >- } >- } else { >- if (JavaModelManager.CP_RESOLVE_VERBOSE){ >- Util.verbose( >- "CPVariable INIT - no initializer found\n" + //$NON-NLS-1$ >- " variable: " + variableName); //$NON-NLS-1$ >- } >- } >- return variablePath; >+ return initializeClasspathVariable(variableName, variablePath); > } > > /** >@@ -1690,7 +1642,8 @@ > IConfigurationElement [] configElements = extensions[i].getConfigurationElements(); > for(int j = 0; j < configElements.length; j++){ > try { >- String varAttribute = configElements[j].getAttribute("variable"); //$NON-NLS-1$ >+ IConfigurationElement configElement = configElements[j]; >+ String varAttribute = configElement.getAttribute("variable"); //$NON-NLS-1$ > if (variable.equals(varAttribute)) { > if (JavaModelManager.CP_RESOLVE_VERBOSE) { > Util.verbose( >@@ -1700,7 +1653,16 @@ > } > Object execExt = configElements[j].createExecutableExtension("class"); //$NON-NLS-1$ > if (execExt instanceof ClasspathVariableInitializer){ >- return (ClasspathVariableInitializer)execExt; >+ ClasspathVariableInitializer initializer = (ClasspathVariableInitializer)execExt; >+ String deprecatedAttribute = configElement.getAttribute("deprecated"); //$NON-NLS-1$ >+ if (deprecatedAttribute != null) { >+ initializer.flags |= ClasspathVariableInitializer.DEPRECATED; >+ } >+ String readOnlyAttribute = configElement.getAttribute("readOnly"); //$NON-NLS-1$ >+ if (JavaModelManager.TRUE.equals(readOnlyAttribute)) { >+ initializer.flags |= ClasspathVariableInitializer.READ_ONLY; >+ } >+ return initializer; > } > } > } catch(CoreException e){ >@@ -3012,7 +2974,117 @@ > if (monitor != null) monitor.done(); > } > } >- >+ >+ /* >+ * Initialize classpath variable >+ */ >+ private static IPath initializeClasspathVariable(final String variableName, IPath variablePath) { >+ // even if persisted value exists, initializer is given priority, only if no initializer is found the persisted value is reused >+ final ClasspathVariableInitializer initializer = JavaCore.getClasspathVariableInitializer(variableName); >+ if (initializer != null){ >+ if (JavaModelManager.CP_RESOLVE_VERBOSE){ >+ Util.verbose( >+ "CPVariable INIT - triggering initialization\n" + //$NON-NLS-1$ >+ " variable: " + variableName + '\n' + //$NON-NLS-1$ >+ " initializer: " + initializer + '\n' + //$NON-NLS-1$ >+ " invocation stack trace:"); //$NON-NLS-1$ >+ new Exception("<Fake exception>").printStackTrace(System.out); //$NON-NLS-1$ >+ } >+ JavaModelManager manager = JavaModelManager.getJavaModelManager(); >+ manager.variablePut(variableName, JavaModelManager.VARIABLE_INITIALIZATION_IN_PROGRESS); // avoid initialization cycles >+ boolean ok = false; >+ try { >+ // let OperationCanceledException go through >+ // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=59363) >+ initializer.initialize(variableName); >+ >+ variablePath = manager.variableGet(variableName); // initializer should have performed side-effect >+ if (variablePath == JavaModelManager.VARIABLE_INITIALIZATION_IN_PROGRESS) return null; // break cycle (initializer did not init or reentering call) >+ if (JavaModelManager.CP_RESOLVE_VERBOSE){ >+ Util.verbose( >+ "CPVariable INIT - after initialization\n" + //$NON-NLS-1$ >+ " variable: " + variableName +'\n' + //$NON-NLS-1$ >+ " variable path: " + variablePath); //$NON-NLS-1$ >+ } >+ manager.variablesWithInitializer.put(variableName, initializer.flags); >+ ok = true; >+ } catch (RuntimeException e) { >+ if (JavaModelManager.CP_RESOLVE_VERBOSE) { >+ e.printStackTrace(); >+ } >+ throw e; >+ } catch (Error e) { >+ if (JavaModelManager.CP_RESOLVE_VERBOSE) { >+ e.printStackTrace(); >+ } >+ throw e; >+ } finally { >+ if (!ok) JavaModelManager.getJavaModelManager().variablePut(variableName, null); // flush cache >+ } >+ } else { >+ if (JavaModelManager.CP_RESOLVE_VERBOSE){ >+ Util.verbose( >+ "CPVariable INIT - no initializer found\n" + //$NON-NLS-1$ >+ " variable: " + variableName); //$NON-NLS-1$ >+ } >+ } >+ return variablePath; >+ } >+ >+ /** >+ * Returns whether a given classpath variable is deprecated or not. >+ * >+ * @param variableName >+ * @return <code>true</code> if the classpath variable is deprecated, >+ * <code>false</code> otherwise of if the variable is not initialized yet. >+ * @since 3.3 >+ */ >+ public static boolean isClasspathVariableDeprecated(final String variableName) { >+ JavaModelManager manager = JavaModelManager.getJavaModelManager(); >+ IPath variablePath = manager.variableGet(variableName); >+ if (variablePath == JavaModelManager.VARIABLE_INITIALIZATION_IN_PROGRESS){ >+ return false; // currently do not store previous session result >+ } >+ >+ if (variablePath != null) { >+ if (variablePath == JavaModelManager.CP_ENTRY_IGNORE_PATH) { >+ return false; >+ } >+ } else { >+ initializeClasspathVariable(variableName, variablePath); >+ } >+ >+ int flags = manager.variableFlagsGet(variableName); >+ return flags > 0 && (flags & 0x01) != 0; >+ } >+ >+ /** >+ * Returns whether a given classpath variable is deprecated or not. >+ * >+ * @param variableName >+ * @return <code>true</code> if the classpath variable is deprecated, >+ * <code>false</code> otherwise of if the variable is not initialized yet. >+ * @since 3.3 >+ */ >+ public static boolean isClasspathVariableReadOnly(final String variableName) { >+ JavaModelManager manager = JavaModelManager.getJavaModelManager(); >+ IPath variablePath = manager.variableGet(variableName); >+ if (variablePath == JavaModelManager.VARIABLE_INITIALIZATION_IN_PROGRESS){ >+ return false; // currently do not store previous session result >+ } >+ >+ if (variablePath != null) { >+ if (variablePath == JavaModelManager.CP_ENTRY_IGNORE_PATH) { >+ return false; >+ } >+ } else { >+ initializeClasspathVariable(variableName, variablePath); >+ } >+ >+ int flags = manager.variableFlagsGet(variableName); >+ return flags > 0 && (flags & 0x02) != 0; >+ } >+ > /** > * Returns whether the given file name's extension is a Java-like extension. > * >@@ -3023,7 +3095,7 @@ > public static boolean isJavaLikeFileName(String fileName) { > return Util.isJavaLikeFileName(fileName); > } >- >+ > /** > * Returns whether the given marker references the given Java element. > * Used for markers, which denote a Java element rather than a resource. >Index: model/org/eclipse/jdt/internal/core/JavaModelOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelOperation.java,v >retrieving revision 1.64 >diff -u -r1.64 JavaModelOperation.java >--- model/org/eclipse/jdt/internal/core/JavaModelOperation.java 23 Nov 2005 15:41:57 -0000 1.64 >+++ model/org/eclipse/jdt/internal/core/JavaModelOperation.java 14 Jan 2007 11:37:43 -0000 >@@ -61,7 +61,7 @@ > protected HashMap attributes; > > public static final String HAS_MODIFIED_RESOURCE_ATTR = "hasModifiedResource"; //$NON-NLS-1$ >- public static final String TRUE = "true"; //$NON-NLS-1$ >+ public static final String TRUE = JavaModelManager.TRUE; > //public static final String FALSE = "false"; > > /** >Index: model/org/eclipse/jdt/internal/core/JavaModelStatus.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelStatus.java,v >retrieving revision 1.42 >diff -u -r1.42 JavaModelStatus.java >--- model/org/eclipse/jdt/internal/core/JavaModelStatus.java 29 Mar 2006 03:08:48 -0000 1.42 >+++ model/org/eclipse/jdt/internal/core/JavaModelStatus.java 14 Jan 2007 11:37:43 -0000 >@@ -126,7 +126,7 @@ > this(code, new IJavaElement[]{element}); > this.string = string; > } >- >+ > /** > * Constructs an Java model status with the given corresponding > * element and path >@@ -134,7 +134,18 @@ > public JavaModelStatus(int code, IJavaElement element, IPath path) { > this(code, new IJavaElement[]{element}); > this.path = path; >- } >+ } >+ >+ /** >+ * Constructs an Java model status with the given corresponding >+ * element and path >+ */ >+ public JavaModelStatus(int severity, int code, IJavaElement element, IPath path) { >+ super(severity, JavaCore.PLUGIN_ID, code, "JavaModelStatus", null); //$NON-NLS-1$ >+ this.elements= new IJavaElement[]{element}; >+ this.path = path; >+ } >+ > /** > * Constructs an Java model status with the given corresponding > * element, path and string >@@ -172,6 +183,10 @@ > * Returns the message that is relevant to the code of this status. > */ > public String getMessage() { >+ if (isMultiStatus()) { >+ String msg = getMultiStatusMessage(); >+ if (msg != null) return msg; >+ } > Throwable exception = getException(); > if (exception == null) { > switch (getCode()) { >@@ -326,53 +341,63 @@ > if (description == null) description = path.makeRelative().toString(); > return Messages.bind(Messages.classpath_invalidContainer, new String[] {description, javaProject.getElementName()}); > >- case CP_VARIABLE_PATH_UNBOUND: >- javaProject = (IJavaProject)elements[0]; >- return Messages.bind(Messages.classpath_unboundVariablePath, new String[] {path.makeRelative().toString(), javaProject.getElementName()}); >- >- case CLASSPATH_CYCLE: >- javaProject = (IJavaProject)elements[0]; >- return Messages.bind(Messages.classpath_cycle, javaProject.getElementName()); >- >- case DISABLED_CP_EXCLUSION_PATTERNS: >- javaProject = (IJavaProject)elements[0]; >- String projectName = javaProject.getElementName(); >- IPath newPath = path; >- if (path.segment(0).toString().equals(projectName)) { >- newPath = path.removeFirstSegments(1); >- } >- return Messages.bind(Messages.classpath_disabledInclusionExclusionPatterns, new String[] {newPath.makeRelative().toString(), projectName}); >+ case CP_VARIABLE_PATH_UNBOUND: >+ javaProject = (IJavaProject)elements[0]; >+ return Messages.bind(Messages.classpath_unboundVariablePath, new String[] {path.makeRelative().toString(), javaProject.getElementName()}); > >- case DISABLED_CP_MULTIPLE_OUTPUT_LOCATIONS: >- javaProject = (IJavaProject)elements[0]; >- projectName = javaProject.getElementName(); >- newPath = path; >- if (path.segment(0).toString().equals(projectName)) { >- newPath = path.removeFirstSegments(1); >- } >- return Messages.bind(Messages.classpath_disabledMultipleOutputLocations, new String[] {newPath.makeRelative().toString(), projectName}); >+ case CLASSPATH_CYCLE: >+ javaProject = (IJavaProject)elements[0]; >+ return Messages.bind(Messages.classpath_cycle, javaProject.getElementName()); >+ >+ case DISABLED_CP_EXCLUSION_PATTERNS: >+ javaProject = (IJavaProject)elements[0]; >+ String projectName = javaProject.getElementName(); >+ IPath newPath = path; >+ if (path.segment(0).toString().equals(projectName)) { >+ newPath = path.removeFirstSegments(1); >+ } >+ return Messages.bind(Messages.classpath_disabledInclusionExclusionPatterns, new String[] {newPath.makeRelative().toString(), projectName}); > >- case INCOMPATIBLE_JDK_LEVEL: >+ case DISABLED_CP_MULTIPLE_OUTPUT_LOCATIONS: > javaProject = (IJavaProject)elements[0]; >- return Messages.bind(Messages.classpath_incompatibleLibraryJDKLevel, new String[]{ >- javaProject.getElementName(), >- javaProject.getOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, true), >- path.makeRelative().toString(), >- string, >- }); >- case CANNOT_RETRIEVE_ATTACHED_JAVADOC : >- if (elements != null && elements.length == 1) { >+ projectName = javaProject.getElementName(); >+ newPath = path; >+ if (path.segment(0).toString().equals(projectName)) { >+ newPath = path.removeFirstSegments(1); >+ } >+ return Messages.bind(Messages.classpath_disabledMultipleOutputLocations, new String[] {newPath.makeRelative().toString(), projectName}); >+ >+ case INCOMPATIBLE_JDK_LEVEL: >+ javaProject = (IJavaProject)elements[0]; >+ return Messages.bind(Messages.classpath_incompatibleLibraryJDKLevel, new String[]{ >+ javaProject.getElementName(), >+ javaProject.getOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, true), >+ path.makeRelative().toString(), >+ string, >+ }); >+ >+ case CANNOT_RETRIEVE_ATTACHED_JAVADOC : >+ if (elements != null && elements.length == 1) { >+ if (this.string != null) { >+ return Messages.bind(Messages.status_cannot_retrieve_attached_javadoc, ((JavaElement)elements[0]).toStringWithAncestors(), this.string); >+ } >+ return Messages.bind(Messages.status_cannot_retrieve_attached_javadoc, ((JavaElement)elements[0]).toStringWithAncestors(), ""); //$NON-NLS-1$ >+ } > if (this.string != null) { >- return Messages.bind(Messages.status_cannot_retrieve_attached_javadoc, ((JavaElement)elements[0]).toStringWithAncestors(), this.string); >+ return Messages.bind(Messages.status_cannot_retrieve_attached_javadoc, this.string, "");//$NON-NLS-1$ > } >- return Messages.bind(Messages.status_cannot_retrieve_attached_javadoc, ((JavaElement)elements[0]).toStringWithAncestors(), ""); //$NON-NLS-1$ >- } >- if (this.string != null) { >- return Messages.bind(Messages.status_cannot_retrieve_attached_javadoc, this.string, "");//$NON-NLS-1$ >- } >- break; >- case UNKNOWN_JAVADOC_FORMAT : >- return Messages.bind(Messages.status_unknown_javadoc_format, ((JavaElement)elements[0]).toStringWithAncestors()); >+ break; >+ >+ case UNKNOWN_JAVADOC_FORMAT : >+ return Messages.bind(Messages.status_unknown_javadoc_format, ((JavaElement)elements[0]).toStringWithAncestors()); >+ >+ case DEPRECATED_VARIABLE : >+ javaProject = (IJavaProject)elements[0]; >+ return Messages.bind(Messages.classpath_deprecated_variable, new String[] {path.segment(0).toString(), javaProject.getElementName()}); >+ >+ case READ_ONLY_VARIABLE : >+ javaProject = (IJavaProject)elements[0]; >+ return Messages.bind(Messages.classpath_read_only_variable, new String[] {path.segment(0).toString(), javaProject.getElementName()}); > } > if (string != null) { > return string; >@@ -388,6 +413,36 @@ > } > } > } >+ >+ /* >+ * Return the message for a mutli-status status. >+ */ >+ private String getMultiStatusMessage() { >+ StringBuffer message = null; >+ int length = children.length; >+ switch (length) { >+ case 0: >+ return null; >+ case 1: >+ return children[0].getMessage(); >+ default: >+ } >+ for (int i = 0; i < length; i++) { >+ IStatus status = children[i]; >+ if (status != JavaModelStatus.VERIFIED_OK) { // OK message is overridden by worst one >+ if (message == null) { >+ message = new StringBuffer(status.getMessage()); >+ } else { >+ message.append("; "); //$NON-NLS-1$ >+ message.append(status.getMessage()); >+ } >+ } >+ } >+ if (message == null) { // all children were OK status, return only one message >+ return JavaModelStatus.VERIFIED_OK.getMessage(); >+ } >+ return message.toString(); >+ } > /** > * @see IJavaModelStatus#getPath() > */ >Index: model/org/eclipse/jdt/internal/core/ClasspathEntry.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClasspathEntry.java,v >retrieving revision 1.94 >diff -u -r1.94 ClasspathEntry.java >--- model/org/eclipse/jdt/internal/core/ClasspathEntry.java 3 Oct 2006 09:43:27 -0000 1.94 >+++ model/org/eclipse/jdt/internal/core/ClasspathEntry.java 14 Jan 2007 11:37:25 -0000 >@@ -26,6 +26,7 @@ > import org.eclipse.core.runtime.AssertionFailedException; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.Path; > import org.eclipse.jdt.core.IAccessRule; > import org.eclipse.jdt.core.IClasspathAttribute; >@@ -1627,7 +1628,28 @@ > if (entry == null){ > return new JavaModelStatus(IJavaModelStatusConstants.CP_VARIABLE_PATH_UNBOUND, project, path); > } >- return validateClasspathEntry(project, entry, checkSourceAttachment, recurseInContainers); >+ >+ // get validation status >+ IJavaModelStatus status = validateClasspathEntry(project, entry, checkSourceAttachment, recurseInContainers); >+ >+ // add deprecation and read-only status if any >+ String variableName = path.segment(0); >+ IJavaModelStatus deprecatedStatus = (JavaCore.isClasspathVariableDeprecated(variableName)) >+ ? new JavaModelStatus(IStatus.WARNING, IJavaModelStatusConstants.DEPRECATED_VARIABLE, project, path) >+ : null; >+ IJavaModelStatus readOnlyStatus = (JavaCore.isClasspathVariableReadOnly(variableName)) >+ ? new JavaModelStatus(IStatus.WARNING, IJavaModelStatusConstants.READ_ONLY_VARIABLE, project, path) >+ : null; >+ if (deprecatedStatus != null) { >+ if (readOnlyStatus != null) { >+ status = JavaModelStatus.newMultiStatus(new IJavaModelStatus[] { status, deprecatedStatus, readOnlyStatus }); >+ } else { >+ status = JavaModelStatus.newMultiStatus(new IJavaModelStatus[] { status, deprecatedStatus}); >+ } >+ } else if (readOnlyStatus != null) { >+ status = JavaModelStatus.newMultiStatus(new IJavaModelStatus[] { status, readOnlyStatus}); >+ } >+ return status; > } else { > return new JavaModelStatus(IJavaModelStatusConstants.INVALID_CLASSPATH, Messages.bind(Messages.classpath_illegalVariablePath, new String[] {entryPathMsg, projectName})); > } >Index: model/org/eclipse/jdt/internal/core/JavaModelManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java,v >retrieving revision 1.350 >diff -u -r1.350 JavaModelManager.java >--- model/org/eclipse/jdt/internal/core/JavaModelManager.java 12 Jan 2007 17:58:49 -0000 1.350 >+++ model/org/eclipse/jdt/internal/core/JavaModelManager.java 14 Jan 2007 11:37:40 -0000 >@@ -86,9 +86,16 @@ > * Classpath variables pool > */ > public HashMap variables = new HashMap(5); >- public HashSet variablesWithInitializer = new HashSet(5); > public HashMap previousSessionVariables = new HashMap(5); > private ThreadLocal variableInitializationInProgress = new ThreadLocal(); >+ >+ /** >+ * Map of classpath variables which have an initializer. >+ * Keys are variable names and values are flags corresponding to initializer >+ * additional attributes (currently bit0 for deprecation and bit1 for read-only) >+ * @see ClasspathVariableInitializer >+ */ >+ public HashtableOfObjectToInt variablesWithInitializer = new HashtableOfObjectToInt(5); > > /** > * Classpath containers pool >@@ -120,6 +127,7 @@ > public final static String CP_CONTAINER_PREFERENCES_PREFIX = JavaCore.PLUGIN_ID+".classpathContainer."; //$NON-NLS-1$ > public final static String CP_ENTRY_IGNORE = "##<cp entry ignore>##"; //$NON-NLS-1$ > public final static IPath CP_ENTRY_IGNORE_PATH = new Path(CP_ENTRY_IGNORE); >+ public final static String TRUE = "true"; //$NON-NLS-1$ > > private final static int VARIABLES_AND_CONTAINERS_FILE_VERSION = 2; > >@@ -278,9 +286,9 @@ > continue; > } > // add config element in the group it belongs to >- if ("true".equals(configElement.getAttribute("modifiesEnvironment"))) //$NON-NLS-1$ //$NON-NLS-2$ >+ if (TRUE.equals(configElement.getAttribute("modifiesEnvironment"))) //$NON-NLS-1$ > modifyingEnv.add(configElement); >- else if ("true".equals(configElement.getAttribute("createsProblems"))) //$NON-NLS-1$ //$NON-NLS-2$ >+ else if (TRUE.equals(configElement.getAttribute("createsProblems"))) //$NON-NLS-1$ > creatingProblems.add(configElement); > else > others.add(configElement); >@@ -1124,12 +1132,12 @@ > if (propertyName.startsWith(CP_VARIABLE_PREFERENCES_PREFIX)) { > String varName = propertyName.substring(CP_VARIABLE_PREFERENCES_PREFIX.length()); > JavaModelManager manager = getJavaModelManager(); >- if (manager.variablesWithInitializer.contains(varName)) { >+ if (manager.variablesWithInitializer.containsKey(varName)) { > // revert preference value as we will not apply it to JavaCore classpath variable > String oldValue = (String) event.getOldValue(); > if (oldValue == null) { > // unexpected old value => remove variable from set >- manager.variablesWithInitializer.remove(varName); >+ manager.variablesWithInitializer.removeKey(varName); > } else { > manager.getInstancePreferences().put(varName, oldValue); > } >@@ -1200,58 +1208,58 @@ > public void configurePluginDebugOptions(){ > if(JavaCore.getPlugin().isDebugging()){ > String option = Platform.getDebugOption(BUFFER_MANAGER_DEBUG); >- if(option != null) BufferManager.VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) BufferManager.VERBOSE = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(BUILDER_DEBUG); >- if(option != null) JavaBuilder.DEBUG = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) JavaBuilder.DEBUG = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(COMPILER_DEBUG); >- if(option != null) Compiler.DEBUG = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) Compiler.DEBUG = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(COMPLETION_DEBUG); >- if(option != null) CompletionEngine.DEBUG = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) CompletionEngine.DEBUG = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(CP_RESOLVE_DEBUG); >- if(option != null) JavaModelManager.CP_RESOLVE_VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) JavaModelManager.CP_RESOLVE_VERBOSE = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(DELTA_DEBUG); >- if(option != null) DeltaProcessor.DEBUG = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) DeltaProcessor.DEBUG = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(DELTA_DEBUG_VERBOSE); >- if(option != null) DeltaProcessor.VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) DeltaProcessor.VERBOSE = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(HIERARCHY_DEBUG); >- if(option != null) TypeHierarchy.DEBUG = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) TypeHierarchy.DEBUG = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(INDEX_MANAGER_DEBUG); >- if(option != null) JobManager.VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) JobManager.VERBOSE = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(JAVAMODEL_DEBUG); >- if(option != null) JavaModelManager.VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) JavaModelManager.VERBOSE = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(JAVAMODELCACHE_DEBUG); >- if(option != null) JavaModelCache.VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) JavaModelCache.VERBOSE = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(POST_ACTION_DEBUG); >- if(option != null) JavaModelOperation.POST_ACTION_VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) JavaModelOperation.POST_ACTION_VERBOSE = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(RESOLUTION_DEBUG); >- if(option != null) NameLookup.VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) NameLookup.VERBOSE = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(SEARCH_DEBUG); >- if(option != null) BasicSearchEngine.VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) BasicSearchEngine.VERBOSE = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(SELECTION_DEBUG); >- if(option != null) SelectionEngine.DEBUG = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) SelectionEngine.DEBUG = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(ZIP_ACCESS_DEBUG); >- if(option != null) JavaModelManager.ZIP_ACCESS_VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) JavaModelManager.ZIP_ACCESS_VERBOSE = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(SOURCE_MAPPER_DEBUG_VERBOSE); >- if(option != null) SourceMapper.VERBOSE = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) SourceMapper.VERBOSE = option.equalsIgnoreCase(TRUE) ; > > option = Platform.getDebugOption(ENABLE_NEW_FORMATTER); >- if(option != null) DefaultCodeFormatter.USE_NEW_FORMATTER = option.equalsIgnoreCase("true") ; //$NON-NLS-1$ >+ if(option != null) DefaultCodeFormatter.USE_NEW_FORMATTER = option.equalsIgnoreCase(TRUE) ; > } > > // configure performance options >@@ -3950,7 +3958,7 @@ > > // Note: no need to close the Java model as this just removes Java element infos from the Java model cache > } >- >+ > public synchronized IPath variableGet(String variableName){ > // check initialization in progress first > HashSet initializations = variableInitializationInProgress(); >@@ -3960,6 +3968,10 @@ > return (IPath)this.variables.get(variableName); > } > >+ public synchronized int variableFlagsGet(String variableName){ >+ return this.variablesWithInitializer.get(variableName); >+ } >+ > /* > * Returns the set of variable names that are being initialized in the current thread. > */ >@@ -4011,7 +4023,7 @@ > public void variablePreferencesPut(String variableName, IPath variablePath) { > String variableKey = CP_VARIABLE_PREFERENCES_PREFIX+variableName; > if (variablePath == null) { >- this.variablesWithInitializer.remove(variableName); >+ this.variablesWithInitializer.removeKey(variableName); > getInstancePreferences().remove(variableKey); > } else { > getInstancePreferences().put(variableKey, variablePath.toString()); >Index: schema/classpathVariableInitializer.exsd >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/schema/classpathVariableInitializer.exsd,v >retrieving revision 1.6 >diff -u -r1.6 classpathVariableInitializer.exsd >--- schema/classpathVariableInitializer.exsd 24 May 2005 14:25:21 -0000 1.6 >+++ schema/classpathVariableInitializer.exsd 14 Jan 2007 11:37:46 -0000 >@@ -63,6 +63,23 @@ > </appInfo> > </annotation> > </attribute> >+ <attribute name="deprecated" type="string"> >+ <annotation> >+ <documentation> >+ String explaining the reason why the associated variable is deprecated >+ </documentation> >+ <appInfo> >+ <meta.attribute translatable="true"/> >+ </appInfo> >+ </annotation> >+ </attribute> >+ <attribute name="readOnly" type="boolean"> >+ <annotation> >+ <documentation> >+ Indicates that the associated variable cannot be modified >+ </documentation> >+ </annotation> >+ </attribute> > </complexType> > </element> > >Index: model/org/eclipse/jdt/internal/core/util/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/messages.properties,v >retrieving revision 1.62 >diff -u -r1.62 messages.properties >--- model/org/eclipse/jdt/internal/core/util/messages.properties 28 Jun 2006 08:52:07 -0000 1.62 >+++ model/org/eclipse/jdt/internal/core/util/messages.properties 14 Jan 2007 11:37:46 -0000 >@@ -167,6 +167,8 @@ > classpath_disabledMultipleOutputLocations = Multiple output locations are disabled in project {1}, cannot associate entry: ''{0}'' with a specific output > classpath_incompatibleLibraryJDKLevel = Incompatible .class files version in required binaries. Project ''{0}'' is targeting a {1} runtime, but is compiled against ''{2}'' which requires a {3} runtime > classpath_duplicateEntryExtraAttribute = Duplicate extra attribute: ''{0}'' in classpath entry ''{1}'' for project {2} >+classpath_deprecated_variable = Classpath variable ''{0}'' in project {1} is deprecated >+classpath_read_only_variable = Classpath variable ''{0}'' in project {1} is read only > > ### miscellaneous > file_notFound = File not found: ''{0}'' >Index: model/org/eclipse/jdt/internal/core/util/Messages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Messages.java,v >retrieving revision 1.14 >diff -u -r1.14 Messages.java >--- model/org/eclipse/jdt/internal/core/util/Messages.java 28 Jun 2006 08:52:07 -0000 1.14 >+++ model/org/eclipse/jdt/internal/core/util/Messages.java 14 Jan 2007 11:37:46 -0000 >@@ -161,6 +161,8 @@ > public static String classpath_disabledMultipleOutputLocations; > public static String classpath_incompatibleLibraryJDKLevel; > public static String classpath_duplicateEntryExtraAttribute; >+ public static String classpath_deprecated_variable; >+ public static String classpath_read_only_variable; > public static String file_notFound; > public static String file_badFormat; > public static String path_nullPath;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 138599
:
56721
|
56879
|
56978
|
57080
|
57134