|
Eclipse JDT 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.core.runtime.Plugin | +--org.eclipse.jdt.core.JavaCore
The plug-in runtime class for the Java model plug-in containing the core (UI-free) support for Java projects.
Like all plug-in runtime classes (subclasses of Plugin
), this
class is automatically instantiated by the platform when the plug-in gets
activated. Clients must not attempt to instantiate plug-in runtime classes
directly.
The single instance of this class can be accessed from any plug-in declaring
the Java model plug-in as a prerequisite via
JavaCore.getJavaCore()
. The Java model plug-in will be activated
automatically if not already active.
Field Summary | |
static String |
ABORT
Possible configurable option value. |
protected static String |
ATT_HANDLE_ID
Name of the handle id attribute in a Java marker |
static String |
BUILDER_ID
The identifier for the Java builder (value "org.eclipse.jdt.core.javabuilder" ). |
static String |
CLEAR_ALL
Possible configurable option value. |
static String |
CODEASSIST_IMPLICIT_QUALIFICATION
Possible configurable option ID. |
static String |
CODEASSIST_VISIBILITY_CHECK
Possible configurable option ID. |
static String |
COMPACT
Possible configurable option value. |
static String |
COMPILER_CODEGEN_TARGET_PLATFORM
Possible configurable option ID. |
static String |
COMPILER_CODEGEN_UNUSED_LOCAL
Possible configurable option ID. |
static String |
COMPILER_COMPLIANCE
Possible configurable option ID. |
static String |
COMPILER_LINE_NUMBER_ATTR
Possible configurable option ID. |
static String |
COMPILER_LOCAL_VARIABLE_ATTR
Possible configurable option ID. |
static String |
COMPILER_PB_ASSERT_IDENTIFIER
Possible configurable option ID. |
static String |
COMPILER_PB_DEPRECATION
Possible configurable option ID. |
static String |
COMPILER_PB_HIDDEN_CATCH_BLOCK
Possible configurable option ID. |
static String |
COMPILER_PB_INVALID_IMPORT
Possible configurable option ID. |
static String |
COMPILER_PB_MAX_PER_UNIT
Possible configurable option ID. |
static String |
COMPILER_PB_METHOD_WITH_CONSTRUCTOR_NAME
Possible configurable option ID. |
static String |
COMPILER_PB_NON_NLS_STRING_LITERAL
Possible configurable option ID. |
static String |
COMPILER_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD
Possible configurable option ID. |
static String |
COMPILER_PB_SYNTHETIC_ACCESS_EMULATION
Possible configurable option ID. |
static String |
COMPILER_PB_UNREACHABLE_CODE
Possible configurable option ID. |
static String |
COMPILER_PB_UNUSED_IMPORT
Possible configurable option ID. |
static String |
COMPILER_PB_UNUSED_LOCAL
Possible configurable option ID. |
static String |
COMPILER_PB_UNUSED_PARAMETER
Possible configurable option ID. |
static String |
COMPILER_SOURCE
Possible configurable option ID. |
static String |
COMPILER_SOURCE_FILE_ATTR
Possible configurable option ID. |
static String |
COMPUTE
Possible configurable option value. |
static String |
CORE_ENCODING
Possible configurable option ID. |
static String |
CORE_JAVA_BUILD_INVALID_CLASSPATH
Possible configurable option ID. |
static String |
CORE_JAVA_BUILD_ORDER
Possible configurable option ID. |
static String |
CORE_JAVA_BUILD_RESOURCE_COPY_FILTER
Possible configurable option ID. |
static String |
DISABLED
Possible configurable option value. |
static String |
DO_NOT_GENERATE
Possible configurable option value. |
static String |
DO_NOT_INSERT
Possible configurable option value. |
static String |
ENABLED
Possible configurable option value. |
static String |
ERROR
Possible configurable option value. |
static String |
FORMATTER_CLEAR_BLANK_LINES
Possible configurable option ID. |
static String |
FORMATTER_COMPACT_ASSIGNMENT
Possible configurable option ID. |
static String |
FORMATTER_LINE_SPLIT
Possible configurable option ID. |
static String |
FORMATTER_NEWLINE_CONTROL
Possible configurable option ID. |
static String |
FORMATTER_NEWLINE_ELSE_IF
Possible configurable option ID. |
static String |
FORMATTER_NEWLINE_EMPTY_BLOCK
Possible configurable option ID. |
static String |
FORMATTER_NEWLINE_OPENING_BRACE
Possible configurable option ID. |
static String |
FORMATTER_TAB_CHAR
Possible configurable option ID. |
static String |
FORMATTER_TAB_SIZE
Possible configurable option ID. |
static String |
GENERATE
Possible configurable option value. |
static String |
IGNORE
Possible configurable option value. |
static String |
INSERT
Possible configurable option value. |
static String |
MODEL_ID
The identifier for the Java model (value "org.eclipse.jdt.core.javamodel" ). |
static String |
NATURE_ID
The identifier for the Java nature (value "org.eclipse.jdt.core.javanature" ). |
static String |
NORMAL
Possible configurable option value. |
static String |
OPTIMIZE_OUT
Possible configurable option value. |
static String |
PLUGIN_ID
The plug-in identifier of the Java core support (value "org.eclipse.jdt.core" ). |
static String |
PRESERVE
Possible configurable option value. |
static String |
PRESERVE_ONE
Possible configurable option value. |
static String |
SPACE
Possible configurable option value. |
static String |
TAB
Possible configurable option value. |
static String |
VERSION_1_1
Possible configurable option value. |
static String |
VERSION_1_2
Possible configurable option value. |
static String |
VERSION_1_3
Possible configurable option value. |
static String |
VERSION_1_4
Possible configurable option value. |
static String |
WARNING
Possible configurable option value. |
Fields inherited from class org.eclipse.core.runtime.Plugin |
PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME |
Constructor Summary | |
JavaCore(IPluginDescriptor pluginDescriptor)
Creates the Java core plug-in. |
Method Summary | |
static void |
addElementChangedListener(IElementChangedListener listener)
Adds the given listener for changes to Java elements. |
static void |
addElementChangedListener(IElementChangedListener listener,
int eventMask)
Adds the given listener for changes to Java elements. |
static void |
addJavaElementMarkerAttributes(Map attributes,
IJavaElement element)
Configures the given marker attribute map for the given Java element. |
void |
configureJavaElementMarker(IMarker marker,
IJavaElement element)
Configures the given marker for the given Java element. |
static IJavaElement |
create(IFile file)
Returns the Java element corresponding to the given file, or null if unable to associate the given file
with a Java element. |
static IJavaElement |
create(IFolder folder)
Returns the package fragment or package fragment root corresponding to the given folder, or null if unable to associate the given folder with a Java element. |
static IJavaProject |
create(IProject project)
Returns the Java project corresponding to the given project. |
static IJavaElement |
create(IResource resource)
Returns the Java element corresponding to the given resource, or null if unable to associate the given resource
with a Java element. |
static IJavaModel |
create(IWorkspaceRoot root)
Returns the Java model. |
static IJavaElement |
create(String handleIdentifier)
Returns the Java model element corresponding to the given handle identifier generated by IJavaElement.getHandleIdentifier() , or
null if unable to create the associated element. |
static IClassFile |
createClassFileFrom(IFile file)
Creates and returns a class file element for the given .class file. |
static ICompilationUnit |
createCompilationUnitFrom(IFile file)
Creates and returns a compilation unit element for the given .java file. |
static IPackageFragmentRoot |
createJarPackageFragmentRootFrom(IFile file)
Creates and returns a handle for the given JAR file. |
static IClasspathContainer |
getClasspathContainer(IPath containerPath,
IJavaProject project)
Answers the project specific value for a given classpath container. |
static IPath |
getClasspathVariable(String variableName)
Returns the path held in the given classpath variable. |
static String[] |
getClasspathVariableNames()
Returns the names of all known classpath variables. |
static Hashtable |
getDefaultOptions()
Returns a table of all known configurable options with their default values. |
static JavaCore |
getJavaCore()
Returns the single instance of the Java core plug-in runtime class. |
static String |
getOption(String optionName)
Helper method for returning one option value only. |
static Hashtable |
getOptions()
Returns the table of the current options. |
static Plugin |
getPlugin()
Returns the single instance of the Java core plug-in runtime class. |
static IClasspathEntry |
getResolvedClasspathEntry(IClasspathEntry entry)
This is a helper method, which returns the resolved classpath entry denoted by a given entry (if it is a variable entry). |
static IPath |
getResolvedVariablePath(IPath variablePath)
Resolve a variable path (helper method) |
static IWorkingCopy[] |
getSharedWorkingCopies(IBufferFactory factory)
Answers the shared working copies currently registered for this buffer factory. |
protected void |
initializeDefaultPluginPreferences()
Initializes the default preferences settings for this plug-in. |
static boolean |
isReferencedBy(IJavaElement element,
IMarker marker)
Returns whether the given marker references the given Java element. |
static boolean |
isReferencedBy(IJavaElement element,
IMarkerDelta markerDelta)
Returns whether the given marker delta references the given Java element. |
static IClasspathEntry |
newContainerEntry(IPath containerPath)
Creates and returns a new classpath entry of kind CPE_CONTAINER
for the given path. |
static IClasspathEntry |
newContainerEntry(IPath containerPath,
boolean isExported)
Creates and returns a new classpath entry of kind CPE_CONTAINER
for the given path. |
static IClasspathEntry |
newLibraryEntry(IPath path,
IPath sourceAttachmentPath,
IPath sourceAttachmentRootPath)
Creates and returns a new non-exported classpath entry of kind CPE_LIBRARY for the
JAR or folder identified by the given absolute path. |
static IClasspathEntry |
newLibraryEntry(IPath path,
IPath sourceAttachmentPath,
IPath sourceAttachmentRootPath,
boolean isExported)
Creates and returns a new classpath entry of kind CPE_LIBRARY for the JAR or folder
identified by the given absolute path. |
static IClasspathEntry |
newProjectEntry(IPath path)
Creates and returns a new non-exported classpath entry of kind CPE_PROJECT
for the project identified by the given absolute path. |
static IClasspathEntry |
newProjectEntry(IPath path,
boolean isExported)
Creates and returns a new classpath entry of kind CPE_PROJECT
for the project identified by the given absolute path. |
static IRegion |
newRegion()
Returns a new empty region. |
static IClasspathEntry |
newSourceEntry(IPath path)
Creates and returns a new classpath entry of kind CPE_SOURCE for the project's source folder
identified by the given absolute path. |
static IClasspathEntry |
newVariableEntry(IPath variablePath,
IPath variableSourceAttachmentPath,
IPath sourceAttachmentRootPath)
Creates and returns a new non-exported classpath entry of kind CPE_VARIABLE
for the given path. |
static IClasspathEntry |
newVariableEntry(IPath variablePath,
IPath variableSourceAttachmentPath,
IPath sourceAttachmentRootPath,
boolean isExported)
Creates and returns a new non-exported classpath entry of kind CPE_VARIABLE
for the given path. |
static void |
removeClasspathVariable(String variableName)
Deprecated. - use version with extra IProgressMonitor |
static void |
removeClasspathVariable(String variableName,
IProgressMonitor monitor)
Removed the given classpath variable. |
static void |
removeElementChangedListener(IElementChangedListener listener)
Removes the given element changed listener. |
static void |
setClasspathContainer(IPath containerPath,
IJavaProject[] affectedProjects,
IClasspathContainer[] respectiveContainers,
IProgressMonitor monitor)
Bind a container reference path to some actual containers ( IClasspathContainer ). |
static void |
setClasspathVariable(String variableName,
IPath path)
Deprecated. - use API with IProgressMonitor |
static void |
setClasspathVariable(String variableName,
IPath path,
IProgressMonitor monitor)
Sets the value of the given classpath variable. |
static void |
setClasspathVariables(String[] variableNames,
IPath[] paths,
IProgressMonitor monitor)
Sets the values of all the given classpath variables at once. |
void |
setInitializationData(IConfigurationElement cfig,
String propertyName,
Object data)
|
static void |
setOptions(Hashtable newOptions)
Sets the current table of options. |
void |
shutdown()
Shutdown the JavaCore plugin |
void |
startup()
Startup of the JavaCore plugin |
Methods inherited from class org.eclipse.core.runtime.Plugin |
find, find, getDescriptor, getLog, getPluginPreferences, getStateLocation, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String PLUGIN_ID
"org.eclipse.jdt.core"
).
public static final String BUILDER_ID
"org.eclipse.jdt.core.javabuilder"
).
public static final String MODEL_ID
"org.eclipse.jdt.core.javamodel"
).
public static final String NATURE_ID
"org.eclipse.jdt.core.javanature"
).
The presence of this nature on a project indicates that it is
Java-capable.
IProject.hasNature(java.lang.String)
,
Constant Field Valuesprotected static final String ATT_HANDLE_ID
public static final String COMPILER_LOCAL_VARIABLE_ATTR
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_LINE_NUMBER_ATTR
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_SOURCE_FILE_ATTR
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_CODEGEN_UNUSED_LOCAL
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_CODEGEN_TARGET_PLATFORM
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_UNREACHABLE_CODE
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_INVALID_IMPORT
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_METHOD_WITH_CONSTRUCTOR_NAME
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_DEPRECATION
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_HIDDEN_CATCH_BLOCK
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_UNUSED_LOCAL
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_UNUSED_PARAMETER
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_UNUSED_IMPORT
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_SYNTHETIC_ACCESS_EMULATION
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_NON_NLS_STRING_LITERAL
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_ASSERT_IDENTIFIER
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_PB_MAX_PER_UNIT
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_SOURCE
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPILER_COMPLIANCE
getDefaultOptions()
,
Constant Field Valuespublic static final String CORE_JAVA_BUILD_ORDER
getDefaultOptions()
,
Constant Field Valuespublic static final String CORE_JAVA_BUILD_RESOURCE_COPY_FILTER
getDefaultOptions()
,
Constant Field Valuespublic static final String CORE_JAVA_BUILD_INVALID_CLASSPATH
getDefaultOptions()
,
Constant Field Valuespublic static final String CORE_ENCODING
getDefaultOptions()
,
Constant Field Valuespublic static final String FORMATTER_NEWLINE_OPENING_BRACE
getDefaultOptions()
,
Constant Field Valuespublic static final String FORMATTER_NEWLINE_CONTROL
getDefaultOptions()
,
Constant Field Valuespublic static final String FORMATTER_NEWLINE_ELSE_IF
getDefaultOptions()
,
Constant Field Valuespublic static final String FORMATTER_NEWLINE_EMPTY_BLOCK
getDefaultOptions()
,
Constant Field Valuespublic static final String FORMATTER_CLEAR_BLANK_LINES
getDefaultOptions()
,
Constant Field Valuespublic static final String FORMATTER_LINE_SPLIT
getDefaultOptions()
,
Constant Field Valuespublic static final String FORMATTER_COMPACT_ASSIGNMENT
getDefaultOptions()
,
Constant Field Valuespublic static final String FORMATTER_TAB_CHAR
getDefaultOptions()
,
Constant Field Valuespublic static final String FORMATTER_TAB_SIZE
getDefaultOptions()
,
Constant Field Valuespublic static final String CODEASSIST_VISIBILITY_CHECK
getDefaultOptions()
,
Constant Field Valuespublic static final String CODEASSIST_IMPLICIT_QUALIFICATION
getDefaultOptions()
,
Constant Field Valuespublic static final String GENERATE
getDefaultOptions()
,
Constant Field Valuespublic static final String DO_NOT_GENERATE
getDefaultOptions()
,
Constant Field Valuespublic static final String PRESERVE
getDefaultOptions()
,
Constant Field Valuespublic static final String OPTIMIZE_OUT
getDefaultOptions()
,
Constant Field Valuespublic static final String VERSION_1_1
getDefaultOptions()
,
Constant Field Valuespublic static final String VERSION_1_2
getDefaultOptions()
,
Constant Field Valuespublic static final String VERSION_1_3
getDefaultOptions()
,
Constant Field Valuespublic static final String VERSION_1_4
getDefaultOptions()
,
Constant Field Valuespublic static final String ABORT
getDefaultOptions()
,
Constant Field Valuespublic static final String ERROR
getDefaultOptions()
,
Constant Field Valuespublic static final String WARNING
getDefaultOptions()
,
Constant Field Valuespublic static final String IGNORE
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPUTE
getDefaultOptions()
,
Constant Field Valuespublic static final String INSERT
getDefaultOptions()
,
Constant Field Valuespublic static final String DO_NOT_INSERT
getDefaultOptions()
,
Constant Field Valuespublic static final String PRESERVE_ONE
getDefaultOptions()
,
Constant Field Valuespublic static final String CLEAR_ALL
getDefaultOptions()
,
Constant Field Valuespublic static final String NORMAL
getDefaultOptions()
,
Constant Field Valuespublic static final String COMPACT
getDefaultOptions()
,
Constant Field Valuespublic static final String TAB
getDefaultOptions()
,
Constant Field Valuespublic static final String SPACE
getDefaultOptions()
,
Constant Field Valuespublic static final String ENABLED
getDefaultOptions()
,
Constant Field Valuespublic static final String DISABLED
getDefaultOptions()
,
Constant Field ValuesConstructor Detail |
public JavaCore(IPluginDescriptor pluginDescriptor)
Method Detail |
public static void addElementChangedListener(IElementChangedListener listener)
addElementChangedListener(IElementChangedListener,int)
,
which allows to specify a different eventMask.
listener
- the listenerElementChangedEvent
public static void addElementChangedListener(IElementChangedListener listener, int eventMask)
Once registered, a listener starts receiving notification of changes to java elements in the model. The listener continues to receive notifications until it is replaced or removed.
Listeners can listen for several types of event as defined in ElementChangeEvent
.
Clients are free to register for any number of event types however if they register
for more than one, it is their responsibility to ensure they correctly handle the
case where the same java element change shows up in multiple notifications.
Clients are guaranteed to receive only the events for which they are registered.
listener
- the listenereventMask
- the bit-wise OR of all event types of interest to the listenerIElementChangedListener
,
ElementChangedEvent
,
removeElementChangedListener(IElementChangedListener)
public static void addJavaElementMarkerAttributes(Map attributes, IJavaElement element)
attributes
- the mutable marker attribute map (key type: String
,
value type: String
)element
- the Java element for which the marker needs to be configuredpublic void configureJavaElementMarker(IMarker marker, IJavaElement element) throws CoreException
marker
- the marker to be configuredelement
- the Java element for which the marker needs to be configured
CoreException
- if the IMarker.setAttribute
on the marker failspublic static IJavaElement create(String handleIdentifier)
IJavaElement.getHandleIdentifier()
, or
null
if unable to create the associated element.
public static IJavaElement create(IFile file)
null
if unable to associate the given file
with a Java element.
The file must be one of:
.java
file - the element returned is the corresponding ICompilationUnit
.class
file - the element returned is the corresponding IClassFile
.jar
file - the element returned is the corresponding IPackageFragmentRoot
Creating a Java element has the side effect of creating and opening all of the element's parents if they are not yet open.
null
if unable to associate the given file
with a Java elementpublic static IJavaElement create(IFolder folder)
null
if unable to associate the given folder with a Java element.
Note that a package fragment root is returned rather than a default package.
Creating a Java element has the side effect of creating and opening all of the element's parents if they are not yet open.
null
if unable to associate the given folder with a Java elementpublic static IJavaProject create(IProject project)
Creating a Java Project has the side effect of creating and opening all of the project's parents if they are not yet open.
Note that no check is done at this time on the existence or the java nature of this project.
project
- the given project
public static IJavaElement create(IResource resource)
null
if unable to associate the given resource
with a Java element.
The resource must be one of:
IJavaProject
.java
file - the element returned is the corresponding ICompilationUnit
.class
file - the element returned is the corresponding IClassFile
.jar
file - the element returned is the corresponding IPackageFragmentRoot
IPackageFragmentRoot
or IPackageFragment
IJavaModel
Creating a Java element has the side effect of creating and opening all of the element's parents if they are not yet open.
resource
- the given resource
null
if unable to associate the given resource
with a Java elementpublic static IJavaModel create(IWorkspaceRoot root)
root
- the given root
null
if the root is nullpublic static IClassFile createClassFileFrom(IFile file)
.class
file. Returns null
if unable
to recognize the class file.
file
- the given .class
file
.class
file, or null
if unable
to recognize the class filepublic static ICompilationUnit createCompilationUnitFrom(IFile file)
.java
file. Returns null
if unable
to recognize the compilation unit.
file
- the given .java
file
.java
file, or null
if unable
to recognize the compilation unitpublic static IPackageFragmentRoot createJarPackageFragmentRootFrom(IFile file)
file
- the given JAR file
null
if unable to create a JAR package fragment root.
(for example, if the JAR file represents a non-Java resource)public static IClasspathContainer getClasspathContainer(IPath containerPath, IJavaProject project) throws JavaModelException
null
.
Both the container path and the project context are supposed to be non-null.
The containerPath is a formed by a first ID segment followed with extra segments, which can be
used as additional hints for resolution. If no container was ever recorded for this container path
onto this project (using setClasspathContainer
, then a
ClasspathContainerInitializer
will be activated if any was registered for this container
ID onto the extension point "org.eclipse.jdt.core.classpathContainerInitializer".
There is no assumption that the returned container must answer the exact same containerPath
when requested IClasspathContainer#getPath
.
Indeed, the containerPath is just an indication for resolving it to an actual container object.
Classpath container values are persisted locally to the workspace, but
are not preserved from a session to another. It is thus highly recommended to register a
ClasspathContainerInitializer
for each referenced container
(through the extension point "org.eclipse.jdt.core.ClasspathContainerInitializer").
containerPath
- the name of the container, which needs to be resolvedproject
- a specific project in which the container is being resolved
null
if unable to find one.
JavaModelException
- if an exception occurred while resolving the container, or if the resolved container
contains illegal entries (contains CPE_CONTAINER entries or null entries).ClasspathContainerInitializer
,
IClasspathContainer
,
setClasspathContainer(IPath, IJavaProject[], IClasspathContainer[], IProgressMonitor)
public static IPath getClasspathVariable(String variableName)
Classpath variable values are persisted locally to the workspace, and are preserved from session to session.
Note that classpath variables can be contributed registered initializers for, using the extension point "org.eclipse.jdt.core.classpathVariableInitializer".
variableName
- the name of the classpath variable
null
if nonesetClasspathVariable(java.lang.String, org.eclipse.core.runtime.IPath)
public static String[] getClasspathVariableNames()
Classpath variable values are persisted locally to the workspace, and are preserved from session to session.
setClasspathVariable(java.lang.String, org.eclipse.core.runtime.IPath)
public static Hashtable getDefaultOptions()
setOptions
.
Helper constants have been defined on JavaCore for each of the option ID and
their possible constant values.
Note: more options might be added in further releases.
RECOGNIZED OPTIONS: COMPILER / Generating Local Variable Debug Attribute When generated, this attribute will enable local variable names to be displayed in debugger, only in place where variables are definitely assigned (.class file is then bigger) - option id: "org.eclipse.jdt.core.compiler.debug.localVariable" - possible values: { "generate", "do not generate" } - default: "generate" COMPILER / Generating Line Number Debug Attribute When generated, this attribute will enable source code highlighting in debugger (.class file is then bigger). - option id: "org.eclipse.jdt.core.compiler.debug.lineNumber" - possible values: { "generate", "do not generate" } - default: "generate" COMPILER / Generating Source Debug Attribute When generated, this attribute will enable the debugger to present the corresponding source code. - option id: "org.eclipse.jdt.core.compiler.debug.sourceFile" - possible values: { "generate", "do not generate" } - default: "generate" COMPILER / Preserving Unused Local Variables Unless requested to preserve unused local variables (i.e. never read), the compiler will optimize them out, potentially altering debugging - option id: "org.eclipse.jdt.core.compiler.codegen.unusedLocal" - possible values: { "preserve", "optimize out" } - default: "preserve" COMPILER / Defining Target Java Platform For binary compatibility reason, .class files can be tagged to with certain VM versions and later. Note that "1.4" target require to toggle compliance mode to "1.4" too. - option id: "org.eclipse.jdt.core.compiler.codegen.targetPlatform" - possible values: { "1.1", "1.2", "1.3", "1.4" } - default: "1.1" COMPILER / Reporting Unreachable Code Unreachable code can optionally be reported as an error, warning or simply ignored. The bytecode generation will always optimized it out. - option id: "org.eclipse.jdt.core.compiler.problem.unreachableCode" - possible values: { "error", "warning", "ignore" } - default: "error" COMPILER / Reporting Invalid Import An import statement that cannot be resolved might optionally be reported as an error, as a warning or ignored. - option id: "org.eclipse.jdt.core.compiler.problem.invalidImport" - possible values: { "error", "warning", "ignore" } - default: "error" COMPILER / Reporting Attempt to Override Package-Default Method A package default method is not visible in a different package, and thus cannot be overridden. When enabling this option, the compiler will signal such scenarii either as an error or a warning. - option id: "org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod" - possible values: { "error", "warning", "ignore" } - default: "warning" COMPILER / Reporting Method With Constructor Name Naming a method with a constructor name is generally considered poor style programming. When enabling this option, the compiler will signal such scenarii either as an error or a warning. - option id: "org.eclipse.jdt.core.compiler.problem.methodWithConstructorName" - possible values: { "error", "warning", "ignore" } - default: "warning" COMPILER / Reporting Deprecation When enabled, the compiler will signal use of deprecated API either as an error or a warning. - option id: "org.eclipse.jdt.core.compiler.problem.deprecation" - possible values: { "error", "warning", "ignore" } - default: "warning" COMPILER / Reporting Hidden Catch Block Locally to a try statement, some catch blocks may hide others , e.g. try { throw new java.io.CharConversionException(); } catch (java.io.CharConversionException e) { } catch (java.io.IOException e) {}. When enabling this option, the compiler will issue an error or a warning for hidden catch blocks corresponding to checked exceptions - option id: "org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock" - possible values: { "error", "warning", "ignore" } - default: "warning" COMPILER / Reporting Unused Local When enabled, the compiler will issue an error or a warning for unused local variables (i.e. variables never read from) - option id: "org.eclipse.jdt.core.compiler.problem.unusedLocal" - possible values: { "error", "warning", "ignore" } - default: "ignore" COMPILER / Reporting Unused Parameter When enabled, the compiler will issue an error or a warning for unused method parameters (i.e. parameters never read from) - option id: "org.eclipse.jdt.core.compiler.problem.unusedParameter" - possible values: { "error", "warning", "ignore" } - default: "ignore" COMPILER / Reporting Unused Import When enabled, the compiler will issue an error or a warning for unused import reference - option id: "org.eclipse.jdt.core.compiler.problem.unusedImport" - possible values: { "error", "warning", "ignore" } - default: "ignore" COMPILER / Reporting Synthetic Access Emulation When enabled, the compiler will issue an error or a warning whenever it emulates access to a non-accessible member of an enclosing type. Such access can have performance implications. - option id: "org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation" - possible values: { "error", "warning", "ignore" } - default: "ignore" COMPILER / Reporting Non-Externalized String Literal When enabled, the compiler will issue an error or a warning for non externalized String literal (i.e. non tagged with //$NON-NLS-$). - option id: "org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral" - possible values: { "error", "warning", "ignore" } - default: "ignore" COMPILER / Reporting Usage of 'assert' Identifier When enabled, the compiler will issue an error or a warning whenever 'assert' is used as an identifier (reserved keyword in 1.4) - option id: "org.eclipse.jdt.core.compiler.problem.assertIdentifier" - possible values: { "error", "warning", "ignore" } - default: "ignore" COMPILER / Setting Source Compatibility Mode Specify whether source is 1.3 or 1.4 compatible. From 1.4 on, 'assert' is a keyword reserved for assertion support. Also note, than when toggling to 1.4 mode, the target VM level should be set to "1.4" and the compliance mode should be "1.4". - option id: "org.eclipse.jdt.core.compiler.source" - possible values: { "1.3", "1.4" } - default: "1.3" COMPILER / Setting Compliance Level Select the compliance level for the compiler. In "1.3" mode, source and target settings should not go beyond "1.3" level. - option id: "org.eclipse.jdt.core.compiler.compliance" - possible values: { "1.3", "1.4" } - default: "1.3" COMPILER / Maximum number of problems reported per compilation unit Specify the maximum number of problems reported on each compilation unit. - option id: "org.eclipse.jdt.core.compiler.maxProblemPerUnit" - possible values: " " where is zero or a positive integer (if zero then all problems are reported). - default: "100" BUILDER / Specifying Filters for Resource Copying Control Allow to specify some filters to control the resource copy process. - option id: "org.eclipse.jdt.core.builder.resourceCopyExclusionFilter" - possible values: { " [, ]* } where is a file name pattern (only * wild-cards allowed) or the name of a folder which ends with '/' - default: "" BUILDER / Abort if Invalid Classpath Allow to toggle the builder to abort if the classpath is invalid - option id: "org.eclipse.jdt.core.builder.invalidClasspath" - possible values: { "abort", "ignore" } - default: "ignore" JAVACORE / Computing Project Build Order Indicate whether JavaCore should enforce the project build order to be based on the classpath prerequisite chain. When requesting to compute, this takes over the platform default order (based on project references). - option id: "org.eclipse.jdt.core.computeJavaBuildOrder" - possible values: { "compute", "ignore" } - default: "ignore" JAVACORE / Specify Default Source Encoding Format Get the encoding format for compiled sources. This setting is read-only, it is equivalent to 'ResourcesPlugin.getEncoding()'. - option id: "org.eclipse.jdt.core.encoding" - possible values: { any of the supported encoding name}. - default: FORMATTER / Inserting New Line Before Opening Brace When Insert, a new line is inserted before an opening brace, otherwise nothing is inserted - option id: "org.eclipse.jdt.core.formatter.newline.openingBrace" - possible values: { "insert", "do not insert" } - default: "do not insert" FORMATTER / Inserting New Line Inside Control Statement When Insert, a new line is inserted between } and following else, catch, finally - option id: "org.eclipse.jdt.core.formatter.newline.controlStatement" - possible values: { "insert", "do not insert" } - default: "do not insert" FORMATTER / Clearing Blank Lines When Clear all, all blank lines are removed. When Preserve one, only one is kept and all others removed. - option id: "org.eclipse.jdt.core.formatter.newline.clearAll" - possible values: { "clear all", "preserve one" } - default: "preserve one" FORMATTER / Inserting New Line Between Else/If When Insert, a blank line is inserted between an else and an if when they are contiguous. When choosing to not insert, else-if will be kept on the same line when possible. - option id: "org.eclipse.jdt.core.formatter.newline.elseIf" - possible values: { "insert", "do not insert" } - default: "do not insert" FORMATTER / Inserting New Line In Empty Block When insert, a line break is inserted between contiguous { and }, if } is not followed by a keyword. - option id: "org.eclipse.jdt.core.formatter.newline.emptyBlock" - possible values: { "insert", "do not insert" } - default: "insert" FORMATTER / Splitting Lines Exceeding Length Enable splitting of long lines (exceeding the configurable length). Length of 0 will disable line splitting - option id: "org.eclipse.jdt.core.formatter.lineSplit" - possible values: " ", where n is zero or a positive integer - default: "80" FORMATTER / Compacting Assignment Assignments can be formatted asymmetrically, e.g. 'int x= 2;', when Normal, a space is inserted before the assignment operator - option id: "org.eclipse.jdt.core.formatter.style.assignment" - possible values: { "compact", "normal" } - default: "normal" FORMATTER / Defining Indentation Character Either choose to indent with tab characters or spaces - option id: "org.eclipse.jdt.core.formatter.tabulation.char" - possible values: { "tab", "space" } - default: "tab" FORMATTER / Defining Space Indentation Length When using spaces, set the amount of space characters to use for each indentation mark. - option id: "org.eclipse.jdt.core.formatter.tabulation.size" - possible values: " ", where n is a positive integer - default: "4" CODEASSIST / Activate Visibility Sensitive Completion When active, completion doesn't show that you can not see (e.g. you can not see private methods of a super class). - option id: "org.eclipse.jdt.core.codeComplete.visibilityCheck" - possible values: { "enabled", "disabled" } - default: "disabled" CODEASSIST / Automatic Qualification of Implicit Members When active, completion automatically qualifies completion on implicit field references and message expressions. - option id: "org.eclipse.jdt.core.codeComplete.forceImplicitQualification" - possible values: { "enabled", "disabled" } - default: "disabled"
String
; value type: String
)setOptions(java.util.Hashtable)
public static JavaCore getJavaCore()
(JavaCore) getPlugin()
.
public static String getOption(String optionName)
(String)JavaCore.getOptions().get(optionName)
Note that it may answer null
if this option does not exist.
For a complete description of the configurable options, see getDefaultOptions
.
optionName
- the name of an option
getDefaultOptions()
public static Hashtable getOptions()
For a complete description of the configurable options, see getDefaultOptions
.
String
; value type: String
)getDefaultOptions()
public static Plugin getPlugin()
public static IClasspathEntry getResolvedClasspathEntry(IClasspathEntry entry)
null
null
Variable source attachment path and root path are also resolved and recorded in the resulting classpath entry.
NOTE: This helper method does not handle classpath containers, for which should rather be used
JavaCore#getResolvedClasspathContainer(IPath, IJavaProject)
.
entry
- the given variable entry
null
if the given variable entry could not be resolved to a valid classpath entrypublic static IPath getResolvedVariablePath(IPath variablePath)
variablePath
- the given variable path
null
if nonepublic static IWorkingCopy[] getSharedWorkingCopies(IBufferFactory factory)
IWorkingCopy##getSharedWorkingCopy
.
factory
- the given buffer factory
IWorkingCopy
protected void initializeDefaultPluginPreferences()
initializeDefaultPluginPreferences
in class Plugin
public static boolean isReferencedBy(IJavaElement element, IMarker marker) throws CoreException
element
- the elementmarker
- the marker
true
if the marker references the element, false otherwise
CoreException
- if the IMarker.getAttribute
on the marker failspublic static boolean isReferencedBy(IJavaElement element, IMarkerDelta markerDelta) throws CoreException
element
- the elementmarkerDelta
- the marker delta
true
if the marker delta references the element
CoreException
- if the IMarkerDelta.getAttribute
on the marker delta failspublic static IClasspathEntry newContainerEntry(IPath containerPath)
CPE_CONTAINER
for the given path. The path of the container will be used during resolution so as to map this
container entry to a set of other classpath entries the container is acting for.
A container entry allows to express indirect references to a set of libraries, projects and variable entries,
which can be interpreted differently for each Java project where it is used.
A classpath container entry can be resolved using JavaCore#getResolvedClasspathContainer
,
and updated with JavaCore#classpathContainerChanged
A container is exclusively resolved by a ClasspathContainerInitializer
registered onto the
extension point "org.eclipse.jdt.core.classpathContainerInitializer".
A container path must be formed of at least one segment, where:
Example of an ClasspathContainerInitializer for a classpath container denoting a default JDK container:
containerEntry = JavaCore.newContainerEntry(new Path("MyProvidedJDK/default"));
Note that this operation does not attempt to validate classpath containers
or access the resources at the given paths.
The resulting entry is not exported to dependent projects. This method is equivalent to
newContainerEntry(-,false)
.
containerPath
- the path identifying the container, it must be formed of two
segments
getClasspathContainer(IPath, IJavaProject)
,
newContainerEntry(IPath, boolean)
public static IClasspathEntry newContainerEntry(IPath containerPath, boolean isExported)
CPE_CONTAINER
for the given path. The path of the container will be used during resolution so as to map this
container entry to a set of other classpath entries the container is acting for.
A container entry allows to express indirect references to a set of libraries, projects and variable entries,
which can be interpreted differently for each Java project where it is used.
A classpath container entry can be resolved using JavaCore#getResolvedClasspathContainer
,
and updated with JavaCore#classpathContainerChanged
A container is exclusively resolved by a ClasspathContainerInitializer
registered onto the
extension point "org.eclipse.jdt.core.classpathContainerInitializer".
A container path must be formed of at least one segment, where:
Example of an ClasspathContainerInitializer for a classpath container denoting a default JDK container:
containerEntry = JavaCore.newContainerEntry(new Path("MyProvidedJDK/default"));
Note that this operation does not attempt to validate classpath containers
or access the resources at the given paths.
containerPath
- the path identifying the container, it must be formed of at least
one segment (ID+hints)isExported
- a boolean indicating whether this entry is contributed to dependent
projects in addition to the output location
getClasspathContainer(IPath, IJavaProject)
,
setClasspathContainer(IPath, IJavaProject[], IClasspathContainer[], IProgressMonitor)
,
newContainerEntry(IPath, boolean)
public static IClasspathEntry newLibraryEntry(IPath path, IPath sourceAttachmentPath, IPath sourceAttachmentRootPath)
CPE_LIBRARY
for the
JAR or folder identified by the given absolute path. This specifies that all package fragments
within the root will have children of type IClassFile
.
A library entry is used to denote a prerequisite JAR or root folder containing binaries. The target JAR or folder can either be defined internally to the workspace (absolute path relative to the workspace root) or externally to the workspace (absolute path in the file system).
e.g. Here are some examples of binary path usage
"c:/jdk1.2.2/jre/lib/rt.jar"
- reference to an external JAR "/Project/someLib.jar"
- reference to an internal JAR "c:/classes/"
- reference to an external binary folder
The resulting entry is not exported to dependent projects. This method is equivalent to
newLibraryEntry(-,-,-,false)
.
path
- the absolute path of the binary archivesourceAttachmentPath
- the absolute path of the corresponding source archive,
or null
if nonesourceAttachmentRootPath
- the location of the root within the source archive
or null
if archivePath
is also null
newLibraryEntry(IPath, IPath, IPath, boolean)
public static IClasspathEntry newLibraryEntry(IPath path, IPath sourceAttachmentPath, IPath sourceAttachmentRootPath, boolean isExported)
CPE_LIBRARY
for the JAR or folder
identified by the given absolute path. This specifies that all package fragments within the root
will have children of type IClassFile
.
A library entry is used to denote a prerequisite JAR or root folder containing binaries. The target JAR or folder can either be defined internally to the workspace (absolute path relative to the workspace root) or externally to the workspace (absolute path in the file system).
e.g. Here are some examples of binary path usage
"c:/jdk1.2.2/jre/lib/rt.jar"
- reference to an external JAR "/Project/someLib.jar"
- reference to an internal JAR "c:/classes/"
- reference to an external binary folder
path
- the absolute path of the binary archivesourceAttachmentPath
- the absolute path of the corresponding source archive,
or null
if nonesourceAttachmentRootPath
- the location of the root within the source archive
or null
if archivePath
is also null
isExported
- indicates whether this entry is contributed to dependent
projects in addition to the output location
public static IClasspathEntry newProjectEntry(IPath path)
CPE_PROJECT
for the project identified by the given absolute path.
A project entry is used to denote a prerequisite project on a classpath. The referenced project will be contributed as a whole, either as sources (in the Java Model, it contributes all its package fragment roots) or as binaries (when building, it contributes its whole output location).
A project reference allows to indirect through another project, independently from its internal layout.
The prerequisite project is referred to using an absolute path relative to the workspace root.
The resulting entry is not exported to dependent projects. This method is equivalent to
newProjectEntry(_,false)
.
path
- the absolute path of the binary archive
newProjectEntry(IPath, boolean)
public static IClasspathEntry newProjectEntry(IPath path, boolean isExported)
CPE_PROJECT
for the project identified by the given absolute path.
A project entry is used to denote a prerequisite project on a classpath. The referenced project will be contributed as a whole, either as sources (in the Java Model, it contributes all its package fragment roots) or as binaries (when building, it contributes its whole output location).
A project reference allows to indirect through another project, independently from its internal layout.
The prerequisite project is referred to using an absolute path relative to the workspace root.
path
- the absolute path of the prerequisite projectisExported
- indicates whether this entry is contributed to dependent
projects in addition to the output location
public static IRegion newRegion()
public static IClasspathEntry newSourceEntry(IPath path)
CPE_SOURCE
for the project's source folder
identified by the given absolute path. This specifies that all package fragments within the root will
have children of type ICompilationUnit
.
The source folder is referred to using an absolute path relative to the workspace root, e.g. "/Project/src"
.
A source entry is used to set up the internal source layout of a project, and cannot be used out of the context of the containing project (a source entry "Proj1/src" cannot be used on the classpath of Proj2).
A particular source entry cannot be exported to other projects. All sources/binaries inside a project are
contributed as a whole through a project entry (see JavaCore.newProjectEntry
).
path
- the absolute path of a source folder
public static IClasspathEntry newVariableEntry(IPath variablePath, IPath variableSourceAttachmentPath, IPath sourceAttachmentRootPath)
CPE_VARIABLE
for the given path. The first segment of the path is the name of a classpath variable.
The trailing segments of the path will be appended to resolved variable path.
A variable entry allows to express indirect references on a classpath to other projects or libraries, depending on what the classpath variable is referring.
It is possible to register an automatic initializer (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.
e.g. Here are some examples of variable path usage
JDTCORE
is
bound to "c:/jars/jdtcore.jar". The resolved classpath entry is denoting the library "c:\jars\jdtcore.jar"JDTCORE
is
bound to "/Project_JDTCORE". The resolved classpath entry is denoting the project "/Project_JDTCORE"PLUGINS
is bound to "c:/eclipse/plugins". The resolved classpath entry is denoting the library "c:/eclipse/plugins/com.example/example.jar"
The resulting entry is not exported to dependent projects. This method is equivalent to
newVariableEntry(-,-,-,false)
.
variablePath
- the path of the binary archive; first segment is the
name of a classpath variablevariableSourceAttachmentPath
- the path of the corresponding source archive,
or null
if none; if present, the first segment is the
name of a classpath variable (not necessarily the same variable
as the one that begins variablePath
)sourceAttachmentRootPath
- the location of the root within the source archive
or null
if archivePath
is also null
newVariableEntry(IPath, IPath, IPath, boolean)
public static IClasspathEntry newVariableEntry(IPath variablePath, IPath variableSourceAttachmentPath, IPath sourceAttachmentRootPath, boolean isExported)
CPE_VARIABLE
for the given path. The first segment of the path is the name of a classpath variable.
The trailing segments of the path will be appended to resolved variable path.
A variable entry allows to express indirect references on a classpath to other projects or libraries, depending on what the classpath variable is referring.
It is possible to register an automatic initializer (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.
e.g. Here are some examples of variable path usage
JDTCORE
is
bound to "c:/jars/jdtcore.jar". The resolved classpath entry is denoting the library "c:\jars\jdtcore.jar"JDTCORE
is
bound to "/Project_JDTCORE". The resolved classpath entry is denoting the project "/Project_JDTCORE"PLUGINS
is bound to "c:/eclipse/plugins". The resolved classpath entry is denoting the library "c:/eclipse/plugins/com.example/example.jar"
variablePath
- the path of the binary archive; first segment is the
name of a classpath variablevariableSourceAttachmentPath
- the path of the corresponding source archive,
or null
if none; if present, the first segment is the
name of a classpath variable (not necessarily the same variable
as the one that begins variablePath
)sourceAttachmentRootPath
- the location of the root within the source archive
or null
if archivePath
is also null
isExported
- indicates whether this entry is contributed to dependent
projects in addition to the output location
public static void removeClasspathVariable(String variableName)
This functionality cannot be used while the resource tree is locked.
Classpath variable values are persisted locally to the workspace, and are preserved from session to session.
variableName
- the name of the classpath variablesetClasspathVariable(java.lang.String, org.eclipse.core.runtime.IPath)
public static void removeClasspathVariable(String variableName, IProgressMonitor monitor)
This functionality cannot be used while the resource tree is locked.
Classpath variable values are persisted locally to the workspace, and are preserved from session to session.
variableName
- the name of the classpath variablemonitor
- the progress monitor to report progresssetClasspathVariable(java.lang.String, org.eclipse.core.runtime.IPath)
public static void removeElementChangedListener(IElementChangedListener listener)
listener
- the listenerpublic static void setClasspathContainer(IPath containerPath, IJavaProject[] affectedProjects, IClasspathContainer[] respectiveContainers, IProgressMonitor monitor) throws JavaModelException
IClasspathContainer
).
This API must be invoked whenever changes in container need to be reflected onto the JavaModel.
Containers can have distinct values in different projects, therefore this API considers a
set of projects with their respective containers.
containerPath
is the path under which these values can be referenced through
container classpath entries (IClasspathEntry#CPE_CONTAINER
). A container path
is formed by a first ID segment followed with extra segments, which can be used as additional hints
for the resolution. The container ID is used to identify a ClasspathContainerInitializer
registered on the extension point "org.eclipse.jdt.core.classpathContainerInitializer".
There is no assumption that each individual container value passed in argument
(respectiveContainers
) must answer the exact same path when requested
IClasspathContainer#getPath
.
Indeed, the containerPath is just an indication for resolving it to an actual container object. It can be
delegated to a ClasspathContainerInitializer
, which can be activated through the extension
point "org.eclipse.jdt.core.ClasspathContainerInitializer").
In reaction to changing container values, the JavaModel will be updated to reflect the new state of the updated container.
This functionality cannot be used while the resource tree is locked.
Classpath container values are persisted locally to the workspace, but
are not preserved from a session to another. It is thus highly recommended to register a
ClasspathContainerInitializer
for each referenced container
(through the extension point "org.eclipse.jdt.core.ClasspathContainerInitializer").
containerPath
- - the name of the container reference, which is being updatedaffectedProjects
- - the set of projects for which this container is being boundrespectiveContainers
- - the set of respective containers for the affected projectsmonitor
- a monitor to report progress
JavaModelException
ClasspathContainerInitializer
,
getClasspathContainer(IPath, IJavaProject)
,
IClasspathContainer
public static void setClasspathVariable(String variableName, IPath path) throws JavaModelException
This functionality cannot be used while the resource tree is locked.
Classpath variable values are persisted locally to the workspace, and are preserved from session to session.
variableName
- the name of the classpath variablepath
- the path
JavaModelException
getClasspathVariable(java.lang.String)
public static void setClasspathVariable(String variableName, IPath path, IProgressMonitor monitor) throws JavaModelException
This functionality cannot be used while the resource tree is locked.
Classpath variable values are persisted locally to the workspace, and are preserved from session to session.
Updating a variable with the same value has no effect.
variableName
- the name of the classpath variablepath
- the pathmonitor
- a monitor to report progress
JavaModelException
getClasspathVariable(java.lang.String)
public static void setClasspathVariables(String[] variableNames, IPath[] paths, IProgressMonitor monitor) throws JavaModelException
This functionality cannot be used while the resource tree is locked.
Classpath variable values are persisted locally to the workspace, and are preserved from session to session.
Updating a variable with the same value has no effect.
variableNames
- an array of names for the updated classpath variablespaths
- an array of path updates for the modified classpath variables (null
meaning that the corresponding value will be removedmonitor
- a monitor to report progress
JavaModelException
getClasspathVariable(java.lang.String)
public void setInitializationData(IConfigurationElement cfig, String propertyName, Object data) throws CoreException
setInitializationData
in interface IExecutableExtension
CoreException
public static void setOptions(Hashtable newOptions)
For a complete description of the configurable options, see getDefaultOptions
.
newOptions
- the new options (key type: String
; value type: String
),
or null
to reset all options to their default valuesgetDefaultOptions()
public void shutdown()
De-registers the JavaModelManager as a resource changed listener and save participant.
shutdown
in class Plugin
Plugin.shutdown()
public void startup()
Registers the JavaModelManager as a resource changed listener and save participant. Starts the background indexing, and restore saved classpath variable values.
startup
in class Plugin
Plugin.startup()
|
Eclipse JDT 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |