Eclipse JDT
Release 3.0

org.eclipse.jdt.core
Class JavaCore

java.lang.Object
  extended byorg.eclipse.core.runtime.Plugin
      extended byorg.eclipse.jdt.core.JavaCore
All Implemented Interfaces:
BundleActivator

public final class JavaCore
extends org.eclipse.core.runtime.Plugin

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 CLEAN
          Possible configurable option value.
static String CLEAR_ALL
          Possible configurable option value.
static String CODEASSIST_ARGUMENT_PREFIXES
          Possible configurable option ID.
static String CODEASSIST_ARGUMENT_SUFFIXES
          Possible configurable option ID.
static String CODEASSIST_FIELD_PREFIXES
          Possible configurable option ID.
static String CODEASSIST_FIELD_SUFFIXES
          Possible configurable option ID.
static String CODEASSIST_IMPLICIT_QUALIFICATION
          Possible configurable option ID.
static String CODEASSIST_LOCAL_PREFIXES
          Possible configurable option ID.
static String CODEASSIST_LOCAL_SUFFIXES
          Possible configurable option ID.
static String CODEASSIST_STATIC_FIELD_PREFIXES
          Possible configurable option ID.
static String CODEASSIST_STATIC_FIELD_SUFFIXES
          Possible configurable option ID.
static String CODEASSIST_VISIBILITY_CHECK
          Possible configurable option ID.
static String COMPACT
          Possible configurable option value.
static String COMPILER_CODEGEN_INLINE_JSR_BYTECODE
          Possible configurable option ID.
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_DOC_COMMENT_SUPPORT
          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_BOOLEAN_METHOD_THROWING_EXCEPTION
          Possible configurable option ID.
static String COMPILER_PB_CHAR_ARRAY_IN_STRING_CONCATENATION
          Possible configurable option ID.
static String COMPILER_PB_DEPRECATION
          Possible configurable option ID.
static String COMPILER_PB_DEPRECATION_IN_DEPRECATED_CODE
          Possible configurable option ID.
static String COMPILER_PB_DEPRECATION_WHEN_OVERRIDING_DEPRECATED_METHOD
          Possible configurable option ID.
static String COMPILER_PB_EMPTY_STATEMENT
          Possible configurable option ID.
static String COMPILER_PB_FIELD_HIDING
          Possible configurable option ID.
static String COMPILER_PB_FINALLY_BLOCK_NOT_COMPLETING
          Possible configurable option ID.
static String COMPILER_PB_HIDDEN_CATCH_BLOCK
          Possible configurable option ID.
static String COMPILER_PB_INCOMPATIBLE_NON_INHERITED_INTERFACE_METHOD
          Possible configurable option ID.
static String COMPILER_PB_INDIRECT_STATIC_ACCESS
          Possible configurable option ID.
static String COMPILER_PB_INVALID_IMPORT
          Deprecated. - discontinued since turning off would violate language specs
static String COMPILER_PB_INVALID_JAVADOC
          Possible configurable option ID.
static String COMPILER_PB_INVALID_JAVADOC_TAGS
          Possible configurable option ID.
static String COMPILER_PB_INVALID_JAVADOC_TAGS_VISIBILITY
          Possible configurable option ID.
static String COMPILER_PB_LOCAL_VARIABLE_HIDING
          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_MISSING_JAVADOC_COMMENTS
          Possible configurable option ID.
static String COMPILER_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING
          Possible configurable option ID.
static String COMPILER_PB_MISSING_JAVADOC_COMMENTS_VISIBILITY
          Possible configurable option ID.
static String COMPILER_PB_MISSING_JAVADOC_TAGS
          Possible configurable option ID.
static String COMPILER_PB_MISSING_JAVADOC_TAGS_OVERRIDING
          Possible configurable option ID.
static String COMPILER_PB_MISSING_JAVADOC_TAGS_VISIBILITY
          Possible configurable option ID.
static String COMPILER_PB_NO_EFFECT_ASSIGNMENT
          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_POSSIBLE_ACCIDENTAL_BOOLEAN_ASSIGNMENT
          Possible configurable option ID.
static String COMPILER_PB_SPECIAL_PARAMETER_HIDING_FIELD
          Possible configurable option ID.
static String COMPILER_PB_STATIC_ACCESS_RECEIVER
          Possible configurable option ID.
static String COMPILER_PB_SYNTHETIC_ACCESS_EMULATION
          Possible configurable option ID.
static String COMPILER_PB_UNDOCUMENTED_EMPTY_BLOCK
          Possible configurable option ID.
static String COMPILER_PB_UNNECESSARY_ELSE
          Possible configurable option ID.
static String COMPILER_PB_UNNECESSARY_TYPE_CHECK
          Possible configurable option ID.
static String COMPILER_PB_UNQUALIFIED_FIELD_ACCESS
          Possible configurable option ID.
static String COMPILER_PB_UNREACHABLE_CODE
          Deprecated. - discontinued since turning off would violate language specs
static String COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION
          Possible configurable option ID.
static String COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_WHEN_OVERRIDING
          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_PB_UNUSED_PARAMETER_WHEN_IMPLEMENTING_ABSTRACT
          Possible configurable option ID.
static String COMPILER_PB_UNUSED_PARAMETER_WHEN_OVERRIDING_CONCRETE
          Possible configurable option ID.
static String COMPILER_PB_UNUSED_PRIVATE_MEMBER
          Possible configurable option ID.
static String COMPILER_SOURCE
          Possible configurable option ID.
static String COMPILER_SOURCE_FILE_ATTR
          Possible configurable option ID.
static String COMPILER_TASK_CASE_SENSITIVE
          Possible configurable option ID.
static String COMPILER_TASK_PRIORITIES
          Possible configurable option ID.
static String COMPILER_TASK_PRIORITY_HIGH
          Possible configurable option value for COMPILER_TASK_PRIORITIES.
static String COMPILER_TASK_PRIORITY_LOW
          Possible configurable option value for COMPILER_TASK_PRIORITIES.
static String COMPILER_TASK_PRIORITY_NORMAL
          Possible configurable option value for COMPILER_TASK_PRIORITIES.
static String COMPILER_TASK_TAGS
          Possible configurable option ID.
static String COMPUTE
          Possible configurable option value.
static String CORE_CIRCULAR_CLASSPATH
          Possible configurable option ID.
static String CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS
          Possible configurable option ID.
static String CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS
          Possible configurable option ID.
static String CORE_ENCODING
          Possible configurable option ID.
static String CORE_INCOMPATIBLE_JDK_LEVEL
          Possible configurable option ID.
static String CORE_INCOMPLETE_CLASSPATH
          Possible configurable option ID.
static String CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER
          Possible configurable option ID.
static String CORE_JAVA_BUILD_DUPLICATE_RESOURCE
          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 DEFAULT
          Possible configurable option value.
static String DEFAULT_TASK_PRIORITIES
          Default task priority
static String DEFAULT_TASK_PRIORITY
          Deprecated. - should use #DEFAULT_TASK_PRIORITIES instead
static String DEFAULT_TASK_TAG
          Deprecated. - should use #DEFAULT_TASK_TAGS instead
static String DEFAULT_TASK_TAGS
          Default task tag
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
          Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE instead
static String FORMATTER_COMPACT_ASSIGNMENT
          Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_ASSIGNMENT_OPERATOR instead
static String FORMATTER_LINE_SPLIT
          Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT instead
static String FORMATTER_NEWLINE_CONTROL
          Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_CONTROL_STATEMENTS instead.
static String FORMATTER_NEWLINE_ELSE_IF
          Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_COMPACT_ELSE_IF instead
static String FORMATTER_NEWLINE_EMPTY_BLOCK
          Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_BLOCK instead
static String FORMATTER_NEWLINE_OPENING_BRACE
          Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ANONYMOUS_TYPE_DECLARATION, DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_BLOCK, DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_CONSTRUCTOR_DECLARATION, DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION, DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_SWITCH, DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION instead
static String FORMATTER_SPACE_CASTEXPRESSION
          Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_CLOSING_PAREN_IN_CAST instead
static String FORMATTER_TAB_CHAR
          Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR instead
static String FORMATTER_TAB_SIZE
          Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE instead
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 PRIVATE
          Possible configurable option value.
static String PROTECTED
          Possible configurable option value.
static String PUBLIC
          Possible configurable option value.
static String SPACE
          Possible configurable option value.
static String TAB
          Possible configurable option value.
static String USER_LIBRARY_CONTAINER_ID
          Name of the User Library Container id.
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 VERSION_1_5
          Possible configurable option value.
static String WARNING
          Possible configurable option value.
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
JavaCore()
          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.
static void addPreProcessingResourceChangedListener(org.eclipse.core.resources.IResourceChangeListener listener)
          Adds the given listener for POST_CHANGE resource change events to the Java core.
 void configureJavaElementMarker(org.eclipse.core.resources.IMarker marker, IJavaElement element)
          Configures the given marker for the given Java element.
