org.aspectj.org.eclipse.jdt.internal.core
Class JavaModelManager

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.JavaModelManager

public class JavaModelManager
extends java.lang.Object

The JavaModelManager manages instances of IJavaModel. IElementChangedListeners register with the JavaModelManager, and receive ElementChangedEvents for all IJavaModels.

The single instance of JavaModelManager is available from the static method JavaModelManager.getJavaModelManager().


Nested Class Summary
static class JavaModelManager.CompilationParticipants
           
static class JavaModelManager.EclipsePreferencesListener
          Update the classpath variable cache
static class JavaModelManager.PerProjectInfo
           
static class JavaModelManager.PerWorkingCopyInfo
           
 
Field Summary
 java.lang.ThreadLocal abortOnMissingSource
           
static java.lang.String ANNOTATION_PROCESSOR_MANAGER_EXTPOINT_ID
          Name of the extension point for contributing the Java 6 annotation processor manager
static int BATCH_INITIALIZATION_FINISHED
           
static int BATCH_INITIALIZATION_IN_PROGRESS
           
 int batchContainerInitializations
           
 BatchInitializationMonitor batchContainerInitializationsProgress
           
static java.lang.String COMPILATION_PARTICIPANT_EXTPOINT_ID
          Name of the extension point for contributing a compilation participant
 JavaModelManager.CompilationParticipants compilationParticipants
           
static java.lang.String COMPLETION_PERF
           
static IClasspathContainer CONTAINER_INITIALIZATION_IN_PROGRESS
           
static java.lang.String CONTAINER_INITIALIZER_PERF
           
 java.util.Hashtable containerInitializersCache
           
 java.util.HashMap containers
          Classpath containers pool
static java.lang.String CP_CONTAINER_PREFERENCES_PREFIX
           
static java.lang.String CP_ENTRY_IGNORE
           
static IPath CP_ENTRY_IGNORE_PATH
           
static boolean CP_RESOLVE_VERBOSE
           
static boolean CP_RESOLVE_VERBOSE_ADVANCED
           
static boolean CP_RESOLVE_VERBOSE_FAILURE
           
static java.lang.String CP_USERLIBRARY_PREFERENCES_PREFIX
           
static java.lang.String CP_VARIABLE_PREFERENCES_PREFIX
           
static java.lang.String CPCONTAINER_INITIALIZER_EXTPOINT_ID
          Name of the extension point for contributing classpath container initializers
static java.lang.String CPVARIABLE_INITIALIZER_EXTPOINT_ID
          Name of the extension point for contributing classpath variable initializers
static boolean DEBUG_302850
           
static java.lang.String DELTA_LISTENER_PERF
           
 DeltaProcessingState deltaState
          Holds the state used for delta processing.
 java.util.HashMap deprecatedVariables
           
protected  java.util.HashSet elementsOutOfSynchWithBuffers
          Set of elements which are out of sync with their buffers.
static java.lang.String FORMATTER_EXTPOINT_ID
          Name of the extension point for contributing a source code formatter
 IndexManager indexManager
           
static int NEED_BATCH_INITIALIZATION
           
static int NO_BATCH_INITIALIZATION
           
static ICompilationUnit[] NO_WORKING_COPY
           
static boolean PERF_CONTAINER_INITIALIZER
           
static boolean PERF_VARIABLE_INITIALIZER
           
protected  java.util.Map perProjectInfos
          Table from IProject to PerProjectInfo.
protected  java.util.Map perWorkingCopyInfos
          Table from WorkingCopyOwner to a table of ICompilationUnit (working copy handle) to PerWorkingCopyInfo.
 IEclipsePreferences[] preferencesLookup
           
 java.util.HashMap previousSessionContainers
           
 java.util.HashMap previousSessionVariables
           
 java.util.HashSet readOnlyVariables
           
static java.lang.String RECONCILE_PERF
           
 java.util.Map rootPathToAttachments
           
protected  java.util.WeakHashMap searchScopes
          A weak set of the known search scopes.
static java.lang.String SELECTION_PERF
           
static java.lang.String TRUE
           
static IPath VARIABLE_INITIALIZATION_IN_PROGRESS
          Special value used for recognizing ongoing initialization and breaking initialization cycles
static java.lang.String VARIABLE_INITIALIZER_PERF
           
 java.util.HashMap variables
          Classpath variables pool
 java.util.HashSet variablesWithInitializer
           
static boolean VERBOSE
           
 JavaWorkspaceScope workspaceScope
           
