public class JavaModelManager
extends java.lang.Object
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().
| Modifier and Type | Class and Description |
|---|---|
static class |
JavaModelManager.ArchiveValidity |
static class |
JavaModelManager.CompilationParticipants |
static class |
JavaModelManager.EclipsePreferencesListener
Update the classpath variable cache
|
static class |
JavaModelManager.PerProjectInfo |
static class |
JavaModelManager.PerWorkingCopyInfo |
| Modifier and Type | Field and Description |
|---|---|
java.lang.ThreadLocal<java.lang.Boolean> |
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_CLASSPATH |
static boolean |
DEBUG_INVALID_ARCHIVES |
static java.lang.String |
DELTA_LISTENER_PERF |
DeltaProcessingState |
deltaState
Holds the state used for delta processing.
|
java.util.HashMap |
deprecatedVariables |
protected java.util.HashSet<Openable> |
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 java.lang.String |
MAX_COMPILED_UNITS_AT_ONCE
Name of the JVM parameter to specify how many compilation units must be handled at once by the builder.
|
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 boolean |
throwIoExceptionsInGetZipFile
For use in the JDT unit tests only.
|
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 |
| Modifier and Type | Method and Description |
|---|---|
void |
addAssumedExternalFile(IPath path)
Adds the provided
IPath to the list of assumed external files. |
void |
addExternalFile(IPath path)
Adds a path to the external files cache.
|
void |
addInvalidArchive(IPath path,
JavaModelManager.ArchiveValidity reason) |
void |
addNonChainingJar(IPath path) |
java.lang.String |
cacheToString(java.lang.String prefix) |
void |
cacheZipFiles(java.lang.Object owner)
Starts caching ZipFiles.
|
void |
clearExternalFileState(IPath path)
Removes the cached state of a single entry in the externalFiles cache.
|
void |
closeZipFile(java.util.zip.ZipFile zipFile) |
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) |
JavaModelManager.ArchiveValidity |
getArchiveValidity(IPath path) |
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<Openable> |
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.
|
static java.io.File |
getLocalFile(IPath path) |
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.
|
java.util.zip.ZipFile |
getZipFile(IPath path,
boolean checkInvalidArchiveCache) |
boolean |
hasTemporaryCache() |
void |
initializePreferences()
Initialize preferences lookups for JavaCore plug-in.
|
char[] |
intern(char[] array) |
java.lang.String |
intern(java.lang.String s) |
boolean |
isAssumedExternalFile(IPath path)
Returns whether the provided
IPath appears to be an external file,
which is true if the path does not represent an internal resource, does not
exist on the file system, and does have a file extension (this is the definition
provided by ExternalFoldersManager.isExternalFolderPath(IPath)). |
boolean |
isClasspathBeingResolved(IJavaProject project) |
boolean |
isExternalFile(IPath path)
Returns the cached value for whether the file referred to by
path exists
and is a file, as determined by the return value of File.isFile(). |
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 java.lang.Object |
putInfos(IJavaElement openedElement,
java.lang.Object newInfo,
boolean forceAdd,
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) |
static void |
registerDebugOptionsListener(BundleContext context) |
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)
|
void |
removeFromInvalidArchiveCache(IPath path) |
java.lang.Object |
removeInfoAndChildren(JavaElement element) |
void |
removePerProjectInfo(JavaProject javaProject,
boolean removeExtJarInfo) |
void |
resetClasspathListCache() |
void |
resetExternalFilesCache()
Resets the entire externalFiles cache.
|
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,
java.util.Map otherOptions)
Store the preferences value for the given option name.
|
static void |
unregisterDebugOptionsListener() |
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) |
public java.util.HashMap variables
public java.util.HashSet variablesWithInitializer
public java.util.HashMap deprecatedVariables
public java.util.HashSet readOnlyVariables
public java.util.HashMap previousSessionVariables
public java.util.HashMap containers
public java.util.HashMap previousSessionContainers
public static final int NO_BATCH_INITIALIZATION
public static final int NEED_BATCH_INITIALIZATION
public static final int BATCH_INITIALIZATION_IN_PROGRESS
public static final int BATCH_INITIALIZATION_FINISHED
public int batchContainerInitializations
public BatchInitializationMonitor batchContainerInitializationsProgress
public java.util.Hashtable containerInitializersCache
public JavaWorkspaceScope workspaceScope
public java.util.Map rootPathToAttachments
public static final java.lang.String CP_VARIABLE_PREFERENCES_PREFIX
public static final java.lang.String CP_CONTAINER_PREFERENCES_PREFIX
public static final java.lang.String CP_USERLIBRARY_PREFERENCES_PREFIX
public static final java.lang.String CP_ENTRY_IGNORE
public static final IPath CP_ENTRY_IGNORE_PATH
public static final java.lang.String TRUE
public static final java.lang.String CPVARIABLE_INITIALIZER_EXTPOINT_ID
public static final java.lang.String CPCONTAINER_INITIALIZER_EXTPOINT_ID
public static final java.lang.String FORMATTER_EXTPOINT_ID
public static final java.lang.String COMPILATION_PARTICIPANT_EXTPOINT_ID
public static final java.lang.String ANNOTATION_PROCESSOR_MANAGER_EXTPOINT_ID
public static final java.lang.String MAX_COMPILED_UNITS_AT_ONCE
AbstractImageBuilder#MAX_AT_ONCE.public static final IPath VARIABLE_INITIALIZATION_IN_PROGRESS
public static final IClasspathContainer CONTAINER_INITIALIZATION_IN_PROGRESS
public static final java.lang.String COMPLETION_PERF
public static final java.lang.String SELECTION_PERF
public static final java.lang.String DELTA_LISTENER_PERF
public static final java.lang.String VARIABLE_INITIALIZER_PERF
public static final java.lang.String CONTAINER_INITIALIZER_PERF
public static final java.lang.String RECONCILE_PERF
public static boolean PERF_VARIABLE_INITIALIZER
public static boolean PERF_CONTAINER_INITIALIZER
public static final ICompilationUnit[] NO_WORKING_COPY
public final IEclipsePreferences[] preferencesLookup
public final JavaModelManager.CompilationParticipants compilationParticipants
public java.lang.ThreadLocal<java.lang.Boolean> abortOnMissingSource
protected java.util.HashSet<Openable> elementsOutOfSynchWithBuffers
public DeltaProcessingState deltaState
public IndexManager indexManager
protected java.util.Map perProjectInfos
protected java.util.Map perWorkingCopyInfos
protected java.util.WeakHashMap searchScopes
public static boolean VERBOSE
public static boolean DEBUG_CLASSPATH
public static boolean DEBUG_INVALID_ARCHIVES
public static boolean CP_RESOLVE_VERBOSE
public static boolean CP_RESOLVE_VERBOSE_ADVANCED
public static boolean CP_RESOLVE_VERBOSE_FAILURE
public static boolean ZIP_ACCESS_VERBOSE
public static boolean throwIoExceptionsInGetZipFile
IOException to be thrown in getZipFile(IPath) whenever it attempts to
read a zip file.public static boolean conflictsWithOutputLocation(IPath folderPath,
JavaProject project)
public IClasspathContainer containerGet(IJavaProject project, IPath containerPath)
public IClasspathContainer containerGetDefaultToPreviousSession(IJavaProject project, IPath containerPath)
public void containerBeingInitializedPut(IJavaProject project, IPath containerPath, IClasspathContainer container)
public IClasspathContainer containerBeingInitializedGet(IJavaProject project, IPath containerPath)
public IClasspathContainer containerBeingInitializedRemove(IJavaProject project, IPath containerPath)
public void containerPut(IJavaProject project, IPath containerPath, IClasspathContainer container)
public void containerRemove(IJavaProject project)
public boolean containerPutIfInitializingWithSameEntries(IPath containerPath,
IJavaProject[] projects,
IClasspathContainer[] respectiveContainers)
public static IJavaElement create(IResource resource, IJavaProject project)
null if unable to associate the given resource
with a Java element.
The resource must be one of:
IJavaProject.java file - the element returned is the corresponding ICompilationUnit.class file - the element returned is the corresponding IClassFile.jar, a .zip file, etc.) - the element returned is the corresponding IPackageFragmentRootIPackageFragmentRoot
or IPackageFragmentIJavaModelCreating a Java element has the side effect of creating and opening all of the element's parents if they are not yet open.
public static IJavaElement create(IFile file, IJavaProject project)
null if unable to associate the given file
with a Java element.
The file must be one of:
.java file - the element returned is the corresponding ICompilationUnit.class file - the element returned is the corresponding IClassFile.jar, a .zip file, etc.) - the element returned is the corresponding IPackageFragmentRootCreating a Java element has the side effect of creating and opening all of the element's parents if they are not yet open.
public static IJavaElement create(IFolder folder, IJavaProject project)
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.
public static IClassFile createClassFileFrom(IFile file, IJavaProject project)
.class file,
its project being the given project. Returns null if unable
to recognize the class file.public static ICompilationUnit createCompilationUnitFrom(IFile file, IJavaProject project)
.java
file, its project being the given project. Returns null if unable
to recognize the compilation unit.public static IPackageFragmentRoot createJarPackageFragmentRootFrom(IFile file, IJavaProject project)
null if unable to create a JAR package fragment root.
(for example, if the JAR file represents a non-Java resource)public static IJavaElement determineIfOnClasspath(IResource resource, IJavaProject project)
null
if the given resource is not on the classpath of the given project.public void addNonChainingJar(IPath path)
public void addInvalidArchive(IPath path,
JavaModelManager.ArchiveValidity reason)
public void addExternalFile(IPath path)
File.isFile().public void cacheZipFiles(java.lang.Object owner)
public void closeZipFile(java.util.zip.ZipFile zipFile)
public static void registerDebugOptionsListener(BundleContext context)
public static void unregisterDebugOptionsListener()
public AbstractAnnotationProcessorManager createAnnotationProcessorManager()
public int discardPerWorkingCopyInfo(CompilationUnit workingCopy) throws JavaModelException
JavaModelExceptionpublic void doneSaving(ISaveContext context)
ISaveParticipantpublic void flushZipFiles(java.lang.Object owner)
public boolean forceBatchInitializations(boolean initAfterLoad)
public IClasspathContainer getClasspathContainer(IPath containerPath, IJavaProject project) throws JavaModelException
JavaModelExceptionpublic IClasspathEntry[] getReferencedClasspathEntries(IClasspathEntry libraryEntry, IJavaProject project)
public DeltaProcessor getDeltaProcessor()
public static DeltaProcessingState getDeltaState()
protected java.util.HashSet<Openable> getElementsOutOfSynchWithBuffers()
public static ExternalFoldersManager getExternalManager()
public static IndexManager getIndexManager()
public java.lang.Object getInfo(IJavaElement element)
public IJavaElement getExistingElement(IJavaElement element)
public java.util.HashSet getExternalWorkingCopyProjects()
public IEclipsePreferences getInstancePreferences()
public java.util.Hashtable getDefaultOptions()
public IEclipsePreferences getDefaultPreferences()
public final JavaModel getJavaModel()
public static final JavaModelManager getJavaModelManager()
public java.lang.Object getLastBuiltState(IProject project,
IProgressMonitor monitor)
public java.lang.String getOption(java.lang.String optionName)
public java.lang.String getOption(java.lang.String optionName,
boolean inheritJavaCoreOptions,
IEclipsePreferences projectPreferences)
optionName - The name of the optioninheritJavaCoreOptions - Tells whether the value can be inherited from global JavaCore optionsprojectPreferences - The eclipse preferences from which to get the valuenullpublic boolean knowsOption(java.lang.String optionName)
optionName - The name of the optiontrue when the option name is either
valid or deprecated,
false otherwise.public int getOptionLevel(java.lang.String optionName)
optionName - The name of the optionUNKNOWN_OPTION: the given option is unknownDEPRECATED_OPTION: the given option is deprecatedVALID_OPTION: the given option is validpublic java.util.Hashtable getOptions()
public JavaModelManager.PerProjectInfo getPerProjectInfo(IProject project, boolean create)
public JavaModelManager.PerProjectInfo getPerProjectInfoCheckExistence(IProject project) throws JavaModelException
JavaModelExceptionpublic JavaModelManager.PerWorkingCopyInfo getPerWorkingCopyInfo(CompilationUnit workingCopy, boolean create, boolean recordUsage, IProblemRequestor problemRequestor)
public IClasspathContainer getPreviousSessionContainer(IPath containerPath, IJavaProject project)
public IPath getPreviousSessionVariable(java.lang.String variableName)
public java.util.HashMap getTemporaryCache()
public static java.lang.String[] getRegisteredVariableNames()
public static java.lang.String[] getRegisteredContainerIDs()
public IClasspathEntry resolveVariableEntry(IClasspathEntry entry, boolean usePreviousSession)
public IPath getResolvedVariablePath(IPath variablePath,
boolean usePreviousSession)
public static UserLibraryManager getUserLibraryManager()
public ICompilationUnit[] getWorkingCopies(WorkingCopyOwner owner, boolean addPrimary)
public JavaWorkspaceScope getWorkspaceScope()
public void verifyArchiveContent(IPath path)
throws CoreException
CoreExceptionpublic java.util.zip.ZipFile getZipFile(IPath path)
throws CoreException
CoreException - If unable to create/open the ZipFile. The
cause will be a ZipException if the file was corrupt, a
FileNotFoundException if the file does not exist, or a
IOException if we were unable to read the file.public java.util.zip.ZipFile getZipFile(IPath path,
boolean checkInvalidArchiveCache)
throws CoreException
CoreExceptionpublic static java.io.File getLocalFile(IPath path)
throws CoreException
CoreExceptionpublic boolean hasTemporaryCache()
public void initializePreferences()
public char[] intern(char[] array)
public java.lang.String intern(java.lang.String s)
public boolean isClasspathBeingResolved(IJavaProject project)
public boolean isNonChainingJar(IPath path)
public JavaModelManager.ArchiveValidity getArchiveValidity(IPath path)
public void removeFromInvalidArchiveCache(IPath path)
public boolean isExternalFile(IPath path)
path exists
and is a file, as determined by the return value of File.isFile().public void clearExternalFileState(IPath path)
public void resetExternalFilesCache()
public boolean isAssumedExternalFile(IPath path)
IPath appears to be an external file,
which is true if the path does not represent an internal resource, does not
exist on the file system, and does have a file extension (this is the definition
provided by ExternalFoldersManager.isExternalFolderPath(IPath)).public void addAssumedExternalFile(IPath path)
IPath to the list of assumed external files.public void setClasspathBeingResolved(IJavaProject project, boolean classpathIsResolved)
public void loadVariablesAndContainers()
throws CoreException
CoreExceptionprotected java.lang.Object peekAtInfo(IJavaElement element)
public void prepareToSave(ISaveContext context)
ISaveParticipantprotected java.lang.Object putInfos(IJavaElement openedElement, java.lang.Object newInfo, boolean forceAdd, java.util.Map newElements)
protected void putJarTypeInfo(IJavaElement type, java.lang.Object info)
protected java.lang.Object readState(IProject project)
throws CoreException
CoreExceptionpublic static void recreatePersistedContainer(java.lang.String propertyName,
java.lang.String containerString,
boolean addToContainerValues)
public void rememberScope(AbstractSearchScope scope)
public java.lang.Object removeInfoAndChildren(JavaElement element) throws JavaModelException
JavaModelExceptionpublic void removePerProjectInfo(JavaProject javaProject, boolean removeExtJarInfo)
public void resetProjectOptions(JavaProject javaProject)
public void resetProjectPreferences(JavaProject javaProject)
public static final void doNotUse()
protected void resetJarTypeCache()
public void resetClasspathListCache()
public void resetTemporaryCache()
public void rollback(ISaveContext context)
ISaveParticipantpublic void saving(ISaveContext context)
throws CoreException
CoreExceptionISaveParticipantpublic void secondaryTypeAdding(java.lang.String path,
char[] typeName,
char[] packageName)
INDEXED_SECONDARY_TYPES and value a map with same structure than
secondary types cache itself.public java.util.Map secondaryTypes(IJavaProject project, boolean waitForIndexes, IProgressMonitor monitor) throws JavaModelException
This cache is an Hashtable<String, HashMap<String, IType>>:
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...project - Project we want get secondary types fromJavaModelExceptionpublic void secondaryTypesRemoving(IFile file,
boolean cleanIndexCache)
file - File to removeprotected void setBuildOrder(java.lang.String[] javaBuildOrder)
throws JavaModelException
JavaModelExceptionpublic void setLastBuiltState(IProject project,
java.lang.Object state)
public boolean storePreference(java.lang.String optionName,
java.lang.String optionValue,
IEclipsePreferences eclipsePreferences,
java.util.Map otherOptions)
optionName - The name of the optionoptionValue - The value of the option. If null, then
the option will be removed from the preferences instead.eclipsePreferences - The eclipse preferences to be updatedotherOptions - more options being stored, used to avoid conflict between deprecated option and its compatibletrue if the preferences have been changed,
false otherwise.public void setOptions(java.util.Hashtable newOptions)
public void startup()
throws CoreException
CoreExceptionpublic void shutdown()
public IPath variableGet(java.lang.String variableName)
public java.lang.String[] variableNames()
public void variablePut(java.lang.String variableName,
IPath variablePath)
public void variablePreferencesPut(java.lang.String variableName,
IPath variablePath)
public boolean variablePutIfInitializingWithSameValue(java.lang.String[] variableNames,
IPath[] variablePaths)
public void contentTypeChanged(ContentTypeChangeEvent event)
public java.lang.String cacheToString(java.lang.String prefix)
public LRUCache.Stats debugNewOpenableCacheStats()
public int getOpenableCacheSize()