static IJavaElement create(org.eclipse.core.resources.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(org.eclipse.core.resources.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(org.eclipse.core.resources.IProject project)
          Returns the Java project corresponding to the given project.
static IJavaElement create(org.eclipse.core.resources.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(org.eclipse.core.resources.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 IJavaElement create(String handleIdentifier, WorkingCopyOwner owner)
          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(org.eclipse.core.resources.IFile file)
          Creates and returns a class file element for the given .class file.
static ICompilationUnit createCompilationUnitFrom(org.eclipse.core.resources.IFile file)
          Creates and returns a compilation unit element for the given .java file.
static IPackageFragmentRoot createJarPackageFragmentRootFrom(org.eclipse.core.resources.IFile file)
          Creates and returns a handle for the given JAR file.
static IClasspathContainer getClasspathContainer(org.eclipse.core.runtime.IPath containerPath, IJavaProject project)
          Answers the project specific value for a given classpath container.
static ClasspathContainerInitializer getClasspathContainerInitializer(String containerID)
          Helper method finding the classpath container initializer registered for a given classpath container ID or null if none was found while iterating over the contributions to extension point to the extension point "org.eclipse.jdt.core.classpathContainerInitializer".
static org.eclipse.core.runtime.IPath getClasspathVariable(String variableName)
          Returns the path held in the given classpath variable.
static ClasspathVariableInitializer getClasspathVariableInitializer(String variable)
          Helper method finding the classpath variable initializer registered for a given classpath variable name or null if none was found while iterating over the contributions to extension point to the extension point "org.eclipse.jdt.core.classpathVariableInitializer".
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 String getEncoding()
          Returns the workspace root default charset encoding.
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 org.eclipse.core.runtime.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 org.eclipse.core.runtime.IPath getResolvedVariablePath(org.eclipse.core.runtime.IPath variablePath)
          Resolve a variable path (helper method).
static IWorkingCopy[] getSharedWorkingCopies(IBufferFactory factory)
          Deprecated. - should use #getWorkingCopies(WorkingCopyOwner) instead
static String[] getUserLibraryNames()
          Returns the names of all defined user libraries.
static ICompilationUnit[] getWorkingCopies(WorkingCopyOwner owner)
          Returns the working copies that have the given owner.
protected  void initializeDefaultPluginPreferences()
          Initializes the default preferences settings for this plug-in.
static boolean isReferencedBy(IJavaElement element, org.eclipse.core.resources.IMarker marker)
          Returns whether the given marker references the given Java element.
static boolean isReferencedBy(IJavaElement element, org.eclipse.core.resources.IMarkerDelta markerDelta)
          Returns whether the given marker delta references the given Java element.
static IClasspathEntry newContainerEntry(org.eclipse.core.runtime.IPath containerPath)
          Creates and returns a new classpath entry of kind CPE_CONTAINER for the given path.
static IClasspathEntry newContainerEntry(org.eclipse.core.runtime.IPath containerPath, boolean isExported)
          Creates and returns a new classpath entry of kind CPE_CONTAINER for the given path.
static IClasspathEntry newLibraryEntry(org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IPath sourceAttachmentPath, org.eclipse.core.runtime.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(org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IPath sourceAttachmentPath, org.eclipse.core.runtime.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(org.eclipse.core.runtime.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(org.eclipse.core.runtime.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(org.eclipse.core.runtime.IPath path)
          Creates and returns a new classpath entry of kind CPE_SOURCE for all files in the project's source folder identified by the given absolute workspace-relative path.
static IClasspathEntry newSourceEntry(org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IPath[] exclusionPatterns)
          Creates and returns a new classpath entry of kind CPE_SOURCE for the project's source folder identified by the given absolute workspace-relative path but excluding all source files with paths matching any of the given patterns.
static IClasspathEntry newSourceEntry(org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IPath[] exclusionPatterns, org.eclipse.core.runtime.IPath specificOutputLocation)
          Creates and returns a new classpath entry of kind CPE_SOURCE for the project's source folder identified by the given absolute workspace-relative path but excluding all source files with paths matching any of the given patterns, and associated with a specific output location (that is, ".class" files are not going to the project default output location).
static IClasspathEntry newSourceEntry(org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IPath[] inclusionPatterns, org.eclipse.core.runtime.IPath[] exclusionPatterns, org.eclipse.core.runtime.IPath specificOutputLocation)
          Creates and returns a new classpath entry of kind CPE_SOURCE for the project's source folder identified by the given absolute workspace-relative path using the given inclusion and exclusion patterns to determine which source files are included, and the given output path to control the output location of generated files.
static IClasspathEntry newVariableEntry(org.eclipse.core.runtime.IPath variablePath, org.eclipse.core.runtime.IPath variableSourceAttachmentPath, org.eclipse.core.runtime.IPath sourceAttachmentRootPath)
          Creates and returns a new non-exported classpath entry of kind CPE_VARIABLE for the given path.
static IClasspathEntry newVariableEntry(org.eclipse.core.runtime.IPath variablePath, org.eclipse.core.runtime.IPath variableSourceAttachmentPath, org.eclipse.core.runtime.IPath variableSourceAttachmentRootPath, 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, org.eclipse.core.runtime.IProgressMonitor monitor)
          Removed the given classpath variable.
static void removeElementChangedListener(IElementChangedListener listener)
          Removes the given element changed listener.
static void removePreProcessingResourceChangedListener(org.eclipse.core.resources.IResourceChangeListener listener)
          Removes the given pre-processing resource changed listener.
static void run(org.eclipse.core.resources.IWorkspaceRunnable action, org.eclipse.core.runtime.IProgressMonitor monitor)
          Runs the given action as an atomic Java model operation.
static void run(org.eclipse.core.resources.IWorkspaceRunnable action, org.eclipse.core.runtime.jobs.ISchedulingRule rule, org.eclipse.core.runtime.IProgressMonitor monitor)
          Runs the given action as an atomic Java model operation.
static void setClasspathContainer(org.eclipse.core.runtime.IPath containerPath, IJavaProject[] affectedProjects, IClasspathContainer[] respectiveContainers, org.eclipse.core.runtime.IProgressMonitor monitor)
          Bind a container reference path to some actual containers (IClasspathContainer).
static void setClasspathVariable(String variableName, org.eclipse.core.runtime.IPath path)
          Deprecated. - use API with IProgressMonitor
static void setClasspathVariable(String variableName, org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IProgressMonitor monitor)
          Sets the value of the given classpath variable.
static void setClasspathVariables(String[] variableNames, org.eclipse.core.runtime.IPath[] paths, org.eclipse.core.runtime.IProgressMonitor monitor)
          Sets the values of all the given classpath variables at once.
static void setOptions(Hashtable newOptions)
          Sets the current table of options.
 void start(BundleContext context)
           
 void stop(BundleContext context)
           
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PLUGIN_ID

public static final String PLUGIN_ID
The plug-in identifier of the Java core support (value "org.eclipse.jdt.core").

See Also:
Constant Field Values

BUILDER_ID

public static final String BUILDER_ID
The identifier for the Java builder (value "org.eclipse.jdt.core.javabuilder").

See Also:
Constant Field Values

MODEL_ID

public static final String MODEL_ID
The identifier for the Java model (value "org.eclipse.jdt.core.javamodel").

See Also:
Constant Field Values

NATURE_ID

public static final String NATURE_ID
The identifier for the Java nature (value "org.eclipse.jdt.core.javanature"). The presence of this nature on a project indicates that it is Java-capable.

See Also:
IProject.hasNature(java.lang.String), Constant Field Values

ATT_HANDLE_ID

protected static final String ATT_HANDLE_ID
Name of the handle id attribute in a Java marker.

See Also:
Constant Field Values

USER_LIBRARY_CONTAINER_ID

public static final String USER_LIBRARY_CONTAINER_ID
Name of the User Library Container id.

Since:
3.0
See Also:
Constant Field Values

COMPILER_LOCAL_VARIABLE_ATTR

public static final String COMPILER_LOCAL_VARIABLE_ATTR
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_LINE_NUMBER_ATTR

public static final String COMPILER_LINE_NUMBER_ATTR
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_SOURCE_FILE_ATTR

public static final String COMPILER_SOURCE_FILE_ATTR
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_CODEGEN_UNUSED_LOCAL

public static final String COMPILER_CODEGEN_UNUSED_LOCAL
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_CODEGEN_TARGET_PLATFORM

public static final String COMPILER_CODEGEN_TARGET_PLATFORM
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_CODEGEN_INLINE_JSR_BYTECODE

public static final String COMPILER_CODEGEN_INLINE_JSR_BYTECODE
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_DOC_COMMENT_SUPPORT

public static final String COMPILER_DOC_COMMENT_SUPPORT
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNREACHABLE_CODE

public static final String COMPILER_PB_UNREACHABLE_CODE
Deprecated. - discontinued since turning off would violate language specs

Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_INVALID_IMPORT

public static final String COMPILER_PB_INVALID_IMPORT
Deprecated. - discontinued since turning off would violate language specs

Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD

public static final String COMPILER_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_METHOD_WITH_CONSTRUCTOR_NAME

public static final String COMPILER_PB_METHOD_WITH_CONSTRUCTOR_NAME
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_DEPRECATION

public static final String COMPILER_PB_DEPRECATION
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_DEPRECATION_IN_DEPRECATED_CODE

public static final String COMPILER_PB_DEPRECATION_IN_DEPRECATED_CODE
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_DEPRECATION_WHEN_OVERRIDING_DEPRECATED_METHOD

public static final String COMPILER_PB_DEPRECATION_WHEN_OVERRIDING_DEPRECATED_METHOD
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_HIDDEN_CATCH_BLOCK

public static final String COMPILER_PB_HIDDEN_CATCH_BLOCK
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNUSED_LOCAL

public static final String COMPILER_PB_UNUSED_LOCAL
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNUSED_PARAMETER

public static final String COMPILER_PB_UNUSED_PARAMETER
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNUSED_PARAMETER_WHEN_IMPLEMENTING_ABSTRACT

public static final String COMPILER_PB_UNUSED_PARAMETER_WHEN_IMPLEMENTING_ABSTRACT
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNUSED_PARAMETER_WHEN_OVERRIDING_CONCRETE

public static final String COMPILER_PB_UNUSED_PARAMETER_WHEN_OVERRIDING_CONCRETE
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNUSED_IMPORT

public static final String COMPILER_PB_UNUSED_IMPORT
Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_SYNTHETIC_ACCESS_EMULATION

public static final String COMPILER_PB_SYNTHETIC_ACCESS_EMULATION
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_NON_NLS_STRING_LITERAL

public static final String COMPILER_PB_NON_NLS_STRING_LITERAL
Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_ASSERT_IDENTIFIER

public static final String COMPILER_PB_ASSERT_IDENTIFIER
Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_STATIC_ACCESS_RECEIVER

public static final String COMPILER_PB_STATIC_ACCESS_RECEIVER
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_INDIRECT_STATIC_ACCESS

public static final String COMPILER_PB_INDIRECT_STATIC_ACCESS
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_NO_EFFECT_ASSIGNMENT

public static final String COMPILER_PB_NO_EFFECT_ASSIGNMENT
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_INCOMPATIBLE_NON_INHERITED_INTERFACE_METHOD

public static final String COMPILER_PB_INCOMPATIBLE_NON_INHERITED_INTERFACE_METHOD
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNUSED_PRIVATE_MEMBER

public static final String COMPILER_PB_UNUSED_PRIVATE_MEMBER
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_LOCAL_VARIABLE_HIDING

public static final String COMPILER_PB_LOCAL_VARIABLE_HIDING
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_SPECIAL_PARAMETER_HIDING_FIELD

public static final String COMPILER_PB_SPECIAL_PARAMETER_HIDING_FIELD
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_FIELD_HIDING

public static final String COMPILER_PB_FIELD_HIDING
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_POSSIBLE_ACCIDENTAL_BOOLEAN_ASSIGNMENT

public static final String COMPILER_PB_POSSIBLE_ACCIDENTAL_BOOLEAN_ASSIGNMENT
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_EMPTY_STATEMENT

public static final String COMPILER_PB_EMPTY_STATEMENT
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_BOOLEAN_METHOD_THROWING_EXCEPTION

public static final String COMPILER_PB_BOOLEAN_METHOD_THROWING_EXCEPTION
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNNECESSARY_TYPE_CHECK

public static final String COMPILER_PB_UNNECESSARY_TYPE_CHECK
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNNECESSARY_ELSE

public static final String COMPILER_PB_UNNECESSARY_ELSE
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNDOCUMENTED_EMPTY_BLOCK

public static final String COMPILER_PB_UNDOCUMENTED_EMPTY_BLOCK
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_FINALLY_BLOCK_NOT_COMPLETING

public static final String COMPILER_PB_FINALLY_BLOCK_NOT_COMPLETING
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION

public static final String COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_WHEN_OVERRIDING

public static final String COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_WHEN_OVERRIDING
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_UNQUALIFIED_FIELD_ACCESS

public static final String COMPILER_PB_UNQUALIFIED_FIELD_ACCESS
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_INVALID_JAVADOC

public static final String COMPILER_PB_INVALID_JAVADOC
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_INVALID_JAVADOC_TAGS

public static final String COMPILER_PB_INVALID_JAVADOC_TAGS
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_INVALID_JAVADOC_TAGS_VISIBILITY

public static final String COMPILER_PB_INVALID_JAVADOC_TAGS_VISIBILITY
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_MISSING_JAVADOC_TAGS

public static final String COMPILER_PB_MISSING_JAVADOC_TAGS
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_MISSING_JAVADOC_TAGS_VISIBILITY

public static final String COMPILER_PB_MISSING_JAVADOC_TAGS_VISIBILITY
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_MISSING_JAVADOC_TAGS_OVERRIDING

public static final String COMPILER_PB_MISSING_JAVADOC_TAGS_OVERRIDING
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_MISSING_JAVADOC_COMMENTS

public static final String COMPILER_PB_MISSING_JAVADOC_COMMENTS
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_MISSING_JAVADOC_COMMENTS_VISIBILITY

public static final String COMPILER_PB_MISSING_JAVADOC_COMMENTS_VISIBILITY
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING

public static final String COMPILER_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_CHAR_ARRAY_IN_STRING_CONCATENATION

public static final String COMPILER_PB_CHAR_ARRAY_IN_STRING_CONCATENATION
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_PB_MAX_PER_UNIT

public static final String COMPILER_PB_MAX_PER_UNIT
Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_SOURCE

public static final String COMPILER_SOURCE
Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_COMPLIANCE

public static final String COMPILER_COMPLIANCE
Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_TASK_PRIORITIES

public static final String COMPILER_TASK_PRIORITIES
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_TASK_PRIORITY_HIGH

public static final String COMPILER_TASK_PRIORITY_HIGH
Possible configurable option value for COMPILER_TASK_PRIORITIES.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_TASK_PRIORITY_LOW

public static final String COMPILER_TASK_PRIORITY_LOW
Possible configurable option value for COMPILER_TASK_PRIORITIES.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_TASK_PRIORITY_NORMAL

public static final String COMPILER_TASK_PRIORITY_NORMAL
Possible configurable option value for COMPILER_TASK_PRIORITIES.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_TASK_TAGS

public static final String COMPILER_TASK_TAGS
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

COMPILER_TASK_CASE_SENSITIVE

public static final String COMPILER_TASK_CASE_SENSITIVE
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

CORE_JAVA_BUILD_ORDER

public static final String CORE_JAVA_BUILD_ORDER
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

CORE_JAVA_BUILD_RESOURCE_COPY_FILTER

public static final String CORE_JAVA_BUILD_RESOURCE_COPY_FILTER
Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

CORE_JAVA_BUILD_DUPLICATE_RESOURCE

public static final String CORE_JAVA_BUILD_DUPLICATE_RESOURCE
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER

public static final String CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CORE_INCOMPLETE_CLASSPATH

public static final String CORE_INCOMPLETE_CLASSPATH
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CORE_CIRCULAR_CLASSPATH

public static final String CORE_CIRCULAR_CLASSPATH
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CORE_INCOMPATIBLE_JDK_LEVEL

public static final String CORE_INCOMPATIBLE_JDK_LEVEL
Possible configurable option ID.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

CORE_JAVA_BUILD_INVALID_CLASSPATH

public static final String CORE_JAVA_BUILD_INVALID_CLASSPATH
Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

CORE_ENCODING

public static final String CORE_ENCODING
Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS

public static final String CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS

public static final String CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

DEFAULT_TASK_TAG

public static final String DEFAULT_TASK_TAG
Deprecated. - should use #DEFAULT_TASK_TAGS instead

Default task tag

Since:
2.1
See Also:
Constant Field Values

DEFAULT_TASK_PRIORITY

public static final String DEFAULT_TASK_PRIORITY
Deprecated. - should use #DEFAULT_TASK_PRIORITIES instead

Default task priority

Since:
2.1
See Also:
Constant Field Values

DEFAULT_TASK_TAGS

public static final String DEFAULT_TASK_TAGS
Default task tag

Since:
3.0
See Also:
Constant Field Values

DEFAULT_TASK_PRIORITIES

public static final String DEFAULT_TASK_PRIORITIES
Default task priority

Since:
3.0
See Also:
Constant Field Values

FORMATTER_NEWLINE_OPENING_BRACE

public static final String FORMATTER_NEWLINE_OPENING_BRACE
Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ANONYMOUS_TYPE_DECLARATION, DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_BLOCK, DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_CONSTRUCTOR_DECLARATION, DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION, DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_SWITCH, DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION instead

Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

FORMATTER_NEWLINE_CONTROL

public static final String FORMATTER_NEWLINE_CONTROL
Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_CONTROL_STATEMENTS instead.

Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

FORMATTER_NEWLINE_ELSE_IF

public static final String FORMATTER_NEWLINE_ELSE_IF
Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_COMPACT_ELSE_IF instead

Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

FORMATTER_NEWLINE_EMPTY_BLOCK

public static final String FORMATTER_NEWLINE_EMPTY_BLOCK
Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_BLOCK instead

Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

FORMATTER_CLEAR_BLANK_LINES

public static final String FORMATTER_CLEAR_BLANK_LINES
Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE instead

Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

FORMATTER_LINE_SPLIT

public static final String FORMATTER_LINE_SPLIT
Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT instead

Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

FORMATTER_COMPACT_ASSIGNMENT

public static final String FORMATTER_COMPACT_ASSIGNMENT
Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_ASSIGNMENT_OPERATOR instead

Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

FORMATTER_TAB_CHAR

public static final String FORMATTER_TAB_CHAR
Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR instead

Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

FORMATTER_TAB_SIZE

public static final String FORMATTER_TAB_SIZE
Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE instead

Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

FORMATTER_SPACE_CASTEXPRESSION

public static final String FORMATTER_SPACE_CASTEXPRESSION
Deprecated. Use DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_CLOSING_PAREN_IN_CAST instead

Possible configurable option ID

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CODEASSIST_VISIBILITY_CHECK

public static final String CODEASSIST_VISIBILITY_CHECK
Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

CODEASSIST_IMPLICIT_QUALIFICATION

public static final String CODEASSIST_IMPLICIT_QUALIFICATION
Possible configurable option ID.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

CODEASSIST_FIELD_PREFIXES

public static final String CODEASSIST_FIELD_PREFIXES
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CODEASSIST_STATIC_FIELD_PREFIXES

public static final String CODEASSIST_STATIC_FIELD_PREFIXES
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CODEASSIST_LOCAL_PREFIXES

public static final String CODEASSIST_LOCAL_PREFIXES
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CODEASSIST_ARGUMENT_PREFIXES

public static final String CODEASSIST_ARGUMENT_PREFIXES
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CODEASSIST_FIELD_SUFFIXES

public static final String CODEASSIST_FIELD_SUFFIXES
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CODEASSIST_STATIC_FIELD_SUFFIXES

public static final String CODEASSIST_STATIC_FIELD_SUFFIXES
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CODEASSIST_LOCAL_SUFFIXES

public static final String CODEASSIST_LOCAL_SUFFIXES
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

CODEASSIST_ARGUMENT_SUFFIXES

public static final String CODEASSIST_ARGUMENT_SUFFIXES
Possible configurable option ID.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

GENERATE

public static final String GENERATE
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

DO_NOT_GENERATE

public static final String DO_NOT_GENERATE
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

PRESERVE

public static final String PRESERVE
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

OPTIMIZE_OUT

public static final String OPTIMIZE_OUT
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

VERSION_1_1

public static final String VERSION_1_1
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

VERSION_1_2

public static final String VERSION_1_2
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

VERSION_1_3

public static final String VERSION_1_3
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

VERSION_1_4

public static final String VERSION_1_4
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

VERSION_1_5

public static final String VERSION_1_5
Possible configurable option value.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

ABORT

public static final String ABORT
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

ERROR

public static final String ERROR
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

WARNING

public static final String WARNING
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

IGNORE

public static final String IGNORE
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

COMPUTE

public static final String COMPUTE
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

INSERT

public static final String INSERT
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

DO_NOT_INSERT

public static final String DO_NOT_INSERT
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

PRESERVE_ONE

public static final String PRESERVE_ONE
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

CLEAR_ALL

public static final String CLEAR_ALL
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

NORMAL

public static final String NORMAL
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

COMPACT

public static final String COMPACT
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

TAB

public static final String TAB
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

SPACE

public static final String SPACE
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

ENABLED

public static final String ENABLED
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

DISABLED

public static final String DISABLED
Possible configurable option value.

Since:
2.0
See Also:
getDefaultOptions(), Constant Field Values

CLEAN

public static final String CLEAN
Possible configurable option value.

Since:
2.1
See Also:
getDefaultOptions(), Constant Field Values

PUBLIC

public static final String PUBLIC
Possible configurable option value.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

PROTECTED

public static final String PROTECTED
Possible configurable option value.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

DEFAULT

public static final String DEFAULT
Possible configurable option value.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values

PRIVATE

public static final String PRIVATE
Possible configurable option value.

Since:
3.0
See Also:
getDefaultOptions(), Constant Field Values
Constructor Detail

JavaCore

public JavaCore()
Creates the Java core plug-in.

The plug-in instance is created automatically by the Eclipse platform. Clients must not call.

Since:
3.0
Method Detail

addElementChangedListener

public static void addElementChangedListener(IElementChangedListener listener)
Adds the given listener for changes to Java elements. Has no effect if an identical listener is already registered. This listener will only be notified during the POST_CHANGE resource change notification and any reconcile operation (POST_RECONCILE). For finer control of the notification, use addElementChangedListener(IElementChangedListener,int), which allows to specify a different eventMask.

Parameters:
listener - the listener
See Also:
ElementChangedEvent

addElementChangedListener

public static void addElementChangedListener(IElementChangedListener listener,
                                             int eventMask)
Adds the given listener for changes to Java elements. Has no effect if an identical listener is already registered. After completion of this method, the given listener will be registered for exactly the specified events. If they were previously registered for other events, they will be deregistered.

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.

Parameters:
listener - the listener
eventMask - the bit-wise OR of all event types of interest to the listener
Since:
2.0
See Also:
IElementChangedListener, ElementChangedEvent, removeElementChangedListener(IElementChangedListener)

addJavaElementMarkerAttributes

public static void addJavaElementMarkerAttributes(Map attributes,
                                                  IJavaElement element)
Configures the given marker attribute map for the given Java element. Used for markers, which denote a Java element rather than a resource.

Parameters:
attributes - the mutable marker attribute map (key type: String, value type: String)
element - the Java element for which the marker needs to be configured

addPreProcessingResourceChangedListener

public static void addPreProcessingResourceChangedListener(org.eclipse.core.resources.IResourceChangeListener listener)
Adds the given listener for POST_CHANGE resource change events to the Java core. The listener is guarantied to be notified of the POST_CHANGE resource change event before the Java core starts processing the resource change event itself.

Has no effect if an identical listener is already registered.

Parameters:
listener - the listener
Since:
3.0
See Also:
removePreProcessingResourceChangedListener(IResourceChangeListener)

configureJavaElementMarker

public void configureJavaElementMarker(org.eclipse.core.resources.IMarker marker,
                                       IJavaElement element)
                                throws org.eclipse.core.runtime.CoreException
Configures the given marker for the given Java element. Used for markers, which denote a Java element rather than a resource.

Parameters:
marker - the marker to be configured
element - the Java element for which the marker needs to be configured
Throws:
org.eclipse.core.runtime.CoreException - if the IMarker.setAttribute on the marker fails

create

public 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.

Parameters:
handleIdentifier - the given handle identifier
Returns:
the Java element corresponding to the handle identifier

create

public static IJavaElement create(String handleIdentifier,
                                  WorkingCopyOwner owner)
Returns the Java model element corresponding to the given handle identifier generated by IJavaElement.getHandleIdentifier(), or null if unable to create the associated element. If the returned Java element is an ICompilationUnit, its owner is the given owner if such a working copy exists, otherwise the compilation unit is a primary compilation unit.

Parameters:
handleIdentifier - the given handle identifier
owner - the owner of the returned compilation unit, ignored if the returned element is not a compilation unit
Returns:
the Java element corresponding to the handle identifier
Since:
3.0

create

public static IJavaElement create(org.eclipse.core.resources.IFile file)
Returns the Java element corresponding to the given file, or null if unable to associate the given file with a Java element.

The file must be one of:

Creating a Java element has the side effect of creating and opening all of the element's parents if they are not yet open.

Parameters:
file - the given file
Returns:
the Java element corresponding to the given file, or null if unable to associate the given file with a Java element

create

public static IJavaElement create(org.eclipse.core.resources.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.

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.

Parameters:
folder - the given 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

create

public static IJavaProject create(org.eclipse.core.resources.IProject project)
Returns the Java project corresponding to the given 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.

Parameters:
project - the given project
Returns:
the Java project corresponding to the given project, null if the given project is null

create

public static IJavaElement create(org.eclipse.core.resources.IResource resource)
Returns the Java element corresponding to the given resource, or null if unable to associate the given resource with a Java element.

The resource must be one of:

Creating a Java element has the side effect of creating and opening all of the element's parents if they are not yet open.

Parameters:
resource - the given resource
Returns:
the Java element corresponding to the given resource, or null if unable to associate the given resource with a Java element

create

public static IJavaModel create(org.eclipse.core.resources.IWorkspaceRoot root)
Returns the Java model.

Parameters:
root - the given root
Returns:
the Java model, or null if the root is null

createClassFileFrom

public static IClassFile createClassFileFrom(org.eclipse.core.resources.IFile file)
Creates and returns a class file element for the given .class file. Returns null if unable to recognize the class file.

Parameters:
file - the given .class file
Returns:
a class file element for the given .class file, or null if unable to recognize the class file

createCompilationUnitFrom

public static ICompilationUnit createCompilationUnitFrom(org.eclipse.core.resources.IFile file)
Creates and returns a compilation unit element for the given .java file. Returns null if unable to recognize the compilation unit.

Parameters:
file - the given .java file
Returns:
a compilation unit element for the given .java file, or null if unable to recognize the compilation unit

createJarPackageFragmentRootFrom

public static IPackageFragmentRoot createJarPackageFragmentRootFrom(org.eclipse.core.resources.IFile file)
Creates and returns a handle for the given JAR file. The Java model associated with the JAR's project may be created as a side effect.

Parameters:
file - the given JAR file
Returns:
a handle for the given JAR file, or null if unable to create a JAR package fragment root. (for example, if the JAR file represents a non-Java resource)

getClasspathContainer

public static IClasspathContainer getClasspathContainer(org.eclipse.core.runtime.IPath containerPath,
                                                        IJavaProject project)
                                                 throws JavaModelException
Answers the project specific value for a given classpath container. In case this container path could not be resolved, then will answer 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").

Parameters:
containerPath - the name of the container, which needs to be resolved
project - a specific project in which the container is being resolved
Returns:
the corresponding classpath container or null if unable to find one.
Throws:
JavaModelException - if an exception occurred while resolving the container, or if the resolved container contains illegal entries (contains CPE_CONTAINER entries or null entries).
Since:
2.0
See Also:
ClasspathContainerInitializer, IClasspathContainer, setClasspathContainer(IPath, IJavaProject[], IClasspathContainer[], IProgressMonitor)

getClasspathContainerInitializer

public static ClasspathContainerInitializer getClasspathContainerInitializer(String containerID)
Helper method finding the classpath container initializer registered for a given classpath container ID or null if none was found while iterating over the contributions to extension point to the extension point "org.eclipse.jdt.core.classpathContainerInitializer".

A containerID is the first segment of any container path, used to identify the registered container initializer.

Parameters:
containerID - - a containerID identifying a registered initializer
Returns:
ClasspathContainerInitializer - the registered classpath container initializer or null if none was found.
Since:
2.1

getClasspathVariable

public static org.eclipse.core.runtime.IPath getClasspathVariable(String variableName)
Returns the path held in the given classpath variable. Returns null if unable to bind.

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". If an initializer is registered for a variable, its persisted value will be ignored: its initializer will thus get the opportunity to rebind the variable differently on each session.

Parameters:
variableName - the name of the classpath variable
Returns:
the path, or null if none
See Also:
setClasspathVariable(String, IPath)

getClasspathVariableInitializer

public static ClasspathVariableInitializer getClasspathVariableInitializer(String variable)
Helper method finding the classpath variable initializer registered for a given classpath variable name or null if none was found while iterating over the contributions to extension point to the extension point "org.eclipse.jdt.core.classpathVariableInitializer".

Parameters:
variable - the given variable
Returns:
ClasspathVariableInitializer - the registered classpath variable initializer or null if none was found.
Since:
2.1

getClasspathVariableNames

public static String[] getClasspathVariableNames()
Returns the names of all known classpath variables.

Classpath variable values are persisted locally to the workspace, and are preserved from session to session.

Returns:
the list of classpath variable names
See Also:
setClasspathVariable(String, IPath)

getDefaultOptions

public static Hashtable getDefaultOptions()
Returns a table of all known configurable options with their default values. These options allow to configure the behaviour of the underlying components. The client may safely use the result as a template that they can modify and then pass to 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 (that is, 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.2"

 COMPILER / Inline JSR Bytecode Instruction
    When enabled, the compiler will no longer generate JSR instructions, but rather inline corresponding
   subroutine code sequences (mostly corresponding to try finally blocks). The generated code will thus
   get bigger, but will load faster on virtual machines since the verification process is then much simpler. 
  This mode is anticipating support for the Java Specification Request 202.
     - option id:         "org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode"
     - possible values:   { "enabled", "disabled" }
     - default:           "disabled"
 
 COMPILER / Javadoc Comment Support
    When this support is disabled, the compiler will ignore all javadoc problems options settings
    and will not report any javadoc problem. It will also not find any reference in javadoc comment and
    DOM AST Javadoc node will be only a flat text instead of having structured tag elements.
     - option id:         "org.eclipse.jdt.core.compiler.doc.comment.support"
     - possible values:   { "enabled", "disabled" }
     - default:           "enabled"

 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 Deprecation Inside Deprecated Code
    When enabled, the compiler will signal use of deprecated API inside deprecated code.
    The severity of the problem is controlled with option "org.eclipse.jdt.core.compiler.problem.deprecation".
     - option id:         "org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode"
     - possible values:   { "enabled", "disabled" }
     - default:           "disabled"

 COMPILER / Reporting Deprecation When Overriding Deprecated Method
    When enabled, the compiler will signal the declaration of a method overriding a deprecated one.
    The severity of the problem is controlled with option "org.eclipse.jdt.core.compiler.problem.deprecation".
     - option id:        "org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod"
     - possible values:   { "enabled", "disabled" }
     - default:           "disabled"

 COMPILER / Reporting Hidden Catch Block
    Locally to a try statement, some catch blocks may hide others . For example,
      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 (that is, 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 (that is, parameters never read from)
     - option id:         "org.eclipse.jdt.core.compiler.problem.unusedParameter"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "ignore"

 COMPILER / Reporting Unused Parameter if Implementing Abstract Method
    When enabled, the compiler will signal unused parameters in abstract method implementations.
    The severity of the problem is controlled with option "org.eclipse.jdt.core.compiler.problem.unusedParameter".
     - option id:         "org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract"
     - possible values:   { "enabled", "disabled" }
     - default:           "disabled"

 COMPILER / Reporting Unused Parameter if Overriding Concrete Method
    When enabled, the compiler will signal unused parameters in methods overriding concrete ones.
    The severity of the problem is controlled with option "org.eclipse.jdt.core.compiler.problem.unusedParameter".
     - option id:         "org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete"
     - possible values:   { "enabled", "disabled" }
     - default:           "disabled"

 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:           "warning"

 COMPILER / Reporting Unused Private Members
    When enabled, the compiler will issue an error or a warning whenever a private 
    method or field is declared but never used within the same unit.
     - option id:         "org.eclipse.jdt.core.compiler.problem.unusedPrivateMember"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "ignore"

 COMPILER / Reporting Assignment with no Effect
    When enabled, the compiler will issue an error or a warning whenever an assignment
    has no effect (e.g 'x = x').
     - option id:         "org.eclipse.jdt.core.compiler.problem.noEffectAssignment"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "warning"
 
 COMPILER / Reporting Empty Statements and Unnecessary Semicolons
    When enabled, the compiler will issue an error or a warning if an empty statement or a
    unnecessary semicolon is encountered.
     - option id:         "org.eclipse.jdt.core.compiler.problem.emptyStatement"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "ignore"
 
 COMPILER / Reporting Unnecessary Type Check
    When enabled, the compiler will issue an error or a warning when a cast or an instanceof operation 
    is unnecessary.
     - option id:         "org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "ignore"
 
 COMPILER / Reporting Unnecessary Else
    When enabled, the compiler will issue an error or a warning when a statement is unnecessarily
    nested within an else clause (in situation where then clause is not completing normally).
     - option id:         "org.eclipse.jdt.core.compiler.problem.unnecessaryElse"
     - 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 (that is, not tagged with //$NON-NLS-<n>$). 
     - 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 / Reporting Non-Static Reference to a Static Member
    When enabled, the compiler will issue an error or a warning whenever a static field
    or method is accessed with an expression receiver. A reference to a static member should
    be qualified with a type name.
     - option id:         "org.eclipse.jdt.core.compiler.problem.staticAccessReceiver"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "warning"
 
 COMPILER / Reporting Indirect Reference to a Static Member
    When enabled, the compiler will issue an error or a warning whenever a static field
    or method is accessed in an indirect way. A reference to a static member should
    preferably be qualified with its declaring type name.
     - option id:         "org.eclipse.jdt.core.compiler.problem.indirectStaticAccess"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "ignore"
 
 COMPILER / Reporting Interface Method not Compatible with non-Inherited Methods
    When enabled, the compiler will issue an error or a warning whenever an interface
    defines a method incompatible with a non-inherited Object method. Until this conflict
    is resolved, such an interface cannot be implemented, For example, 
      interface I { 
         int clone();
      } 
     - option id:         "org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "warning"
 
 COMPILER / Reporting Usage of char[] Expressions in String Concatenations
    When enabled, the compiler will issue an error or a warning whenever a char[] expression
    is used in String concatenations (for example, "hello" + new char[]{'w','o','r','l','d'}).
     - option id:         "org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "warning"

 COMPILER / Reporting Local Variable Declaration Hiding another Variable
    When enabled, the compiler will issue an error or a warning whenever a local variable
    declaration is hiding some field or local variable (either locally, inherited or defined in enclosing type).
     - option id:         "org.eclipse.jdt.core.compiler.problem.localVariableHiding"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "ignore"

 COMPILER / Reporting Field Declaration Hiding another Variable
    When enabled, the compiler will issue an error or a warning whenever a field
    declaration is hiding some field or local variable (either locally, inherited or defined in enclosing type).
     - option id:         "org.eclipse.jdt.core.compiler.problem.fieldHiding"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "ignore"

 COMPILER / Reporting Special Parameter Hiding another Field
    When enabled, the compiler will signal cases where a constructor or setter method parameter declaration 
    is hiding some field (either locally, inherited or defined in enclosing type).
    The severity of the problem is controlled with option "org.eclipse.jdt.core.compiler.problem.localVariableHiding".
     - option id:         "org.eclipse.jdt.core.compiler.problem.specialParameterHidingField"
     - possible values:   { "enabled", "disabled" }
     - default:           "disabled"
 
 COMPILER / Reporting Possible Accidental Boolean Assignment
    When enabled, the compiler will issue an error or a warning if a boolean assignment is acting as the condition
    of a control statement  (where it probably was meant to be a boolean comparison).
     - option id:         "org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "ignore"
 
 COMPILER / Reporting Undocumented Empty Block
    When enabled, the compiler will issue an error or a warning when an empty block is detected and it is not
    documented with any comment.
     - option id:         "org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "ignore"

 COMPILER / Reporting Finally Blocks Not Completing Normally
    When enabled, the compiler will issue an error or a warning when a finally block does not complete normally.
     - option id:         "org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "warning"

 COMPILER / Reporting Unused Declared Thrown Exception
    When enabled, the compiler will issue an error or a warning when a method or a constructor is declaring a
    thrown checked exception, but never actually raises it in its body.
     - option id:         "org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException"
     - possible values:   { "error", "warning", "ignore" }
     - default:           "ignore"

 COMPILER / Reporting Unused Declared Thrown Exception in Overridind Method
    When disabled, the compiler will not include overriding methods in its diagnosis for unused declared
    thrown exceptions.
    
The severity of the problem is controlled with option "org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException". - option id: "org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding" - possible values: { "enabled", "disabled" } - default: "disabled" COMPILER / Reporting Unqualified Access to Field When enabled, the compiler will issue an error or a warning when a field is access without any qualification. In order to improve code readability, it should be qualified, e.g. 'x' should rather be written 'this.x'. - option id: "org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess" - possible values: { "error", "warning", "ignore" } - default: "ignore" COMPILER / Reporting Invalid Javadoc Comment This is the generic control for the severity of Javadoc problems. When enabled, the compiler will issue an error or a warning for a problem in Javadoc. - option id: "org.eclipse.jdt.core.compiler.problem.invalidJavadoc" - possible values: { "error", "warning", "ignore" } - default: "ignore" COMPILER / Visibility Level For Invalid Javadoc Tags Set the minimum visibility level for Javadoc tag problems. Below this level problems will be ignored. - option id: "org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility" - possible values: { "public", "protected", "default", "private" } - default: "private" COMPILER / Reporting Invalid Javadoc Tags When enabled, the compiler will signal unbound or unexpected reference tags in Javadoc. A 'throws' tag referencing an undeclared exception would be considered as unexpected.
Note that this diagnosis can be enabled based on the visibility of the construct associated with the Javadoc; also see the setting "org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility".
The severity of the problem is controlled with option "org.eclipse.jdt.core.compiler.problem.invalidJavadoc". - option id: "org.eclipse.jdt.core.compiler.problem.invalidJavadocTags" - possible values: { "disabled", "enabled" } - default: "enabled" COMPILER / Reporting Missing Javadoc Tags This is the generic control for the severity of Javadoc missing tag problems. When enabled, the compiler will issue an error or a warning when tags are missing in Javadoc comments.
Note that this diagnosis can be enabled based on the visibility of the construct associated with the Javadoc; also see the setting "org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility".
- option id: "org.eclipse.jdt.core.compiler.problem.missingJavadocTags" - possible values: { "error", "warning", "ignore" } - default: "ignore" COMPILER / Visibility Level For Missing Javadoc Tags Set the minimum visibility level for Javadoc missing tag problems. Below this level problems will be ignored. - option id: "org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility" - possible values: { "public", "protected", "default", "private" } - default: "private" COMPILER / Reporting Missing Javadoc Tags on Overriding Methods Specify whether the compiler will verify overriding methods in order to report Javadoc missing tag problems. - option id: "org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding" - possible values: { "enabled", "disabled" } - default: "enabled" COMPILER / Reporting Missing Javadoc Comments This is the generic control for the severity of missing Javadoc comment problems. When enabled, the compiler will issue an error or a warning when Javadoc comments are missing.
Note that this diagnosis can be enabled based on the visibility of the construct associated with the expected Javadoc; also see the setting "org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility".
- option id: "org.eclipse.jdt.core.compiler.problem.missingJavadocComments" - possible values: { "error", "warning", "ignore" } - default: "ignore" COMPILER / Visibility Level For Missing Javadoc Comments Set the minimum visibility level for missing Javadoc problems. Below this level problems will be ignored. - option id: "org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility" - possible values: { "public", "protected", "default", "private" } - default: "public" COMPILER / Reporting Missing Javadoc Comments on Overriding Methods Specify whether the compiler will verify overriding methods in order to report missing Javadoc comment problems. - option id: "org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding" - possible values: { "enabled", "disabled" } - default: "enabled" COMPILER / Setting Source Compatibility Mode Specify whether which source level compatibility is used. 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.4" 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: "<n>" where <n> is zero or a positive integer (if zero then all problems are reported). - default: "100" COMPILER / Define the Automatic Task Tags When the tag list is not empty, the compiler will issue a task marker whenever it encounters one of the corresponding tag inside any comment in Java source code. Generated task messages will include the tag, and range until the next line separator or comment ending. Note that tasks messages are trimmed. If a tag is starting with a letter or digit, then it cannot be leaded by another letter or digit to be recognized ("fooToDo" will not be recognized as a task for tag "ToDo", but "foo#ToDo" will be detected for either tag "ToDo" or "#ToDo"). Respectively, a tag ending with a letter or digit cannot be followed by a letter or digit to be recognized ("ToDofoo" will not be recognized as a task for tag "ToDo", but "ToDo:foo" will be detected either for tag "ToDo" or "ToDo:"). - option id: "org.eclipse.jdt.core.compiler.taskTags" - possible values: { "<tag>[,<tag>]*" } where <tag> is a String without any wild-card or leading/trailing spaces - default: "TODO,FIXME,XXX" COMPILER / Define the Automatic Task Priorities In parallel with the Automatic Task Tags, this list defines the priorities (high, normal or low) of the task markers issued by the compiler. If the default is specified, the priority of each task marker is "NORMAL". - option id: "org.eclipse.jdt.core.compiler.taskPriorities" - possible values: { "<priority>[,<priority>]*" } where <priority> is one of "HIGH", "NORMAL" or "LOW" - default: "NORMAL,HIGH,NORMAL" COMPILER / Determine whether task tags are case-sensitive When enabled, task tags are considered in a case-sensitive way. - option id: "org.eclipse.jdt.core.compiler.taskCaseSensitive" - possible values: { "enabled", "disabled" } - default: "enabled" 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: { "<name>[,<name>]* } where <name> is a file name pattern (* and ? 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: "abort" BUILDER / Cleaning Output Folder(s) Indicate whether the JavaBuilder is allowed to clean the output folders when performing full build operations. - option id: "org.eclipse.jdt.core.builder.cleanOutputFolder" - possible values: { "clean", "ignore" } - default: "clean" BUILDER / Reporting Duplicate Resources Indicate the severity of the problem reported when more than one occurrence of a resource is to be copied into the output location. - option id: "org.eclipse.jdt.core.builder.duplicateResourceTask" - possible values: { "error", "warning" } - default: "warning" 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: <platform default> JAVACORE / Reporting Incomplete Classpath Indicate the severity of the problem reported when an entry on the classpath does not exist, is not legite or is not visible (for example, a referenced project is closed). - option id: "org.eclipse.jdt.core.incompleteClasspath" - possible values: { "error", "warning"} - default: "error" JAVACORE / Reporting Classpath Cycle Indicate the severity of the problem reported when a project is involved in a cycle. - option id: "org.eclipse.jdt.core.circularClasspath" - possible values: { "error", "warning" } - default: "error" JAVACORE / Reporting Incompatible JDK Level for Required Binaries Indicate the severity of the problem reported when a project prerequisites another project or library with an incompatible target JDK level (e.g. project targeting 1.1 vm, but compiled against 1.4 libraries). - option id: "org.eclipse.jdt.core.incompatibleJDKLevel" - possible values: { "error", "warning", "ignore" } - default: "ignore" JAVACORE / Enabling Usage of Classpath Exclusion Patterns When disabled, no entry on a project classpath can be associated with an exclusion pattern. - option id: "org.eclipse.jdt.core.classpath.exclusionPatterns" - possible values: { "enabled", "disabled" } - default: "enabled" JAVACORE / Enabling Usage of Classpath Multiple Output Locations When disabled, no entry on a project classpath can be associated with a specific output location, preventing thus usage of multiple output locations. - option id: "org.eclipse.jdt.core.classpath.multipleOutputLocations" - possible values: { "enabled", "disabled" } - default: "enabled" 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: "<n>", where n is zero or a positive integer - default: "80" FORMATTER / Compacting Assignment Assignments can be formatted asymmetrically, for example '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: "<n>", where n is a positive integer - default: "4" FORMATTER / Inserting space in cast expression When Insert, a space is added between the type and the expression in a cast expression. - option id: "org.eclipse.jdt.core.formatter.space.castexpression" - possible values: { "insert", "do not insert" } - default: "insert" CODEASSIST / Activate Visibility Sensitive Completion When active, completion doesn't show that you can not see (for example, 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" CODEASSIST / Define the Prefixes for Field Name When the prefixes is non empty, completion for field name will begin with one of the proposed prefixes. - option id: "org.eclipse.jdt.core.codeComplete.fieldPrefixes" - possible values: { "<prefix>[,<prefix>]*" } where <prefix> is a String without any wild-card - default: "" CODEASSIST / Define the Prefixes for Static Field Name When the prefixes is non empty, completion for static field name will begin with one of the proposed prefixes. - option id: "org.eclipse.jdt.core.codeComplete.staticFieldPrefixes" - possible values: { "<prefix>[,<prefix>]*" } where <prefix> is a String without any wild-card - default: "" CODEASSIST / Define the Prefixes for Local Variable Name When the prefixes is non empty, completion for local variable name will begin with one of the proposed prefixes. - option id: "org.eclipse.jdt.core.codeComplete.localPrefixes" - possible values: { "<prefix>[,<prefix>]*" } where <prefix> is a String without any wild-card - default: "" CODEASSIST / Define the Prefixes for Argument Name When the prefixes is non empty, completion for argument name will begin with one of the proposed prefixes. - option id: "org.eclipse.jdt.core.codeComplete.argumentPrefixes" - possible values: { "<prefix>[,<prefix>]*" } where <prefix> is a String without any wild-card - default: "" CODEASSIST / Define the Suffixes for Field Name When the suffixes is non empty, completion for field name will end with one of the proposed suffixes. - option id: "org.eclipse.jdt.core.codeComplete.fieldSuffixes" - possible values: { "<suffix>[,<suffix>]*" } where <suffix> is a String without any wild-card - default: "" CODEASSIST / Define the Suffixes for Static Field Name When the suffixes is non empty, completion for static field name will end with one of the proposed suffixes. - option id: "org.eclipse.jdt.core.codeComplete.staticFieldSuffixes" - possible values: { "<suffix>[,<suffix>]*" } where <suffix> is a String without any wild-card - default: "" CODEASSIST / Define the Suffixes for Local Variable Name When the suffixes is non empty, completion for local variable name will end with one of the proposed suffixes. - option id: "org.eclipse.jdt.core.codeComplete.localSuffixes" - possible values: { "<suffix>[,<suffix>]*" } where <suffix> is a String without any wild-card - default: "" CODEASSIST / Define the Suffixes for Argument Name When the suffixes is non empty, completion for argument name will end with one of the proposed suffixes. - option id: "org.eclipse.jdt.core.codeComplete.argumentSuffixes" - possible values: { "<suffix>[,<suffix>]*" } where <suffix> is a String without any wild-card - default: ""

Returns:
a mutable table containing the default settings of all known options (key type: String; value type: String)
See Also:
setOptions(Hashtable)

getEncoding

public static String getEncoding()
Returns the workspace root default charset encoding.

Returns:
the name of the default charset encoding for workspace root.
Since:
3.0
See Also:
IContainer.getDefaultCharset(), ResourcesPlugin.getEncoding()

getJavaCore

public static JavaCore getJavaCore()
Returns the single instance of the Java core plug-in runtime class. Equivalent to (JavaCore) getPlugin().

Returns:
the single instance of the Java core plug-in runtime class

getOption

public static String getOption(String optionName)
Helper method for returning one option value only. Equivalent to (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.

Parameters:
optionName - the name of an option
Returns:
the String value of a given option
Since:
2.0
See Also:
getDefaultOptions()

getOptions

public static Hashtable getOptions()
Returns the table of the current options. Initially, all options have their default values, and this method returns a table that includes all known options.

For a complete description of the configurable options, see getDefaultOptions.

Returns:
table of current settings of all options (key type: String; value type: String)
See Also:
getDefaultOptions()

getPlugin

public static org.eclipse.core.runtime.Plugin getPlugin()
Returns the single instance of the Java core plug-in runtime class.

Returns:
the single instance of the Java core plug-in runtime class

getResolvedClasspathEntry

public 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). It is obtained by resolving the variable reference in the first segment. Returns null if unable to resolve using the following algorithm:
  • if variable segment cannot be resolved, returns null
  • finds a project, JAR or binary folder in the workspace at the resolved path location
  • if none finds an external JAR file or folder outside the workspace at the resolved path location
  • if none returns 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#getClasspathContainer(IPath, IJavaProject).

Parameters:
entry - the given variable entry
Returns:
the resolved library or project classpath entry, or null if the given variable entry could not be resolved to a valid classpath entry

getResolvedVariablePath

public static org.eclipse.core.runtime.IPath getResolvedVariablePath(org.eclipse.core.runtime.IPath variablePath)
Resolve a variable path (helper method).

Parameters:
variablePath - the given variable path
Returns:
the resolved variable path or null if none

getSharedWorkingCopies

public static IWorkingCopy[] getSharedWorkingCopies(IBufferFactory factory)
Deprecated. - should use #getWorkingCopies(WorkingCopyOwner) instead

Answers the shared working copies currently registered for this buffer factory. Working copies can be shared by several clients using the same buffer factory,see IWorkingCopy.getSharedWorkingCopy.

Parameters:
factory - the given buffer factory
Returns:
the list of shared working copies for a given buffer factory
Since:
2.0
See Also:
IWorkingCopy

getUserLibraryNames

public static String[] getUserLibraryNames()
Returns the names of all defined user libraries. The corresponding classpath container path is the name appended to the USER_LIBRARY_CONTAINER_ID.

Returns:
Return an array containing the names of all known user defined.
Since:
3.0

getWorkingCopies

public static ICompilationUnit[] getWorkingCopies(WorkingCopyOwner owner)
Returns the working copies that have the given owner. Only compilation units in working copy mode are returned. If the owner is null, primary working copies are returned.

Parameters:
owner - the given working copy owner or for primary working copy owner
Returns:
the list of working copies for a given owner
Since:
3.0

initializeDefaultPluginPreferences

protected void initializeDefaultPluginPreferences()
Initializes the default preferences settings for this plug-in.


isReferencedBy

public static boolean isReferencedBy(IJavaElement element,
                                     org.eclipse.core.resources.IMarker marker)
                              throws org.eclipse.core.runtime.CoreException
Returns whether the given marker references the given Java element. Used for markers, which denote a Java element rather than a resource.

Parameters:
element - the element
marker - the marker
Returns:
true if the marker references the element, false otherwise
Throws:
org.eclipse.core.runtime.CoreException - if the IMarker.getAttribute on the marker fails

isReferencedBy

public static boolean isReferencedBy(IJavaElement element,
                                     org.eclipse.core.resources.IMarkerDelta markerDelta)
                              throws org.eclipse.core.runtime.CoreException
Returns whether the given marker delta references the given Java element. Used for markers deltas, which denote a Java element rather than a resource.

Parameters:
element - the element
markerDelta - the marker delta
Returns:
true if the marker delta references the element
Throws:
org.eclipse.core.runtime.CoreException - if the IMarkerDelta.getAttribute on the marker delta fails

newContainerEntry

public static IClasspathEntry newContainerEntry(org.eclipse.core.runtime.IPath containerPath)
Creates and returns a new classpath entry of kind 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).

Parameters:
containerPath - the path identifying the container, it must be formed of two segments
Returns:
a new container classpath entry
Since:
2.0
See Also:
getClasspathContainer(IPath, IJavaProject), newContainerEntry(IPath, boolean)

newContainerEntry

public static IClasspathEntry newContainerEntry(org.eclipse.core.runtime.IPath containerPath,
                                                boolean isExported)
Creates and returns a new classpath entry of kind 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.

Parameters:
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
Returns:
a new container classpath entry
Since:
2.0
See Also:
getClasspathContainer(IPath, IJavaProject), setClasspathContainer(IPath, IJavaProject[], IClasspathContainer[], IProgressMonitor), newContainerEntry(IPath, boolean)

newLibraryEntry

public static IClasspathEntry newLibraryEntry(org.eclipse.core.runtime.IPath path,
                                              org.eclipse.core.runtime.IPath sourceAttachmentPath,
                                              org.eclipse.core.runtime.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. 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 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). The target root folder can only be defined internally to the workspace (absolute path relative to the workspace root). To use a binary folder external to the workspace, it must first be linked (see IFolder#createLink(...)).

e.g. Here are some examples of binary path usage

Note that this operation does not attempt to validate or access the resources at the given paths.

The resulting entry is not exported to dependent projects. This method is equivalent to newLibraryEntry(-,-,-,false).

Parameters:
path - the absolute path of the binary archive
sourceAttachmentPath - the absolute path of the corresponding source archive or folder, or null if none. Note, since 3.0, an empty path is allowed to denote no source attachment. and will be automatically converted to null.
sourceAttachmentRootPath - the location of the root within the source archive or folder or null if this location should be automatically detected.
Returns:
a new library classpath entry
See Also:
newLibraryEntry(IPath, IPath, IPath, boolean)

newLibraryEntry

public static IClasspathEntry newLibraryEntry(org.eclipse.core.runtime.IPath path,
                                              org.eclipse.core.runtime.IPath sourceAttachmentPath,
                                              org.eclipse.core.runtime.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. 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 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). The target root folder can only be defined internally to the workspace (absolute path relative to the workspace root). To use a binary folder external to the workspace, it must first be linked (see IFolder#createLink(...)).

e.g. Here are some examples of binary path usage

Note that this operation does not attempt to validate or access the resources at the given paths.

Parameters:
path - the absolute path of the binary archive
sourceAttachmentPath - the absolute path of the corresponding source archive or folder, or null if none. Note, since 3.0, an empty path is allowed to denote no source attachment. and will be automatically converted to null.
sourceAttachmentRootPath - the location of the root within the source archive or folder or null if this location should be automatically detected.
isExported - indicates whether this entry is contributed to dependent projects in addition to the output location
Returns:
a new library classpath entry
Since:
2.0

newProjectEntry

public static IClasspathEntry newProjectEntry(org.eclipse.core.runtime.IPath path)
Creates and returns a new non-exported classpath entry of kind 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).

Parameters:
path - the absolute path of the binary archive
Returns:
a new project classpath entry
See Also:
newProjectEntry(IPath, boolean)

newProjectEntry

public static IClasspathEntry newProjectEntry(org.eclipse.core.runtime.IPath path,
                                              boolean isExported)
Creates and returns a new classpath entry of kind 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.

Parameters:
path - the absolute path of the prerequisite project
isExported - indicates whether this entry is contributed to dependent projects in addition to the output location
Returns:
a new project classpath entry
Since:
2.0

newRegion

public static IRegion newRegion()
Returns a new empty region.

Returns:
a new empty region

newSourceEntry

public static IClasspathEntry newSourceEntry(org.eclipse.core.runtime.IPath path)
Creates and returns a new classpath entry of kind CPE_SOURCE for all files in the project's source folder identified by the given absolute workspace-relative path.

The convenience method is fully equivalent to:

 newSourceEntry(path, new IPath[] {}, new IPath[] {}, null);
 

Parameters:
path - the absolute workspace-relative path of a source folder
Returns:
a new source classpath entry
See Also:
newSourceEntry(IPath, IPath[], IPath[], IPath)

newSourceEntry

public static IClasspathEntry newSourceEntry(org.eclipse.core.runtime.IPath path,
                                             org.eclipse.core.runtime.IPath[] exclusionPatterns)
Creates and returns a new classpath entry of kind CPE_SOURCE for the project's source folder identified by the given absolute workspace-relative path but excluding all source files with paths matching any of the given patterns.

The convenience method is fully equivalent to:

 newSourceEntry(path, new IPath[] {}, exclusionPatterns, null);
 

Parameters:
path - the absolute workspace-relative path of a source folder
exclusionPatterns - the possibly empty list of exclusion patterns represented as relative paths
Returns:
a new source classpath entry
Since:
2.1
See Also:
newSourceEntry(IPath, IPath[], IPath[], IPath)

newSourceEntry

public static IClasspathEntry newSourceEntry(org.eclipse.core.runtime.IPath path,
                                             org.eclipse.core.runtime.IPath[] exclusionPatterns,
                                             org.eclipse.core.runtime.IPath specificOutputLocation)
Creates and returns a new classpath entry of kind CPE_SOURCE for the project's source folder identified by the given absolute workspace-relative path but excluding all source files with paths matching any of the given patterns, and associated with a specific output location (that is, ".class" files are not going to the project default output location).

The convenience method is fully equivalent to:

 newSourceEntry(path, new IPath[] {}, exclusionPatterns, specificOutputLocation);
 

Parameters:
path - the absolute workspace-relative path of a source folder
exclusionPatterns - the possibly empty list of exclusion patterns represented as relative paths
specificOutputLocation - the specific output location for this source entry (null if using project default ouput location)
Returns:
a new source classpath entry
Since:
2.1
See Also:
newSourceEntry(IPath, IPath[], IPath[], IPath)

newSourceEntry

public static IClasspathEntry newSourceEntry(org.eclipse.core.runtime.IPath path,
                                             org.eclipse.core.runtime.IPath[] inclusionPatterns,
                                             org.eclipse.core.runtime.IPath[] exclusionPatterns,
                                             org.eclipse.core.runtime.IPath specificOutputLocation)
Creates and returns a new classpath entry of kind CPE_SOURCE for the project's source folder identified by the given absolute workspace-relative path using the given inclusion and exclusion patterns to determine which source files are included, and the given output path to control the output location of generated files.

The source folder is referred to using an absolute path relative to the workspace root, e.g. /Project/src. A project's source folders are located with that project. That is, a source classpath entry specifying the path /P1/src is only usable for project P1.

The inclusion patterns determines the initial set of source files that are to be included; the exclusion patterns are then used to reduce this set. When no inclusion patterns are specified, the initial file set includes all relevent files in the resource tree rooted at the source entry's path. On the other hand, specifying one or more inclusion patterns means that all and only files matching at least one of the specified patterns are to be included. If exclusion patterns are specified, the initial set of files is then reduced by eliminating files matched by at least one of the exclusion patterns. Inclusion and exclusion patterns look like relative file paths with wildcards and are interpreted relative to the source entry's path. File patterns are case-sensitive can contain '**', '*' or '?' wildcards (see IClasspathEntry.getExclusionPatterns() for the full description of their syntax and semantics). The resulting set of files are included in the corresponding package fragment root; all package fragments within the root will have children of type ICompilationUnit.

For example, if the source folder path is /Project/src, there are no inclusion filters, and the exclusion pattern is com/xyz/tests/**, then source files like /Project/src/com/xyz/Foo.java and /Project/src/com/xyz/utils/Bar.java would be included, whereas /Project/src/com/xyz/tests/T1.java and /Project/src/com/xyz/tests/quick/T2.java would be excluded.

Additionally, a source entry can be associated with a specific output location. By doing so, the Java builder will ensure that the generated ".class" files will be issued inside this output location, as opposed to be generated into the project default output location (when output location is null). Note that multiple source entries may target the same output location. The output location is referred to using an absolute path relative to the workspace root, e.g. "/Project/bin", it must be located inside the same project as the source folder.

Also note that all sources/binaries inside a project are contributed as a whole through a project entry (see JavaCore.newProjectEntry). Particular source entries cannot be selectively exported.

Parameters:
path - the absolute workspace-relative path of a source folder
inclusionPatterns - the possibly empty list of inclusion patterns represented as relative paths
exclusionPatterns - the possibly empty list of exclusion patterns represented as relative paths
specificOutputLocation - the specific output location for this source entry (null if using project default ouput location)
Returns:
a new source classpath entry with the given exclusion patterns
Since:
3.0
See Also:
IClasspathEntry.getInclusionPatterns(), IClasspathEntry.getExclusionPatterns(), IClasspathEntry.getOutputLocation()

newVariableEntry

public static IClasspathEntry newVariableEntry(org.eclipse.core.runtime.IPath variablePath,
                                               org.eclipse.core.runtime.IPath variableSourceAttachmentPath,
                                               org.eclipse.core.runtime.IPath sourceAttachmentRootPath)
Creates and returns a new non-exported classpath entry of kind 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

Note that this operation does not attempt to validate classpath variables or access the resources at the given paths.

The resulting entry is not exported to dependent projects. This method is equivalent to newVariableEntry(-,-,-,false).

Parameters:
variablePath - the path of the binary archive; first segment is the name of a classpath variable
variableSourceAttachmentPath - 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
Returns:
a new library classpath entry
See Also:
newVariableEntry(IPath, IPath, IPath, boolean)

newVariableEntry

public static IClasspathEntry newVariableEntry(org.eclipse.core.runtime.IPath variablePath,
                                               org.eclipse.core.runtime.IPath variableSourceAttachmentPath,
                                               org.eclipse.core.runtime.IPath variableSourceAttachmentRootPath,
                                               boolean isExported)
Creates and returns a new non-exported classpath entry of kind 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

Note that this operation does not attempt to validate classpath variables or access the resources at the given paths.

Parameters:
variablePath - the path of the binary archive; first segment is the name of a classpath variable
variableSourceAttachmentPath - 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)
variableSourceAttachmentRootPath - 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
Returns:
a new variable classpath entry
Since:
2.0

removeClasspathVariable

public static void removeClasspathVariable(String variableName)
Deprecated. - use version with extra IProgressMonitor

Removed the given classpath variable. Does nothing if no value was set for this classpath variable.

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.

Parameters:
variableName - the name of the classpath variable
See Also:
setClasspathVariable(String, IPath)

removeClasspathVariable

public static void removeClasspathVariable(String variableName,
                                           org.eclipse.core.runtime.IProgressMonitor monitor)
Removed the given classpath variable. Does nothing if no value was set for this classpath variable.

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.

Parameters:
variableName - the name of the classpath variable
monitor - the progress monitor to report progress
See Also:
setClasspathVariable(String, IPath)

removeElementChangedListener

public static void removeElementChangedListener(IElementChangedListener listener)
Removes the given element changed listener. Has no affect if an identical listener is not registered.

Parameters:
listener - the listener

removePreProcessingResourceChangedListener

public static void removePreProcessingResourceChangedListener(org.eclipse.core.resources.IResourceChangeListener listener)
Removes the given pre-processing resource changed listener.

Has no affect if an identical listener is not registered.

Parameters:
listener - the listener
Since:
3.0

run

public static void run(org.eclipse.core.resources.IWorkspaceRunnable action,
                       org.eclipse.core.runtime.IProgressMonitor monitor)
                throws org.eclipse.core.runtime.CoreException
Runs the given action as an atomic Java model operation.

After running a method that modifies java elements, registered listeners receive after-the-fact notification of what just transpired, in the form of a element changed event. This method allows clients to call a number of methods that modify java elements and only have element changed event notifications reported at the end of the entire batch.

If this method is called outside the dynamic scope of another such call, this method runs the action and then reports a single element changed event describing the net effect of all changes done to java elements by the action.

If this method is called in the dynamic scope of another such call, this method simply runs the action.

Parameters:
action - the action to perform
monitor - a progress monitor, or null if progress reporting and cancellation are not desired
Throws:
org.eclipse.core.runtime.CoreException - if the operation failed.
Since:
2.1

run

public static void run(org.eclipse.core.resources.IWorkspaceRunnable action,
                       org.eclipse.core.runtime.jobs.ISchedulingRule rule,
                       org.eclipse.core.runtime.IProgressMonitor monitor)
                throws org.eclipse.core.runtime.CoreException
Runs the given action as an atomic Java model operation.

After running a method that modifies java elements, registered listeners receive after-the-fact notification of what just transpired, in the form of a element changed event. This method allows clients to call a number of methods that modify java elements and only have element changed event notifications reported at the end of the entire batch.

If this method is called outside the dynamic scope of another such call, this method runs the action and then reports a single element changed event describing the net effect of all changes done to java elements by the action.

If this method is called in the dynamic scope of another such call, this method simply runs the action.

The supplied scheduling rule is used to determine whether this operation can be run simultaneously with workspace changes in other threads. See IWorkspace.run(...) for more details.

Parameters:
action - the action to perform
rule - the scheduling rule to use when running this operation, or null if there are no scheduling restrictions for this operation.
monitor - a progress monitor, or null if progress reporting and cancellation are not desired
Throws:
org.eclipse.core.runtime.CoreException - if the operation failed.
Since:
3.0

setClasspathContainer

public static void setClasspathContainer(org.eclipse.core.runtime.IPath containerPath,
                                         IJavaProject[] affectedProjects,
                                         IClasspathContainer[] respectiveContainers,
                                         org.eclipse.core.runtime.IProgressMonitor monitor)
                                  throws JavaModelException
Bind a container reference path to some actual containers (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. A combined Java element delta will be notified to describe the corresponding classpath changes resulting from the container update. This operation is batched, and automatically eliminates unnecessary updates (new container is same as old one). This operation acquires a lock on the workspace's root.

This functionality cannot be used while the workspace is locked, since it may create/remove some resource markers.

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").

Note: setting a container to null will cause it to be lazily resolved again whenever its value is required. In particular, this will cause a registered initializer to be invoked again.

Parameters:
containerPath - - the name of the container reference, which is being updated
affectedProjects - - the set of projects for which this container is being bound
respectiveContainers - - the set of respective containers for the affected projects
monitor - a monitor to report progress
Throws:
JavaModelException
Since:
2.0
See Also:
ClasspathContainerInitializer, getClasspathContainer(IPath, IJavaProject), IClasspathContainer

setClasspathVariable

public static void setClasspathVariable(String variableName,
                                        org.eclipse.core.runtime.IPath path)
                                 throws JavaModelException
Deprecated. - use API with IProgressMonitor

Sets the value of the given classpath variable. The path must have at least one segment.

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.

Parameters:
variableName - the name of the classpath variable
path - the path
Throws:
JavaModelException
See Also:
getClasspathVariable(String)

setClasspathVariable

public static void setClasspathVariable(String variableName,
                                        org.eclipse.core.runtime.IPath path,
                                        org.eclipse.core.runtime.IProgressMonitor monitor)
                                 throws JavaModelException
Sets the value of the given classpath variable. The path must not be null.

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.

Parameters:
variableName - the name of the classpath variable
path - the path
monitor - a monitor to report progress
Throws:
JavaModelException
See Also:
getClasspathVariable(String)

setClasspathVariables

public static void setClasspathVariables(String[] variableNames,
                                         org.eclipse.core.runtime.IPath[] paths,
                                         org.eclipse.core.runtime.IProgressMonitor monitor)
                                  throws JavaModelException
Sets the values of all the given classpath variables at once. Null paths can be used to request corresponding variable removal.

A combined Java element delta will be notified to describe the corresponding classpath changes resulting from the variables update. This operation is batched, and automatically eliminates unnecessary updates (new variable is same as old one). This operation acquires a lock on the workspace's root.

This functionality cannot be used while the workspace is locked, since it may create/remove some resource markers.

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.

Parameters:
variableNames - an array of names for the updated classpath variables
paths - an array of path updates for the modified classpath variables (null meaning that the corresponding value will be removed
monitor - a monitor to report progress
Throws:
JavaModelException
Since:
2.0
See Also:
getClasspathVariable(String)

setOptions

public static void setOptions(Hashtable newOptions)
Sets the current table of options. All and only the options explicitly included in the given table are remembered; all previous option settings are forgotten, including ones not explicitly mentioned.

For a complete description of the configurable options, see getDefaultOptions.

Parameters:
newOptions - the new options (key type: String; value type: String), or null to reset all options to their default values
See Also:
getDefaultOptions()

stop

public void stop(BundleContext context)
          throws Exception
Throws:
Exception

start

public void start(BundleContext context)
           throws Exception
Throws:
Exception

Eclipse JDT
Release 3.0

Copyright (c) IBM Corp. and others 2000, 2004. All Rights Reserved.