static boolean ZIP_ACCESS_VERBOSE
           
 
Method Summary
 void addInvalidArchive(IPath path)
           
 void addNonChainingJar(IPath path)
           
 java.lang.String cacheToString(java.lang.String prefix)
           
 void cacheZipFiles(java.lang.Object owner)
          Starts caching ZipFiles.
 void closeZipFile(java.util.zip.ZipFile zipFile)
           
 void configurePluginDebugOptions()
          Configure the plugin with respect to option settings defined in ".options" file
static boolean conflictsWithOutputLocation(IPath folderPath, JavaProject project)
          Returns whether the given full path (for a package) conflicts with the output location of the given project.
 IClasspathContainer containerBeingInitializedGet(IJavaProject project, IPath containerPath)
           
 void containerBeingInitializedPut(IJavaProject project, IPath containerPath, IClasspathContainer container)
           
 IClasspathContainer containerBeingInitializedRemove(IJavaProject project, IPath containerPath)
           
 IClasspathContainer containerGet(IJavaProject project, IPath containerPath)
           
 IClasspathContainer containerGetDefaultToPreviousSession(IJavaProject project, IPath containerPath)
           
 void containerPut(IJavaProject project, IPath containerPath, IClasspathContainer container)
           
 boolean containerPutIfInitializingWithSameEntries(IPath containerPath, IJavaProject[] projects, IClasspathContainer[] respectiveContainers)
           
 void containerRemove(IJavaProject project)
           
 void contentTypeChanged(ContentTypeChangeEvent event)
           
static IJavaElement create(IFile file, IJavaProject project)
          Returns the Java element corresponding to the given file, its project being the given project.
static IJavaElement create(IFolder folder, IJavaProject project)
          Returns the package fragment or package fragment root corresponding to the given folder, its parent or great parent being the given project.
static IJavaElement create(IResource resource, IJavaProject project)
          Returns the Java element corresponding to the given resource, or null if unable to associate the given resource with a Java element.
 AbstractAnnotationProcessorManager createAnnotationProcessorManager()
           
static IClassFile createClassFileFrom(IFile file, IJavaProject project)
          Creates and returns a class file element for the given .class file, its project being the given project.
static ICompilationUnit createCompilationUnitFrom(IFile file, IJavaProject project)
          Creates and returns a compilation unit element for the given .java file, its project being the given project.
static IPackageFragmentRoot createJarPackageFragmentRootFrom(IFile file, IJavaProject project)
          Creates and returns a handle for the given JAR file, its project being the given project.
 LRUCache.Stats debugNewOpenableCacheStats()
           
static IJavaElement determineIfOnClasspath(IResource resource, IJavaProject project)
          Returns the package fragment root represented by the resource, or the package fragment the given resource is located in, or null if the given resource is not on the classpath of the given project.
 int discardPerWorkingCopyInfo(CompilationUnit workingCopy)
           
 void doneSaving(ISaveContext context)
           
static void doNotUse()
           
 void flushZipFiles(java.lang.Object owner)
          Flushes ZipFiles cache if there are no more clients.
 boolean forceBatchInitializations(boolean initAfterLoad)
           
 IClasspathContainer getClasspathContainer(IPath containerPath, IJavaProject project)
           
 java.util.Hashtable getDefaultOptions()
           
 IEclipsePreferences getDefaultPreferences()
          Get default eclipse preference for JavaCore plugin.
 DeltaProcessor getDeltaProcessor()
           
static DeltaProcessingState getDeltaState()
           
protected  java.util.HashSet getElementsOutOfSynchWithBuffers()
          Returns the set of elements which are out of synch with their buffers.
 IJavaElement getExistingElement(IJavaElement element)
          Returns the existing element in the cache that is equal to the given element.
static ExternalFoldersManager getExternalManager()
           
 java.util.HashSet getExternalWorkingCopyProjects()
           
static IndexManager getIndexManager()
           
 java.lang.Object getInfo(IJavaElement element)
          Returns the info for the element.
 IEclipsePreferences getInstancePreferences()
          Get workspace eclipse preference for JavaCore plug-in.
 JavaModel getJavaModel()
          Returns the handle to the active Java Model.
