Klasse JavaModelManager
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.JavaModelManager
- Alle implementierten Schnittstellen:
EventListener,org.eclipse.core.resources.ISaveParticipant,org.eclipse.core.runtime.content.IContentTypeManager.IContentTypeChangeListener
public class JavaModelManager
extends Object
implements org.eclipse.core.resources.ISaveParticipant, org.eclipse.core.runtime.content.IContentTypeManager.IContentTypeChangeListener
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().
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic enumstatic classstatic classUpdate the classpath variable cachestatic classstatic class -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final StringName of the extension point for contributing the Java 6 annotation processor managerstatic final intstatic final intintstatic final StringName of the extension point for contributing a compilation participantstatic final Stringstatic final IClasspathContainerstatic final StringHashMap<IJavaProject,Map<org.eclipse.core.runtime.IPath, IClasspathContainer>> Classpath containers poolstatic final Stringstatic final Stringstatic final org.eclipse.core.runtime.IPathstatic booleanstatic booleanstatic booleanstatic final Stringstatic final Stringstatic final StringName of the extension point for contributing classpath container initializersstatic final StringName of the extension point for contributing classpath variable initializersstatic booleanstatic booleanstatic final StringHolds the state used for delta processing.Set of elements which are out of sync with their buffers.static final StringName of the extension point for contributing a source code formatterstatic booleanstatic final StringName of the JVM parameter to specify how many compilation units must be handled at once by the builder.static final intstatic final intstatic final ICompilationUnit[]static booleanstatic booleanprotected Map<org.eclipse.core.resources.IProject,JavaModelManager.PerProjectInfo> Table from IProject to PerProjectInfo.Table from WorkingCopyOwner to a table of ICompilationUnit (working copy handle) to PerWorkingCopyInfo.final org.eclipse.core.runtime.preferences.IEclipsePreferences[]HashMap<IJavaProject,Map<org.eclipse.core.runtime.IPath, IClasspathContainer>> static final Stringprotected WeakHashMap<AbstractSearchScope,?> A weak set of the known search scopes.static final Stringstatic booleanFor use in the JDT unit tests only.static final Stringstatic final org.eclipse.core.runtime.IPathSpecial value used for recognizing ongoing initialization and breaking initialization cyclesstatic final StringClasspath variables poolstatic booleanstatic boolean -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddAssumedExternalFile(org.eclipse.core.runtime.IPath path) Adds the providedIPathto the list of assumed external files.voidaddExternalFile(org.eclipse.core.runtime.IPath path) Adds a path to the external files cache.voidaddInvalidArchive(org.eclipse.core.runtime.IPath path, JavaModelManager.ArchiveValidity reason) voidaddNonChainingJar(org.eclipse.core.runtime.IPath path) cacheToString(String prefix) voidcacheZipFiles(Object owner) Starts caching ZipFiles.voidclearExternalFileState(org.eclipse.core.runtime.IPath path) Removes the cached state of a single entry in the externalFiles cache.voidcloseZipFile(ZipFile zipFile) static booleanconflictsWithOutputLocation(org.eclipse.core.runtime.IPath folderPath, JavaProject project) Returns whether the given full path (for a package) conflicts with the output location of the given project.containerBeingInitializedGet(IJavaProject project, org.eclipse.core.runtime.IPath containerPath) voidcontainerBeingInitializedPut(IJavaProject project, org.eclipse.core.runtime.IPath containerPath, IClasspathContainer container) containerBeingInitializedRemove(IJavaProject project, org.eclipse.core.runtime.IPath containerPath) containerGet(IJavaProject project, org.eclipse.core.runtime.IPath containerPath) containerGetDefaultToPreviousSession(IJavaProject project, org.eclipse.core.runtime.IPath containerPath) voidcontainerPut(IJavaProject project, org.eclipse.core.runtime.IPath containerPath, IClasspathContainer container) booleancontainerPutIfInitializingWithSameEntries(org.eclipse.core.runtime.IPath containerPath, IJavaProject[] projects, IClasspathContainer[] respectiveContainers) voidcontainerRemove(IJavaProject project) voidcontentTypeChanged(org.eclipse.core.runtime.content.IContentTypeManager.ContentTypeChangeEvent event) static IJavaElementcreate(org.eclipse.core.resources.IFile file, IJavaProject project) Returns the Java element corresponding to the given file, its project being the given project.static IJavaElementcreate(org.eclipse.core.resources.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 IJavaElementcreate(org.eclipse.core.resources.IResource resource, IJavaProject project) Returns the Java element corresponding to the given resource, ornullif unable to associate the given resource with a Java element.static IClassFilecreateClassFileFrom(org.eclipse.core.resources.IFile file, IJavaProject project) Creates and returns a class file element for the given.classfile, its project being the given project.static ICompilationUnitcreateCompilationUnitFrom(org.eclipse.core.resources.IFile file, IJavaProject project) Creates and returns a compilation unit element for the given.javafile, its project being the given project.static IPackageFragmentRootcreateJarPackageFragmentRootFrom(org.eclipse.core.resources.IFile file, IJavaProject project) Creates and returns a handle for the given JAR file, its project being the given project.static IJavaElementdetermineIfOnClasspath(org.eclipse.core.resources.IResource resource, IJavaProject project) Returns the package fragment root represented by the resource, or the package fragment the given resource is located in, ornullif the given resource is not on the classpath of the given project.intdiscardPerWorkingCopyInfo(CompilationUnit workingCopy) voiddoneSaving(org.eclipse.core.resources.ISaveContext context) static final voiddoNotUse()voidflushZipFiles(Object owner) Flushes ZipFiles cache if there are no more clients.booleanforceBatchInitializations(boolean initAfterLoad) getAccessRule(org.eclipse.core.runtime.IPath filePattern, int kind) Get a cached access rule, or when the cache did not contain the rule, creates a new one.getAccessRuleForProblemId(char[] filePattern, int problemId) Used only for loading rules from disk.getArchiveValidity(org.eclipse.core.runtime.IPath path) getClasspathContainer(org.eclipse.core.runtime.IPath containerPath, IJavaProject project) org.eclipse.core.runtime.preferences.IEclipsePreferencesGet default eclipse preference for JavaCore plugin.static DeltaProcessingStateReturns the set of elements which are out of synch with their buffers.getExistingElement(IJavaElement element) Returns the existing element in the cache that is equal to the given element.static ExternalFoldersManagerstatic IndexManagergetInfo(IJavaElement element) Returns the info for the element.org.eclipse.core.runtime.preferences.IEclipsePreferencesGet workspace eclipse preference for JavaCore plug-in.final JavaModelReturns the handle to the active Java Model.static final JavaModelManagerReturns the singleton JavaModelManagergetLastBuiltState(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IProgressMonitor monitor) Returns the last built state for the given project, or null if there is none.static FilegetLocalFile(org.eclipse.core.runtime.IPath path) static ModuleSourcePathManagerintgetOption(String optionName, boolean inheritJavaCoreOptions, org.eclipse.core.runtime.preferences.IEclipsePreferences projectPreferences) Returns the value of the given option for the given Eclipse preferences.intgetOptionLevel(String optionName) Returns the level of the given option.getPerProjectInfo(org.eclipse.core.resources.IProject project, boolean create) getPerProjectInfoCheckExistence(org.eclipse.core.resources.IProject project) getPerWorkingCopyInfo(CompilationUnit workingCopy, boolean create, boolean recordUsage, IProblemRequestor problemRequestor) getPreviousSessionContainer(org.eclipse.core.runtime.IPath containerPath, IJavaProject project) Returns a persisted container from previous session if any.org.eclipse.core.runtime.IPathgetPreviousSessionVariable(String variableName) Returns a persisted container from previous session if anygetReferencedClasspathEntries(IClasspathEntry libraryEntry, IJavaProject project) static String[]Returns the name of the container IDs for which an CP container initializer is registered through an extension pointstatic String[]Returns the name of the variables for which an CP variable initializer is registered through an extension pointorg.eclipse.core.runtime.IPathgetResolvedVariablePath(org.eclipse.core.runtime.IPath variablePath, boolean usePreviousSession) Returns the temporary cache for newly opened elements for the current thread.static UserLibraryManagergetWorkingCopies(WorkingCopyOwner owner, boolean addPrimary) getZipFile(org.eclipse.core.runtime.IPath path) Returns the open ZipFile at the given path.getZipFile(org.eclipse.core.runtime.IPath path, boolean checkInvalidArchiveCache) booleanvoidInitialize preferences lookups for JavaCore plug-in.char[]intern(char[] array) booleanisAssumedExternalFile(org.eclipse.core.runtime.IPath path) Returns whether the providedIPathappears 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 byExternalFoldersManager.isExternalFolderPath(org.eclipse.core.runtime.IPath)).booleanisClasspathBeingResolved(IJavaProject project) booleanisExternalFile(org.eclipse.core.runtime.IPath path) Returns the cached value for whether the file referred to bypathexists and is a file, as determined by the return value ofFile.isFile().static booleanstatic booleanisJrt(org.eclipse.core.runtime.IPath path) booleanisNonChainingJar(org.eclipse.core.runtime.IPath path) booleanknowsOption(String optionName) Returns whether an option name is known or not.voidprotected ObjectpeekAtInfo(IJavaElement element) Returns the info for this element without disturbing the cache ordering.voidprepareToSave(org.eclipse.core.resources.ISaveContext context) protected ObjectputInfos(IJavaElement openedElement, Object newInfo, boolean forceAdd, Map<IJavaElement, Object> newElements) protected voidputJarTypeInfo(IJavaElement type, Object info) Remember the info for the jar binary typeprotected ObjectreadState(org.eclipse.core.resources.IProject project) Reads the build state for the relevant project.static voidrecreatePersistedContainer(String propertyName, String containerString, boolean addToContainerValues) static voidregisterDebugOptionsListener(org.osgi.framework.BundleContext context) voidrememberScope(AbstractSearchScope scope) Remembers the given scope in a weak set (so no need to remove it: it will be removed by the garbage collector)voidremoveFromInvalidArchiveCache(org.eclipse.core.runtime.IPath path) removeInfoAndChildren(JavaElement element) voidremovePerProjectInfo(JavaProject javaProject, boolean removeExtJarInfo) voidvoidResets the entire externalFiles cache.protected voidvoidresetProjectOptions(JavaProject javaProject) voidresetProjectPreferences(JavaProject javaProject) voidresolveVariableEntry(IClasspathEntry entry, boolean usePreviousSession) voidrollback(org.eclipse.core.resources.ISaveContext context) voidsaving(org.eclipse.core.resources.ISaveContext context) voidsecondaryTypeAdding(String path, char[] typeName, char[] packageName) Add a secondary type in temporary indexing cache for a project got from given path.secondaryTypes(IJavaProject project, boolean waitForIndexes, org.eclipse.core.runtime.IProgressMonitor monitor) Get all secondary types for a project and store result in per project info cache.voidsecondaryTypesRemoving(org.eclipse.core.resources.IFile file, boolean cleanIndexCache) Remove from secondary types cache all types belonging to a given file.protected voidsetBuildOrder(String[] javaBuildOrder) Record the order in which to build the java projects (batch build).voidsetClasspathBeingResolved(IJavaProject project, boolean classpathIsResolved) voidsetLastBuiltState(org.eclipse.core.resources.IProject project, Object state) Sets the last built state for the given project, or null to reset it.voidsetOptions(Hashtable<String, String> newOptions) voidshutdown()voidstartup()booleanstorePreference(String optionName, String optionValue, org.eclipse.core.runtime.preferences.IEclipsePreferences eclipsePreferences, Map<String, String> otherOptions) Store the preferences value for the given option name.static voidorg.eclipse.core.runtime.IPathvariableGet(String variableName) String[]voidvariablePreferencesPut(String variableName, org.eclipse.core.runtime.IPath variablePath) voidvariablePut(String variableName, org.eclipse.core.runtime.IPath variablePath) booleanvariablePutIfInitializingWithSameValue(String[] variableNames, org.eclipse.core.runtime.IPath[] variablePaths) voidverifyArchiveContent(org.eclipse.core.runtime.IPath path)
-
Felddetails
-
variables
Classpath variables pool -
variablesWithInitializer
-
deprecatedVariables
-
readOnlyVariables
-
previousSessionVariables
-
containers
Classpath containers pool -
previousSessionContainers
public HashMap<IJavaProject,Map<org.eclipse.core.runtime.IPath, previousSessionContainersIClasspathContainer>> -
NO_BATCH_INITIALIZATION
public static final int NO_BATCH_INITIALIZATION- Siehe auch:
-
NEED_BATCH_INITIALIZATION
public static final int NEED_BATCH_INITIALIZATION- Siehe auch:
-
BATCH_INITIALIZATION_IN_PROGRESS
public static final int BATCH_INITIALIZATION_IN_PROGRESS- Siehe auch:
-
BATCH_INITIALIZATION_FINISHED
public static final int BATCH_INITIALIZATION_FINISHED- Siehe auch:
-
batchContainerInitializations
public int batchContainerInitializations -
batchContainerInitializationsLock
-
batchContainerInitializationsProgress
-
containerInitializersCache
-
workspaceScope
-
rootPathToAttachments
-
CP_VARIABLE_PREFERENCES_PREFIX
- Siehe auch:
-
CP_CONTAINER_PREFERENCES_PREFIX
- Siehe auch:
-
CP_USERLIBRARY_PREFERENCES_PREFIX
- Siehe auch:
-
CP_ENTRY_IGNORE
- Siehe auch:
-
CP_ENTRY_IGNORE_PATH
public static final org.eclipse.core.runtime.IPath CP_ENTRY_IGNORE_PATH -
TRUE
- Siehe auch:
-
CPVARIABLE_INITIALIZER_EXTPOINT_ID
Name of the extension point for contributing classpath variable initializers- Siehe auch:
-
CPCONTAINER_INITIALIZER_EXTPOINT_ID
Name of the extension point for contributing classpath container initializers- Siehe auch:
-
FORMATTER_EXTPOINT_ID
Name of the extension point for contributing a source code formatter- Siehe auch:
-
COMPILATION_PARTICIPANT_EXTPOINT_ID
Name of the extension point for contributing a compilation participant- Siehe auch:
-
ANNOTATION_PROCESSOR_MANAGER_EXTPOINT_ID
Name of the extension point for contributing the Java 6 annotation processor manager- Siehe auch:
-
MAX_COMPILED_UNITS_AT_ONCE
Name of the JVM parameter to specify how many compilation units must be handled at once by the builder. The default value is represented byAbstractImageBuilder#MAX_AT_ONCE.- Siehe auch:
-
VARIABLE_INITIALIZATION_IN_PROGRESS
public static final org.eclipse.core.runtime.IPath VARIABLE_INITIALIZATION_IN_PROGRESSSpecial value used for recognizing ongoing initialization and breaking initialization cycles -
CONTAINER_INITIALIZATION_IN_PROGRESS
-
COMPLETION_PERF
- Siehe auch:
-
SELECTION_PERF
- Siehe auch:
-
DELTA_LISTENER_PERF
- Siehe auch:
-
VARIABLE_INITIALIZER_PERF
- Siehe auch:
-
CONTAINER_INITIALIZER_PERF
- Siehe auch:
-
RECONCILE_PERF
- Siehe auch:
-
PERF_VARIABLE_INITIALIZER
public static boolean PERF_VARIABLE_INITIALIZER -
PERF_CONTAINER_INITIALIZER
public static boolean PERF_CONTAINER_INITIALIZER -
NO_WORKING_COPY
-
preferencesLookup
public final org.eclipse.core.runtime.preferences.IEclipsePreferences[] preferencesLookup -
compilationParticipants
-
abortOnMissingSource
-
elementsOutOfSynchWithBuffers
Set of elements which are out of sync with their buffers. -
deltaState
Holds the state used for delta processing. -
indexManager
-
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 HashMap<WorkingCopyOwner,Map<CompilationUnit, perWorkingCopyInfosJavaModelManager.PerWorkingCopyInfo>> 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
A weak set of the known search scopes. -
VERBOSE
public static boolean VERBOSE -
DEBUG_CLASSPATH
public static boolean DEBUG_CLASSPATH -
DEBUG_INVALID_ARCHIVES
public static boolean DEBUG_INVALID_ARCHIVES -
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 -
JRT_ACCESS_VERBOSE
public static boolean JRT_ACCESS_VERBOSE -
throwIoExceptionsInGetZipFile
public static boolean throwIoExceptionsInGetZipFileFor use in the JDT unit tests only. Used for testing error handling. Causes anIOExceptionto be thrown ingetZipFile(org.eclipse.core.runtime.IPath)whenever it attempts to read a zip file.
-
-
Methodendetails
-
conflictsWithOutputLocation
public static boolean conflictsWithOutputLocation(org.eclipse.core.runtime.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, org.eclipse.core.runtime.IPath containerPath) -
containerGetDefaultToPreviousSession
public IClasspathContainer containerGetDefaultToPreviousSession(IJavaProject project, org.eclipse.core.runtime.IPath containerPath) -
containerBeingInitializedPut
public void containerBeingInitializedPut(IJavaProject project, org.eclipse.core.runtime.IPath containerPath, IClasspathContainer container) -
containerBeingInitializedGet
public IClasspathContainer containerBeingInitializedGet(IJavaProject project, org.eclipse.core.runtime.IPath containerPath) -
containerBeingInitializedRemove
public IClasspathContainer containerBeingInitializedRemove(IJavaProject project, org.eclipse.core.runtime.IPath containerPath) -
containerPut
public void containerPut(IJavaProject project, org.eclipse.core.runtime.IPath containerPath, IClasspathContainer container) -
containerRemove
-
containerPutIfInitializingWithSameEntries
public boolean containerPutIfInitializingWithSameEntries(org.eclipse.core.runtime.IPath containerPath, IJavaProject[] projects, IClasspathContainer[] respectiveContainers) -
create
public static IJavaElement create(org.eclipse.core.resources.IResource resource, IJavaProject project) Returns the Java element corresponding to the given resource, ornullif unable to associate the given resource with a Java element.The resource must be one of:
- a project - the element returned is the corresponding
IJavaProject - a
.javafile - the element returned is the correspondingICompilationUnit - a
.classfile - the element returned is the correspondingIClassFile - a ZIP archive (e.g. a
.jar, a.zipfile, etc.) - the element returned is the correspondingIPackageFragmentRoot - a folder - the element returned is the corresponding
IPackageFragmentRootorIPackageFragment - the workspace root resource - the element returned is the
IJavaModel
Creating a Java element has the side effect of creating and opening all of the element's parents if they are not yet open.
- a project - the element returned is the corresponding
-
create
Returns the Java element corresponding to the given file, its project being the given project. Returnsnullif unable to associate the given file with a Java element.The file must be one of:
- a
.javafile - the element returned is the correspondingICompilationUnit - a
.classfile - the element returned is the correspondingIClassFile - a ZIP archive (e.g. a
.jar, a.zipfile, etc.) - the element returned is the correspondingIPackageFragmentRoot
Creating a Java element has the side effect of creating and opening all of the element's parents if they are not yet open.
- a
-
create
Returns the package fragment or package fragment root corresponding to the given folder, its parent or great parent being the given project. ornullif 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(org.eclipse.core.resources.IFile file, IJavaProject project) Creates and returns a class file element for the given.classfile, its project being the given project. Returnsnullif unable to recognize the class file. -
createCompilationUnitFrom
public static ICompilationUnit createCompilationUnitFrom(org.eclipse.core.resources.IFile file, IJavaProject project) Creates and returns a compilation unit element for the given.javafile, its project being the given project. Returnsnullif unable to recognize the compilation unit. -
createJarPackageFragmentRootFrom
public static IPackageFragmentRoot createJarPackageFragmentRootFrom(org.eclipse.core.resources.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. Returnsnullif unable to create a JAR package fragment root. (for example, if the JAR file represents a non-Java resource) -
determineIfOnClasspath
public static IJavaElement determineIfOnClasspath(org.eclipse.core.resources.IResource resource, IJavaProject project) Returns the package fragment root represented by the resource, or the package fragment the given resource is located in, ornullif the given resource is not on the classpath of the given project. -
addNonChainingJar
public void addNonChainingJar(org.eclipse.core.runtime.IPath path) -
addInvalidArchive
public void addInvalidArchive(org.eclipse.core.runtime.IPath path, JavaModelManager.ArchiveValidity reason) -
addExternalFile
public void addExternalFile(org.eclipse.core.runtime.IPath path) Adds a path to the external files cache. It is the responsibility of callers to determine the file's existence, as determined byFile.isFile(). -
cacheZipFiles
Starts caching ZipFiles. Ignores if there are already clients. -
closeZipFile
-
registerDebugOptionsListener
public static void registerDebugOptionsListener(org.osgi.framework.BundleContext context) -
unregisterDebugOptionsListener
public static void unregisterDebugOptionsListener() -
createAnnotationProcessorManager
-
discardPerWorkingCopyInfo
- Löst aus:
JavaModelException
-
doneSaving
public void doneSaving(org.eclipse.core.resources.ISaveContext context) - Angegeben von:
doneSavingin Schnittstelleorg.eclipse.core.resources.ISaveParticipant- Siehe auch:
-
ISaveParticipant
-
flushZipFiles
Flushes ZipFiles cache if there are no more clients. -
forceBatchInitializations
public boolean forceBatchInitializations(boolean initAfterLoad) -
getClasspathContainer
public IClasspathContainer getClasspathContainer(org.eclipse.core.runtime.IPath containerPath, IJavaProject project) throws JavaModelException - Löst aus:
JavaModelException
-
getReferencedClasspathEntries
public IClasspathEntry[] getReferencedClasspathEntries(IClasspathEntry libraryEntry, IJavaProject project) -
getDeltaProcessor
-
getDeltaState
-
getElementsOutOfSynchWithBuffers
Returns the set of elements which are out of synch with their buffers. -
getExternalManager
-
getIndexManager
-
getInfo
Returns the info for the element. -
getExistingElement
Returns the existing element in the cache that is equal to the given element. -
getExternalWorkingCopyProjects
-
getInstancePreferences
public org.eclipse.core.runtime.preferences.IEclipsePreferences getInstancePreferences()Get workspace eclipse preference for JavaCore plug-in. -
getDefaultOptions
-
getDefaultPreferences
public org.eclipse.core.runtime.preferences.IEclipsePreferences getDefaultPreferences()Get default eclipse preference for JavaCore plugin. -
getJavaModel
Returns the handle to the active Java Model. -
getJavaModelManager
Returns the singleton JavaModelManager -
getLastBuiltState
public Object getLastBuiltState(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.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
-
getOption
public String getOption(String optionName, boolean inheritJavaCoreOptions, org.eclipse.core.runtime.preferences.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.- Parameter:
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 value- Gibt zurück:
- The value of the option. May be
null
-
knowsOption
Returns whether an option name is known or not.- Parameter:
optionName- The name of the option- Gibt zurück:
truewhen the option name is eithervalidordeprecated,falseotherwise.
-
getOptionLevel
Returns the level of the given option.- Parameter:
optionName- The name of the option- Gibt zurück:
- The level of the option as an int which may have the following
values:
UNKNOWN_OPTION: the given option is unknownDEPRECATED_OPTION: the given option is deprecatedVALID_OPTION: the given option is valid
-
getOptions
-
getPerProjectInfo
public JavaModelManager.PerProjectInfo getPerProjectInfo(org.eclipse.core.resources.IProject project, boolean create) -
getPerProjectInfoCheckExistence
public JavaModelManager.PerProjectInfo getPerProjectInfoCheckExistence(org.eclipse.core.resources.IProject project) throws JavaModelException - Löst aus:
JavaModelException
-
getPerWorkingCopyInfo
public JavaModelManager.PerWorkingCopyInfo getPerWorkingCopyInfo(CompilationUnit workingCopy, boolean create, boolean recordUsage, IProblemRequestor problemRequestor) -
getPreviousSessionContainer
public IClasspathContainer getPreviousSessionContainer(org.eclipse.core.runtime.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
Returns a persisted container from previous session if any -
getTemporaryCache
Returns the temporary cache for newly opened elements for the current thread. Creates it if not already created. -
getRegisteredVariableNames
Returns the name of the variables for which an CP variable initializer is registered through an extension point -
getRegisteredContainerIDs
Returns the name of the container IDs for which an CP container initializer is registered through an extension point -
resolveVariableEntry
-
getResolvedVariablePath
public org.eclipse.core.runtime.IPath getResolvedVariablePath(org.eclipse.core.runtime.IPath variablePath, boolean usePreviousSession) -
getUserLibraryManager
-
getModulePathManager
-
getWorkingCopies
-
getWorkspaceScope
-
isJrt
public static boolean isJrt(org.eclipse.core.runtime.IPath path) -
isJrt
-
verifyArchiveContent
public void verifyArchiveContent(org.eclipse.core.runtime.IPath path) throws org.eclipse.core.runtime.CoreException - Löst aus:
org.eclipse.core.runtime.CoreException
-
getZipFile
public ZipFile getZipFile(org.eclipse.core.runtime.IPath path) throws org.eclipse.core.runtime.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.- Löst aus:
org.eclipse.core.runtime.CoreException- If unable to create/open the ZipFile. The cause will be aZipExceptionif the file was corrupt, aFileNotFoundExceptionif the file does not exist, or aIOExceptionif we were unable to read the file.
-
getZipFile
public ZipFile getZipFile(org.eclipse.core.runtime.IPath path, boolean checkInvalidArchiveCache) throws org.eclipse.core.runtime.CoreException - Löst aus:
org.eclipse.core.runtime.CoreException
-
getLocalFile
public static File getLocalFile(org.eclipse.core.runtime.IPath path) throws org.eclipse.core.runtime.CoreException - Löst aus:
org.eclipse.core.runtime.CoreException
-
hasTemporaryCache
public boolean hasTemporaryCache() -
initializePreferences
public void initializePreferences()Initialize preferences lookups for JavaCore plug-in. -
intern
public char[] intern(char[] array) -
intern
-
isClasspathBeingResolved
-
isNonChainingJar
public boolean isNonChainingJar(org.eclipse.core.runtime.IPath path) -
getArchiveValidity
-
removeFromInvalidArchiveCache
public void removeFromInvalidArchiveCache(org.eclipse.core.runtime.IPath path) -
isExternalFile
public boolean isExternalFile(org.eclipse.core.runtime.IPath path) Returns the cached value for whether the file referred to bypathexists and is a file, as determined by the return value ofFile.isFile(). -
clearExternalFileState
public void clearExternalFileState(org.eclipse.core.runtime.IPath path) Removes the cached state of a single entry in the externalFiles cache. -
resetExternalFilesCache
public void resetExternalFilesCache()Resets the entire externalFiles cache. -
isAssumedExternalFile
public boolean isAssumedExternalFile(org.eclipse.core.runtime.IPath path) Returns whether the providedIPathappears 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 byExternalFoldersManager.isExternalFolderPath(org.eclipse.core.runtime.IPath)). -
addAssumedExternalFile
public void addAssumedExternalFile(org.eclipse.core.runtime.IPath path) Adds the providedIPathto the list of assumed external files. -
setClasspathBeingResolved
-
loadVariablesAndContainers
public void loadVariablesAndContainers() throws org.eclipse.core.runtime.CoreException- Löst aus:
org.eclipse.core.runtime.CoreException
-
peekAtInfo
Returns the info for this element without disturbing the cache ordering. -
prepareToSave
public void prepareToSave(org.eclipse.core.resources.ISaveContext context) - Angegeben von:
prepareToSavein Schnittstelleorg.eclipse.core.resources.ISaveParticipant- Siehe auch:
-
ISaveParticipant
-
putInfos
protected Object putInfos(IJavaElement openedElement, Object newInfo, boolean forceAdd, Map<IJavaElement, Object> newElements) -
putJarTypeInfo
Remember the info for the jar binary type- Parameter:
info- instanceof IBinaryType orJavaModelCache.NON_EXISTING_JAR_TYPE_INFO
-
readState
protected Object readState(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException Reads the build state for the relevant project.- Löst aus:
org.eclipse.core.runtime.CoreException
-
recreatePersistedContainer
-
rememberScope
Remembers the given scope in a weak set (so no need to remove it: it will be removed by the garbage collector) -
removeInfoAndChildren
- Löst aus:
JavaModelException
-
removePerProjectInfo
-
resetProjectOptions
-
resetProjectPreferences
-
doNotUse
public static final void doNotUse() -
resetJarTypeCache
protected void resetJarTypeCache() -
resetClasspathListCache
public void resetClasspathListCache() -
resetTemporaryCache
public void resetTemporaryCache() -
rollback
public void rollback(org.eclipse.core.resources.ISaveContext context) - Angegeben von:
rollbackin Schnittstelleorg.eclipse.core.resources.ISaveParticipant- Siehe auch:
-
ISaveParticipant
-
saving
public void saving(org.eclipse.core.resources.ISaveContext context) throws org.eclipse.core.runtime.CoreException - Angegeben von:
savingin Schnittstelleorg.eclipse.core.resources.ISaveParticipant- Löst aus:
org.eclipse.core.runtime.CoreException- Siehe auch:
-
ISaveParticipant
-
secondaryTypeAdding
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. -
secondaryTypes
public Map<String,Map<String, secondaryTypesIType>> (IJavaProject project, boolean waitForIndexes, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException Get all secondary types for a project and store result in per project info cache.This cache is an
Hashtable<String, HashMap<String, IType>>:- key: package name
- value:
- key: type name
- value: java model handle for the secondary type
- Parameter:
project- Project we want get secondary types from- Gibt zurück:
- HashMap Table of secondary type names->path for given project
- Löst aus:
JavaModelException
-
secondaryTypesRemoving
public void secondaryTypesRemoving(org.eclipse.core.resources.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.- Parameter:
file- File to remove
-
setBuildOrder
Record the order in which to build the java projects (batch build). This order is based on the projects classpath settings.- Löst aus:
JavaModelException
-
setLastBuiltState
Sets the last built state for the given project, or null to reset it. -
storePreference
public boolean storePreference(String optionName, String optionValue, org.eclipse.core.runtime.preferences.IEclipsePreferences eclipsePreferences, Map<String, String> otherOptions) Store the preferences value for the given option name.- Parameter:
optionName- The name of the optionoptionValue- The value of the option. Ifnull, 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 compatible- Gibt zurück:
trueif the preferences have been changed,falseotherwise.
-
setOptions
-
startup
public void startup() throws org.eclipse.core.runtime.CoreException- Löst aus:
org.eclipse.core.runtime.CoreException
-
shutdown
public void shutdown() -
variableGet
-
variableNames
-
variablePut
-
variablePreferencesPut
public void variablePreferencesPut(String variableName, org.eclipse.core.runtime.IPath variablePath) -
variablePutIfInitializingWithSameValue
public boolean variablePutIfInitializingWithSameValue(String[] variableNames, org.eclipse.core.runtime.IPath[] variablePaths) -
contentTypeChanged
public void contentTypeChanged(org.eclipse.core.runtime.content.IContentTypeManager.ContentTypeChangeEvent event) - Angegeben von:
contentTypeChangedin Schnittstelleorg.eclipse.core.runtime.content.IContentTypeManager.IContentTypeChangeListener
-
cacheToString
-
debugNewOpenableCacheStats
-
getOpenableCacheSize
public int getOpenableCacheSize() -
getAccessRule
Get a cached access rule, or when the cache did not contain the rule, creates a new one.- Parameter:
filePattern- the file pattern this access rule should matchkind- one ofIAccessRule.K_ACCESSIBLE,IAccessRule.K_DISCOURAGED, orIAccessRule.K_NON_ACCESSIBLE, optionally combined withIAccessRule.IGNORE_IF_BETTER- Gibt zurück:
- an access rule
-
getAccessRuleForProblemId
Used only for loading rules from disk.
-