static JavaModelManager getJavaModelManager()
          Returns the singleton JavaModelManager
 java.lang.Object getLastBuiltState(IProject project, IProgressMonitor monitor)
          Returns the last built state for the given project, or null if there is none.
 int getOpenableCacheSize()
           
 java.lang.String getOption(java.lang.String optionName)
           
 java.lang.String getOption(java.lang.String optionName, boolean inheritJavaCoreOptions, IEclipsePreferences projectPreferences)
          Returns the value of the given option for the given Eclipse preferences.
 int getOptionLevel(java.lang.String optionName)
          Returns the level of the given option.
 java.util.Hashtable getOptions()
           
 JavaModelManager.PerProjectInfo getPerProjectInfo(IProject project, boolean create)
           
 JavaModelManager.PerProjectInfo getPerProjectInfoCheckExistence(IProject project)
           
 JavaModelManager.PerWorkingCopyInfo getPerWorkingCopyInfo(CompilationUnit workingCopy, boolean create, boolean recordUsage, IProblemRequestor problemRequestor)
           
 IClasspathContainer getPreviousSessionContainer(IPath containerPath, IJavaProject project)
          Returns a persisted container from previous session if any.
 IPath getPreviousSessionVariable(java.lang.String variableName)
          Returns a persisted container from previous session if any
 IClasspathEntry[] getReferencedClasspathEntries(IClasspathEntry libraryEntry, IJavaProject project)
           
static java.lang.String[] getRegisteredContainerIDs()
          Returns the name of the container IDs for which an CP container initializer is registered through an extension point
static java.lang.String[] getRegisteredVariableNames()
          Returns the name of the variables for which an CP variable initializer is registered through an extension point
 IPath getResolvedVariablePath(IPath variablePath, boolean usePreviousSession)
           
 java.util.HashMap getTemporaryCache()
          Returns the temporary cache for newly opened elements for the current thread.
static UserLibraryManager getUserLibraryManager()
           
 ICompilationUnit[] getWorkingCopies(WorkingCopyOwner owner, boolean addPrimary)
           
 JavaWorkspaceScope getWorkspaceScope()
           
 java.util.zip.ZipFile getZipFile(IPath path)
          Returns the open ZipFile at the given path.
 boolean hasTemporaryCache()
           
 void initializePreferences()
          Initialize preferences lookups for JavaCore plug-in.
 char[] intern(char[] array)
           
 java.lang.String intern(java.lang.String s)
           
 boolean isClasspathBeingResolved(IJavaProject project)
           
 boolean isInvalidArchive(IPath path)
           
 boolean isNonChainingJar(IPath path)
           
 boolean knowsOption(java.lang.String optionName)
          Returns whether an option name is known or not.
 void loadVariablesAndContainers()
           
protected  java.lang.Object peekAtInfo(IJavaElement element)
          Returns the info for this element without disturbing the cache ordering.
 void prepareToSave(ISaveContext context)
           
protected  void putInfos(IJavaElement openedElement, java.util.Map newElements)
           
protected  void putJarTypeInfo(IJavaElement type, java.lang.Object info)
           
protected  java.lang.Object readState(IProject project)
          Reads the build state for the relevant project.
static void recreatePersistedContainer(java.lang.String propertyName, java.lang.String containerString, boolean addToContainerValues)
           
 void rememberScope(AbstractSearchScope scope)
          Remembers the given scope in a weak set (so no need to remove it: it will be removed by the garbage collector)
 java.lang.Object removeInfoAndChildren(JavaElement element)
           
 void removePerProjectInfo(JavaProject javaProject, boolean removeExtJarInfo)
           
 void resetClasspathListCache()
           
protected  void resetJarTypeCache()
           
 void resetProjectOptions(JavaProject javaProject)
           
 void resetProjectPreferences(JavaProject javaProject)
           
 void resetTemporaryCache()
           
 IClasspathEntry resolveVariableEntry(IClasspathEntry entry, boolean usePreviousSession)
           
 void rollback(ISaveContext context)
           
 void saving(ISaveContext context)
           
 void secondaryTypeAdding(java.lang.String path, char[] typeName, char[] packageName)
          Add a secondary type in temporary indexing cache for a project got from given path.
 java.util.Map secondaryTypes(IJavaProject project, boolean waitForIndexes, IProgressMonitor monitor)
          Get all secondary types for a project and store result in per project info cache.
 void secondaryTypesRemoving(IFile file, boolean cleanIndexCache)
          Remove from secondary types cache all types belonging to a given file.
protected  void setBuildOrder(java.lang.String[] javaBuildOrder)
          Record the order in which to build the java projects (batch build).
 void setClasspathBeingResolved(IJavaProject project, boolean classpathIsResolved)
           
 void setLastBuiltState(IProject project, java.lang.Object state)
          Sets the last built state for the given project, or null to reset it.
 void setOptions(java.util.Hashtable newOptions)
           
 void shutdown()
           
 void startup()
           
 boolean storePreference(java.lang.String optionName, java.lang.String optionValue, IEclipsePreferences eclipsePreferences)
          Store the preferences value for the given option name.
 IPath variableGet(java.lang.String variableName)
           
 java.lang.String[] variableNames()
           
 void variablePreferencesPut(java.lang.String variableName, IPath variablePath)
           
 void variablePut(java.lang.String variableName, IPath variablePath)
           
 boolean variablePutIfInitializingWithSameValue(java.lang.String[] variableNames, IPath[] variablePaths)
           
 void verifyArchiveContent(IPath path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

variables

public java.util.HashMap variables
Classpath variables pool


variablesWithInitializer

public java.util.HashSet variablesWithInitializer

deprecatedVariables

public java.util.HashMap deprecatedVariables

readOnlyVariables

public java.util.HashSet readOnlyVariables

previousSessionVariables

public java.util.HashMap previousSessionVariables

containers

public java.util.HashMap containers
Classpath containers pool


previousSessionContainers

public java.util.HashMap previousSessionContainers

NO_BATCH_INITIALIZATION

public static final int NO_BATCH_INITIALIZATION
See Also:
Constant Field Values

NEED_BATCH_INITIALIZATION

public static final int NEED_BATCH_INITIALIZATION
See Also:
Constant Field Values

BATCH_INITIALIZATION_IN_PROGRESS

public static final int BATCH_INITIALIZATION_IN_PROGRESS
See Also:
Constant Field Values

BATCH_INITIALIZATION_FINISHED

public static final int BATCH_INITIALIZATION_FINISHED
See Also:
Constant Field Values

batchContainerInitializations

public int batchContainerInitializations

batchContainerInitializationsProgress

public BatchInitializationMonitor batchContainerInitializationsProgress

containerInitializersCache

public java.util.Hashtable containerInitializersCache

workspaceScope

public JavaWorkspaceScope workspaceScope

rootPathToAttachments

public java.util.Map rootPathToAttachments

CP_VARIABLE_PREFERENCES_PREFIX

public static final java.lang.String CP_VARIABLE_PREFERENCES_PREFIX
See Also:
Constant Field Values

CP_CONTAINER_PREFERENCES_PREFIX

public static final java.lang.String CP_CONTAINER_PREFERENCES_PREFIX
See Also:
Constant Field Values

CP_USERLIBRARY_PREFERENCES_PREFIX

public static final java.lang.String CP_USERLIBRARY_PREFERENCES_PREFIX
See Also:
Constant Field Values

CP_ENTRY_IGNORE

public static final java.lang.String CP_ENTRY_IGNORE
See Also:
Constant Field Values

CP_ENTRY_IGNORE_PATH

public static final IPath CP_ENTRY_IGNORE_PATH

TRUE

public static final java.lang.String TRUE
See Also:
Constant Field Values

CPVARIABLE_INITIALIZER_EXTPOINT_ID

public static final java.lang.String CPVARIABLE_INITIALIZER_EXTPOINT_ID
Name of the extension point for contributing classpath variable initializers

See Also:
Constant Field Values

CPCONTAINER_INITIALIZER_EXTPOINT_ID

public static final java.lang.String CPCONTAINER_INITIALIZER_EXTPOINT_ID
Name of the extension point for contributing classpath container initializers

See Also:
Constant Field Values

FORMATTER_EXTPOINT_ID

public static final java.lang.String FORMATTER_EXTPOINT_ID
Name of the extension point for contributing a source code formatter

See Also:
Constant Field Values

COMPILATION_PARTICIPANT_EXTPOINT_ID

public static final java.lang.String COMPILATION_PARTICIPANT_EXTPOINT_ID
Name of the extension point for contributing a compilation participant

See Also:
Constant Field Values

ANNOTATION_PROCESSOR_MANAGER_EXTPOINT_ID

public static final java.lang.String ANNOTATION_PROCESSOR_MANAGER_EXTPOINT_ID
Name of the extension point for contributing the Java 6 annotation processor manager

See Also:
Constant Field Values

VARIABLE_INITIALIZATION_IN_PROGRESS

public static final IPath VARIABLE_INITIALIZATION_IN_PROGRESS
Special value used for recognizing ongoing initialization and breaking initialization cycles


CONTAINER_INITIALIZATION_IN_PROGRESS

public static final IClasspathContainer CONTAINER_INITIALIZATION_IN_PROGRESS

COMPLETION_PERF

public static final java.lang.String COMPLETION_PERF
See Also:
Constant Field Values

SELECTION_PERF

public static final java.lang.String SELECTION_PERF
See Also:
Constant Field Values

DELTA_LISTENER_PERF

public static final java.lang.String DELTA_LISTENER_PERF
See Also:
Constant Field Values

VARIABLE_INITIALIZER_PERF

public static final java.lang.String VARIABLE_INITIALIZER_PERF
See Also:
Constant Field Values

CONTAINER_INITIALIZER_PERF

public static final java.lang.String CONTAINER_INITIALIZER_PERF
See Also:
Constant Field Values

RECONCILE_PERF

public static final java.lang.String RECONCILE_PERF
See Also:
Constant Field Values

PERF_VARIABLE_INITIALIZER

public static boolean PERF_VARIABLE_INITIALIZER

PERF_CONTAINER_INITIALIZER

public static boolean PERF_CONTAINER_INITIALIZER

NO_WORKING_COPY

public static final ICompilationUnit[] NO_WORKING_COPY

preferencesLookup

public final IEclipsePreferences[] preferencesLookup

compilationParticipants

public final JavaModelManager.CompilationParticipants compilationParticipants

abortOnMissingSource

public java.lang.ThreadLocal abortOnMissingSource

elementsOutOfSynchWithBuffers

protected java.util.HashSet elementsOutOfSynchWithBuffers
Set of elements which are out of sync with their buffers.


deltaState

public DeltaProcessingState deltaState
Holds the state used for delta processing.


indexManager

public IndexManager indexManager

perProjectInfos

protected java.util.Map perProjectInfos
Table from IProject to PerProjectInfo. NOTE: this object itself is used as a lock to synchronize creation/removal of per project infos


perWorkingCopyInfos

protected java.util.Map perWorkingCopyInfos
Table from WorkingCopyOwner to a table of ICompilationUnit (working copy handle) to PerWorkingCopyInfo. NOTE: this object itself is used as a lock to synchronize creation/removal of per working copy infos


searchScopes

protected java.util.WeakHashMap searchScopes
A weak set of the known search scopes.


VERBOSE

public static boolean VERBOSE

CP_RESOLVE_VERBOSE

public static boolean CP_RESOLVE_VERBOSE

CP_RESOLVE_VERBOSE_ADVANCED

public static boolean CP_RESOLVE_VERBOSE_ADVANCED

CP_RESOLVE_VERBOSE_FAILURE

public static boolean CP_RESOLVE_VERBOSE_FAILURE

ZIP_ACCESS_VERBOSE

public static boolean ZIP_ACCESS_VERBOSE

DEBUG_302850

public static boolean DEBUG_302850
Method Detail

conflictsWithOutputLocation

public static boolean conflictsWithOutputLocation(IPath folderPath,
                                                  JavaProject project)
Returns whether the given full path (for a package) conflicts with the output location of the given project.


containerGet

public IClasspathContainer containerGet(IJavaProject project,
                                        IPath containerPath)

containerGetDefaultToPreviousSession

public IClasspathContainer containerGetDefaultToPreviousSession(IJavaProject project,
                                                                IPath containerPath)

containerBeingInitializedPut

public void containerBeingInitializedPut(IJavaProject project,
                                         IPath containerPath,
                                         IClasspathContainer container)

containerBeingInitializedGet

public IClasspathContainer containerBeingInitializedGet(IJavaProject project,
                                                        IPath containerPath)

containerBeingInitializedRemove

public IClasspathContainer containerBeingInitializedRemove(IJavaProject project,
                                                           IPath containerPath)

containerPut

public void containerPut(IJavaProject project,
                         IPath containerPath,
                         IClasspathContainer container)

containerRemove

public void containerRemove(IJavaProject project)

containerPutIfInitializingWithSameEntries

public boolean containerPutIfInitializingWithSameEntries(IPath containerPath,
                                                         IJavaProject[] projects,
                                                         IClasspathContainer[] respectiveContainers)

create

public static IJavaElement create(IResource resource,
                                  IJavaProject project)
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.


create

public static IJavaElement create(IFile file,
                                  IJavaProject project)
Returns the Java element corresponding to the given file, its project being the given project. Returns 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.


create

public static IJavaElement create(IFolder folder,
                                  IJavaProject project)
Returns the package fragment or package fragment root corresponding to the given folder, its parent or great parent being the given project. 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.


createClassFileFrom

public static IClassFile createClassFileFrom(IFile file,
                                             IJavaProject project)
Creates and returns a class file element for the given .class file, its project being the given project. Returns null if unable to recognize the class file.


createCompilationUnitFrom

public static ICompilationUnit createCompilationUnitFrom(IFile file,
                                                         IJavaProject project)
Creates and returns a compilation unit element for the given .java file, its project being the given project. Returns null if unable to recognize the compilation unit.


createJarPackageFragmentRootFrom

public static IPackageFragmentRoot createJarPackageFragmentRootFrom(IFile file,
                                                                    IJavaProject project)
Creates and returns a handle for the given JAR file, its project being the given project. The Java model associated with the JAR's project may be created as a side effect. Returns null if unable to create a JAR package fragment root. (for example, if the JAR file represents a non-Java resource)


determineIfOnClasspath

public static IJavaElement determineIfOnClasspath(IResource resource,
                                                  IJavaProject project)
Returns the package fragment root represented by the resource, or the package fragment the given resource is located in, or null if the given resource is not on the classpath of the given project.


addNonChainingJar

public void addNonChainingJar(IPath path)

addInvalidArchive

public void addInvalidArchive(IPath path)

cacheZipFiles

public void cacheZipFiles(java.lang.Object owner)
Starts caching ZipFiles. Ignores if there are already clients.


closeZipFile

public void closeZipFile(java.util.zip.ZipFile zipFile)

configurePluginDebugOptions

public void configurePluginDebugOptions()
Configure the plugin with respect to option settings defined in ".options" file


createAnnotationProcessorManager

public AbstractAnnotationProcessorManager createAnnotationProcessorManager()

discardPerWorkingCopyInfo

public int discardPerWorkingCopyInfo(CompilationUnit workingCopy)
                              throws JavaModelException
Throws:
JavaModelException

doneSaving

public void doneSaving(ISaveContext context)
See Also:
ISaveParticipant

flushZipFiles

public void flushZipFiles(java.lang.Object owner)
Flushes ZipFiles cache if there are no more clients.


forceBatchInitializations

public boolean forceBatchInitializations(boolean initAfterLoad)

getClasspathContainer

public IClasspathContainer getClasspathContainer(IPath containerPath,
                                                 IJavaProject project)
                                          throws JavaModelException
Throws:
JavaModelException

getReferencedClasspathEntries

public IClasspathEntry[] getReferencedClasspathEntries(IClasspathEntry libraryEntry,
                                                       IJavaProject project)

getDeltaProcessor

public DeltaProcessor getDeltaProcessor()

getDeltaState

public static DeltaProcessingState getDeltaState()

getElementsOutOfSynchWithBuffers

protected java.util.HashSet getElementsOutOfSynchWithBuffers()
Returns the set of elements which are out of synch with their buffers.


getExternalManager

public static ExternalFoldersManager getExternalManager()

getIndexManager

public static IndexManager getIndexManager()

getInfo

public java.lang.Object getInfo(IJavaElement element)
Returns the info for the element.


getExistingElement

public IJavaElement getExistingElement(IJavaElement element)
Returns the existing element in the cache that is equal to the given element.


getExternalWorkingCopyProjects

public java.util.HashSet getExternalWorkingCopyProjects()

getInstancePreferences

public IEclipsePreferences getInstancePreferences()
Get workspace eclipse preference for JavaCore plug-in.


getDefaultOptions

public java.util.Hashtable getDefaultOptions()

getDefaultPreferences

public IEclipsePreferences getDefaultPreferences()
Get default eclipse preference for JavaCore plugin.


getJavaModel

public final JavaModel getJavaModel()
Returns the handle to the active Java Model.


getJavaModelManager

public static final JavaModelManager getJavaModelManager()
Returns the singleton JavaModelManager


getLastBuiltState

public java.lang.Object getLastBuiltState(IProject project,
                                          IProgressMonitor monitor)
Returns the last built state for the given project, or null if there is none. Deserializes the state if necessary. For use by image builder and evaluation support only


getOption

public java.lang.String getOption(java.lang.String optionName)

getOption

public java.lang.String getOption(java.lang.String optionName,
                                  boolean inheritJavaCoreOptions,
                                  IEclipsePreferences projectPreferences)
Returns the value of the given option for the given Eclipse preferences. If no value was already set, then inherits from the global options if specified.

Parameters:
optionName - The name of the option
inheritJavaCoreOptions - Tells whether the value can be inherited from global JavaCore options
projectPreferences - The eclipse preferences from which to get the value
Returns:
The value of the option. May be null

knowsOption

public boolean knowsOption(java.lang.String optionName)
Returns whether an option name is known or not.

Parameters:
optionName - The name of the option
Returns:
true when the option name is either valid or deprecated, false otherwise.

getOptionLevel

public int getOptionLevel(java.lang.String optionName)
Returns the level of the given option.

Parameters:
optionName - The name of the option
Returns:
The level of the option as an int which may have the following values:

getOptions

public java.util.Hashtable getOptions()

getPerProjectInfo

public JavaModelManager.PerProjectInfo getPerProjectInfo(IProject project,
                                                         boolean create)

getPerProjectInfoCheckExistence

public JavaModelManager.PerProjectInfo getPerProjectInfoCheckExistence(IProject project)
                                                                throws JavaModelException
Throws:
JavaModelException

getPerWorkingCopyInfo

public JavaModelManager.PerWorkingCopyInfo getPerWorkingCopyInfo(CompilationUnit workingCopy,
                                                                 boolean create,
                                                                 boolean recordUsage,
                                                                 IProblemRequestor problemRequestor)

getPreviousSessionContainer

public IClasspathContainer getPreviousSessionContainer(IPath containerPath,
                                                       IJavaProject project)
Returns a persisted container from previous session if any. Note that it is not the original container from previous session (i.e. it did not get serialized) but rather a summary of its entries recreated for CP initialization purpose. As such it should not be stored into container caches.


getPreviousSessionVariable

public IPath getPreviousSessionVariable(java.lang.String variableName)
Returns a persisted container from previous session if any


getTemporaryCache

public java.util.HashMap getTemporaryCache()
Returns the temporary cache for newly opened elements for the current thread. Creates it if not already created.


getRegisteredVariableNames

public static java.lang.String[] getRegisteredVariableNames()
Returns the name of the variables for which an CP variable initializer is registered through an extension point


getRegisteredContainerIDs

public static java.lang.String[] getRegisteredContainerIDs()
Returns the name of the container IDs for which an CP container initializer is registered through an extension point


resolveVariableEntry

public IClasspathEntry resolveVariableEntry(IClasspathEntry entry,
                                            boolean usePreviousSession)

getResolvedVariablePath

public IPath getResolvedVariablePath(IPath variablePath,
                                     boolean usePreviousSession)

getUserLibraryManager

public static UserLibraryManager getUserLibraryManager()

getWorkingCopies

public ICompilationUnit[] getWorkingCopies(WorkingCopyOwner owner,
                                           boolean addPrimary)

getWorkspaceScope

public JavaWorkspaceScope getWorkspaceScope()

verifyArchiveContent

public void verifyArchiveContent(IPath path)
                          throws CoreException
Throws:
CoreException

getZipFile

public java.util.zip.ZipFile getZipFile(IPath path)
                                 throws CoreException
Returns the open ZipFile at the given path. If the ZipFile does not yet exist, it is created, opened, and added to the cache of open ZipFiles. The path must be a file system path if representing an external zip/jar, or it must be an absolute workspace relative path if representing a zip/jar inside the workspace.

Throws:
CoreException - If unable to create/open the ZipFile

hasTemporaryCache

public boolean hasTemporaryCache()

initializePreferences

public void initializePreferences()
Initialize preferences lookups for JavaCore plug-in.


intern

public char[] intern(char[] array)

intern

public java.lang.String intern(java.lang.String s)

isClasspathBeingResolved

public boolean isClasspathBeingResolved(IJavaProject project)

isNonChainingJar

public boolean isNonChainingJar(IPath path)

isInvalidArchive

public boolean isInvalidArchive(IPath path)

setClasspathBeingResolved

public void setClasspathBeingResolved(IJavaProject project,
                                      boolean classpathIsResolved)

loadVariablesAndContainers

public void loadVariablesAndContainers()
                                throws CoreException
Throws:
CoreException

peekAtInfo

protected java.lang.Object peekAtInfo(IJavaElement element)
Returns the info for this element without disturbing the cache ordering.


prepareToSave

public void prepareToSave(ISaveContext context)
See Also:
ISaveParticipant

putInfos

protected void putInfos(IJavaElement openedElement,
                        java.util.Map newElements)

putJarTypeInfo

protected void putJarTypeInfo(IJavaElement type,
                              java.lang.Object info)

readState

protected java.lang.Object readState(IProject project)
                              throws CoreException
Reads the build state for the relevant project.

Throws:
CoreException

recreatePersistedContainer

public static void recreatePersistedContainer(java.lang.String propertyName,
                                              java.lang.String containerString,
                                              boolean addToContainerValues)

rememberScope

public void rememberScope(AbstractSearchScope scope)
Remembers the given scope in a weak set (so no need to remove it: it will be removed by the garbage collector)


removeInfoAndChildren

public java.lang.Object removeInfoAndChildren(JavaElement element)
                                       throws JavaModelException
Throws:
JavaModelException

removePerProjectInfo

public void removePerProjectInfo(JavaProject javaProject,
                                 boolean removeExtJarInfo)

resetProjectOptions

public void resetProjectOptions(JavaProject javaProject)

resetProjectPreferences

public void resetProjectPreferences(JavaProject javaProject)

doNotUse

public static final void doNotUse()

resetJarTypeCache

protected void resetJarTypeCache()

resetClasspathListCache

public void resetClasspathListCache()

resetTemporaryCache

public void resetTemporaryCache()

rollback

public void rollback(ISaveContext context)
See Also:
ISaveParticipant

saving

public void saving(ISaveContext context)
            throws CoreException
Throws:
CoreException
See Also:
ISaveParticipant

secondaryTypeAdding

public void secondaryTypeAdding(java.lang.String path,
                                char[] typeName,
                                char[] packageName)
Add a secondary type in temporary indexing cache for a project got from given path. Current secondary types cache is not modified as we want to wait that indexing was finished before taking new secondary types into account. Indexing cache is a specific entry in secondary types cache which key is INDEXED_SECONDARY_TYPES and value a map with same structure than secondary types cache itself.

See Also:
secondaryTypes(IJavaProject, boolean, IProgressMonitor)

secondaryTypes

public java.util.Map secondaryTypes(IJavaProject project,
                                    boolean waitForIndexes,
                                    IProgressMonitor monitor)
                             throws JavaModelException
Get all secondary types for a project and store result in per project info cache. This cache is an Hashtable>: - key: package name - value: + key: type name + value: java model handle for the secondary type Hashtable was used to protect callers from possible concurrent access. Note that this map may have a specific entry which key is INDEXED_SECONDARY_TYPES and value is a map containing all secondary types created during indexing. When this key is in cache and indexing is finished, returned map is merged with the value of this special key. If indexing is not finished and caller does not wait for the end of indexing, returned map is the current secondary types cache content which may be invalid...

Parameters:
project - Project we want get secondary types from
Returns:
HashMap Table of secondary type names->path for given project
Throws:
JavaModelException

secondaryTypesRemoving

public void secondaryTypesRemoving(IFile file,
                                   boolean cleanIndexCache)
Remove from secondary types cache all types belonging to a given file. Clean secondary types cache built while indexing if requested. Project's secondary types cache is found using file location.

Parameters:
file - File to remove

setBuildOrder

protected void setBuildOrder(java.lang.String[] javaBuildOrder)
                      throws JavaModelException
Record the order in which to build the java projects (batch build). This order is based on the projects classpath settings.

Throws:
JavaModelException

setLastBuiltState

public void setLastBuiltState(IProject project,
                              java.lang.Object state)
Sets the last built state for the given project, or null to reset it.


storePreference

public boolean storePreference(java.lang.String optionName,
                               java.lang.String optionValue,
                               IEclipsePreferences eclipsePreferences)
Store the preferences value for the given option name.

Parameters:
optionName - The name of the option
optionValue - The value of the option. If null, then the option will be removed from the preferences instead.
eclipsePreferences - The eclipse preferences to be updated
Returns:
true if the preferences have been changed, false otherwise.

setOptions

public void setOptions(java.util.Hashtable newOptions)

startup

public void startup()
             throws CoreException
Throws:
CoreException

shutdown

public void shutdown()

variableGet

public IPath variableGet(java.lang.String variableName)

variableNames

public java.lang.String[] variableNames()

variablePut

public void variablePut(java.lang.String variableName,
                        IPath variablePath)

variablePreferencesPut

public void variablePreferencesPut(java.lang.String variableName,
                                   IPath variablePath)

variablePutIfInitializingWithSameValue

public boolean variablePutIfInitializingWithSameValue(java.lang.String[] variableNames,
                                                      IPath[] variablePaths)

contentTypeChanged

public void contentTypeChanged(ContentTypeChangeEvent event)

cacheToString

public java.lang.String cacheToString(java.lang.String prefix)

debugNewOpenableCacheStats

public LRUCache.Stats debugNewOpenableCacheStats()

getOpenableCacheSize

public int getOpenableCacheSize()