|
Eclipse CDT Pre-release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.core.model.CoreModel
public class CoreModel
Field Summary | |
---|---|
static String |
CORE_MODEL_ID
|
Method Summary | |
---|---|
void |
addElementChangedListener(IElementChangedListener listener)
|
ICElement |
create(IPath path)
Creates an ICElement form and IPath. |
ITranslationUnit |
createTranslationUnitFrom(ICProject cproject,
IPath path)
Creates a translation form and IPath. |
ICModel |
getCModel()
Returns the default ICModel. |
static CoreModel |
getDefault()
Return the singleton. |
static IIncludeEntry[] |
getIncludeEntries(IPath path)
This method returns the include entries associated with a translation unit if the path does not refer to a valid translation unit an empty array is return. |
static IIncludeFileEntry[] |
getIncludeFileEntries(IPath path)
This method returns the include file entries associated with a translation unit if the path does not refer to a valid translation unit an empty array is return. |
IndexManager |
getIndexManager()
|
static IMacroEntry[] |
getMacroEntries(IPath path)
This method returns the macro entries associated with a translation unit if the path does not refer to a valid translation unit an empty array is return. |
static IMacroFileEntry[] |
getMacroFileEntries(IPath path)
This method returns the macro file entries associated with a translation unit if the path does not refer to a valid translation unit an empty array is return. |
static IPathEntryContainer |
getPathEntryContainer(IPath containerPath,
ICProject project)
Answers the project specific value for a given container. |
static PathEntryContainerInitializer |
getPathEntryContainerInitializer(String containerID)
Helper method finding the pathentry container initializer registered for a given container ID or null if none was found while
iterating over the contributions to extension point to the extension
point "org.eclipse.cdt.core.PathEntryContainerInitializer". |
static IPathEntryStore |
getPathEntryStore(IProject project)
Return the IPathEntryStore of the project. |
static IPathEntry[] |
getRawPathEntries(ICProject cproject)
Returns the raw pathentries for the project. |
static String |
getRegistedContentTypeId(IProject project,
String name)
Return the registed content type id, for example: CONTENT_TYPE_CHEADER CONTENT_TYPE_CXXHEADER CONTENT_TYPE_CSOURCE CONTENT_TYPE_CXXSOURCE CONTENT_TYPE_ASMSOURCE or null is return if no id match the list |
static String[] |
getRegistedContentTypeIds()
Return an array of the register contentTypes. |
static IPathEntry[] |
getResolvedPathEntries(ICProject cproject)
This method returns the resolved pathentries for the project All pathEntry.CDT_CONTAINER entries in the project's will be replaced by the entries they resolve to. |
static boolean |
hasCCNature(IProject project)
Return true if project has C++ nature. |
static boolean |
hasCNature(IProject project)
Return true if project has C nature. |
boolean |
isArchive(IFile file)
Return true if IFile is an Achive, *.a |
boolean |
isBinary(IFile file)
Return true if IFile is an ELF. |
boolean |
isExecutable(IFile file)
Return true if IFile is an ELF executable |
boolean |
isObject(IFile file)
Return true if IFile is a an object(ELF), i.e. *.o |
static boolean |
isScannerInformationEmpty(IResource resource)
The method returns whether scanner information for a resource is empty or not. |
boolean |
isSharedLib(IFile file)
Return true if IFile is a shared library, i.e. libxx.so |
static boolean |
isTranslationUnit(IFile file)
Return true if IFile is a possible TranslationUnit. |
static boolean |
isValidASMSourceUnitName(IProject project,
String name)
Return true if name is a valid name for a translation unit. |
static boolean |
isValidCHeaderUnitName(IProject project,
String name)
Return true if name is a valid name for a translation unit. |
static boolean |
isValidCSourceUnitName(IProject project,
String name)
Return true if name is a valid name for a translation unit. |
static boolean |
isValidCXXHeaderUnitName(IProject project,
String name)
Return true if name is a valid name for a translation unit. |
static boolean |
isValidCXXSourceUnitName(IProject project,
String name)
Return true if name is a valid name for a translation unit. |
static boolean |
isValidHeaderUnitName(IProject project,
String name)
Return true if name is a valid name for a translation unit. |
static boolean |
isValidSourceUnitName(IProject project,
String name)
Return true if name is a valid name for a translation unit. |
static boolean |
isValidTranslationUnitName(IProject project,
String name)
Return true if name is a valid name for a translation unit. |
static IContainerEntry |
newContainerEntry(IPath id)
Creates and returns a new entry of kind CDT_CONTAINER for
the given path. |
static IContainerEntry |
newContainerEntry(IPath id,
boolean isExported)
Creates and returns a new entry of kind CDT_CONTAINER for
the given path. |
static IIncludeEntry |
newIncludeEntry(IPath resourcePath,
IPath basePath,
IPath includePath)
Creates and returns a new entry of kind CDT_INCLUDE |
static IIncludeEntry |
newIncludeEntry(IPath resourcePath,
IPath basePath,
IPath includePath,
boolean isSystemInclude)
* Creates and returns a new entry of kind CDT_INCLUDE |
static IIncludeEntry |
newIncludeEntry(IPath resourcePath,
IPath basePath,
IPath includePath,
boolean isSystemInclude,
IPath[] exclusionPatterns)
Creates and returns a new entry of kind CDT_INCLUDE |
static IIncludeEntry |
newIncludeEntry(IPath resourcePath,
IPath basePath,
IPath includePath,
boolean isSystemInclude,
IPath[] exclusionPatterns,
boolean isExported)
Creates and returns a new entry of kind CDT_INCLUDE |
static IIncludeFileEntry |
newIncludeFileEntry(IPath resourcePath,
IPath includeFile)
Creates a new entry of kind CDT_INCLUDE_FILE |
static IIncludeFileEntry |
newIncludeFileEntry(IPath resourcePath,
IPath baseRef,
IPath basePath,
IPath includeFilePath,
IPath[] exclusionPatterns,
boolean isExported)
Creates and returns a new entry of kind CDT_INCLUDE_FILE |
static IIncludeEntry |
newIncludeRefEntry(IPath resourcePath,
IPath baseRef,
IPath includePath)
Creates and returns a new entry of kind CDT_INCLUDE |
static ILibraryEntry |
newLibraryEntry(IPath resourcePath,
IPath basePath,
IPath libraryPath,
IPath sourceAttachmentPath,
IPath sourceAttachmentRootPath,
IPath sourceAttachmentPrefixMapping,
boolean isExported)
Creates and returns a new entry of kind CDT_LIBRARY
for the archive or folder identified by the given absolute path. |
static ILibraryEntry |
newLibraryRefEntry(IPath resourcePath,
IPath baseRef,
IPath libraryPath)
Creates and returns a new entry of kind CDT_LIBRARY
for the archive or folder identified by the given absolute path. |
static IMacroEntry |
newMacroEntry(IPath resourcePath,
String macroName,
String macroValue)
Creates and returns an entry kind CDT_MACRO |
static IMacroEntry |
newMacroEntry(IPath resourcePath,
String macroName,
String macroValue,
IPath[] exclusionPatterns)
Creates and returns an entry kind CDT_MACRO |
static IMacroEntry |
newMacroEntry(IPath resourcePath,
String macroName,
String macroValue,
IPath[] exclusionPatterns,
boolean isExported)
Creates and returns an entry kind CDT_MACRO |
static IMacroFileEntry |
newMacroFileEntry(IPath resourcePath,
IPath macroFile)
Creates an entry kind CDT_MACRO_FILE |
static IMacroFileEntry |
newMacroFileEntry(IPath resourcePath,
IPath basePath,
IPath baseRef,
IPath macroFilePath,
IPath[] exclusionPatterns,
boolean isExported)
Creates and returns an entry kind CDT_MACRO_FILE |
static IMacroEntry |
newMacroRefEntry(IPath resourcePath,
IPath baseRef,
String macroName)
Creates and returns an entry kind CDT_MACRO |
static IOutputEntry |
newOutputEntry(IPath outputPath)
Creates and returns a new entry of kind CDT_OUTPUT for
the project's output folder
|
static IOutputEntry |
newOutputEntry(IPath outputPath,
IPath[] exclusionPatterns)
Creates and returns a new entry of kind CDT_OUPUT for
the project |
static IProjectEntry |
newProjectEntry(IPath projectPath)
Creates and returns a new non-exported entry of kind CDT_PROJECT
for the project identified by the given absolute path. |
static IProjectEntry |
newProjectEntry(IPath projectPath,
boolean isExported)
Creates and returns a new entry of kind CDT_PROJECT for
the project identified by the given workspace-relative path. |
static ISourceEntry |
newSourceEntry(IPath sourcePath)
Creates and returns a new entry of kind CDT_SOURCE for
the project's source folder identified by the given absolute
workspace-relative path. |
static ISourceEntry |
newSourceEntry(IPath sourcePath,
IPath[] exclusionPatterns)
Creates and returns a new entry of kind CDT_SOURCE for
the project's source folder identified by the given absolute
workspace-relative path but excluding all source files with paths
matching any of the given patterns. |
static void |
pathEntryContainerUpdates(IPathEntryContainerExtension container,
PathEntryContainerChanged[] changes,
IProgressMonitor monitor)
Helper method use by a pathentry container implementing IPathEntryContainerExtension
It notify the model of changes. |
void |
removeElementChangedListener(IElementChangedListener listener)
Removes the given element changed listener. |
static void |
run(IWorkspaceRunnable action,
IProgressMonitor monitor)
Runs the given action as an atomic C model operation. |
static void |
run(IWorkspaceRunnable action,
ISchedulingRule rule,
IProgressMonitor monitor)
Runs the given action as an atomic C model operation. |
static void |
setPathEntryContainer(ICProject[] affectedProjects,
IPathEntryContainer container,
IProgressMonitor monitor)
Bind a container reference path to some actual containers ( IPathEntryContainer ). |
static void |
setPathEntryStore(IProject project,
IPathEntryStore store)
Set in the map the store, but not persisted. |
static void |
setRawPathEntries(ICProject cproject,
IPathEntry[] newEntries,
IProgressMonitor monitor)
Sets the pathentries of this project using a list of entries. |
void |
shutdown()
|
void |
startIndexing()
|
void |
startup()
|
static ICModelStatus |
validatePathEntries(ICProject cProject,
IPathEntry[] entries)
Validate a given path entries for a project, using the following rules: Entries cannot collide with each other; that is, all entry paths must be unique. |
static ICModelStatus |
validatePathEntry(ICProject cProject,
IPathEntry entry,
boolean checkSourceAttachment,
boolean recurseInContainers)
Returns a C model status describing the problem related to this entry if any, a status object with code IStatus.OK if the entry is fine (that is, if the
given entry denotes a valid element). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CORE_MODEL_ID
Method Detail |
---|
public ICElement create(IPath path)
public ITranslationUnit createTranslationUnitFrom(ICProject cproject, IPath path)
public ICModel getCModel()
public boolean isSharedLib(IFile file)
public boolean isObject(IFile file)
public boolean isExecutable(IFile file)
public boolean isBinary(IFile file)
public boolean isArchive(IFile file)
public static boolean isTranslationUnit(IFile file)
public static String[] getRegistedContentTypeIds()
public static boolean isValidTranslationUnitName(IProject project, String name)
public static boolean isValidHeaderUnitName(IProject project, String name)
public static boolean isValidSourceUnitName(IProject project, String name)
public static boolean isValidCSourceUnitName(IProject project, String name)
public static boolean isValidCXXSourceUnitName(IProject project, String name)
public static boolean isValidASMSourceUnitName(IProject project, String name)
public static boolean isValidCXXHeaderUnitName(IProject project, String name)
public static boolean isValidCHeaderUnitName(IProject project, String name)
public static String getRegistedContentTypeId(IProject project, String name)
file
-
public static boolean hasCNature(IProject project)
public static boolean hasCCNature(IProject project)
public static IProjectEntry newProjectEntry(IPath projectPath)
CDT_PROJECT
for the project identified by the given absolute path.
A project entry is used to denote a prerequisite project. The exported IPathEntry[] entries of the project will be contributed.
The prerequisite project is referred to using an absolute path relative to the workspace root.
The resulting entry is not exported to dependent projects. This method
is equivalent to newProjectEntry(path,false)
.
projectPath
- the workspace-relative path of the project
newProjectEntry(IPath, boolean)
public static IProjectEntry newProjectEntry(IPath projectPath, boolean isExported)
CDT_PROJECT
for
the project identified by the given workspace-relative path.
A project entry is used to denote a prerequisite project. All the IPathEntries of the project will be contributed as a whole. The prerequisite project is referred to using an absolute path relative to the workspace root.
projectPath
- the absolute workspace-relative path of the prerequisite projectisExported
- indicates whether this entry is contributed to dependent
projects
public static IContainerEntry newContainerEntry(IPath id)
CDT_CONTAINER
for
the given path. The path of the container will be used during resolution
so as to map this container entry to a set of other entries the
container is acting for.
The resulting entry is not exported to dependent projects. This method
is equivalent to newContainerEntry(path,false)
.
containerPath
- the id of the container
public static IContainerEntry newContainerEntry(IPath id, boolean isExported)
CDT_CONTAINER
for
the given path. The path of the container will be used during resolution
so as to map this container entry to a set of other entries the
container is acting for.
The resulting entry is not exported to dependent projects. This method
is equivalent to newContainerEntry(path,false)
.
public static ILibraryEntry newLibraryRefEntry(IPath resourcePath, IPath baseRef, IPath libraryPath)
CDT_LIBRARY
for the archive or folder identified by the given absolute path.
resourcePath
- the affected project-relative resource pathbaseRef
- the base reference path to find the librarylibraryPath
- the library name.
public static ILibraryEntry newLibraryEntry(IPath resourcePath, IPath basePath, IPath libraryPath, IPath sourceAttachmentPath, IPath sourceAttachmentRootPath, IPath sourceAttachmentPrefixMapping, boolean isExported)
CDT_LIBRARY
for the archive or folder identified by the given absolute path.
Note that this operation does not attempt to validate or access the
resources at the given paths.
resourcePath
- the affected project-relative resource pathbasePath
- the base path of the librarylibraryPath
- the path of the librarysourceAttachmentPath
- the project-relative path of the corresponding source archive or
folder, or null
if none.sourceAttachmentRootPath
- the location of the root within the source archive or folder
or null
.sourceAttachmentPrefixMapping
- prefix mapping or null
.isExported
- whether the entry is exported
public static IOutputEntry newOutputEntry(IPath outputPath)
CDT_OUTPUT
for
the project's output folder
outputPath
- the project-relative path of a folder
public static IOutputEntry newOutputEntry(IPath outputPath, IPath[] exclusionPatterns)
CDT_OUPUT
for
the project
outputPath
- the project-relative path of a folderexclusionPatterns
- the possibly empty list of exclusion patterns represented as
relative paths
public static ISourceEntry newSourceEntry(IPath sourcePath)
CDT_SOURCE
for
the project's source folder identified by the given absolute
workspace-relative path.
The source folder is referred to using an absolute path relative to the
workspace root, e.g. /Project/src
. A project's source
folders are located with that project. That is, a source entry
specifying the path /P1/src
is only usable for project
P1
.
Note that all sources/binaries inside a project are contributed as a
whole through a project entry (see newProjectEntry
).
Particular source entries cannot be selectively exported.
sourcePath
- the project-relative path of a source folder
public static ISourceEntry newSourceEntry(IPath sourcePath, IPath[] exclusionPatterns)
CDT_SOURCE
for
the project's source folder identified by the given absolute
workspace-relative path but excluding all source files with paths
matching any of the given patterns. This specifies that all package
fragments within the root will have children of type ICompilationUnit
.
The source folder is referred to using an absolute path relative to the
workspace root, e.g. /Project/src
. A project's source
folders are located with that project. That is, a source entry
specifying the path /P1/src
is only usable for project
P1
.
sourcePath
- the absolute project-relative path of a source folderexclusionPatterns
- the possibly empty list of exclusion patterns represented as
relative paths
public static IIncludeEntry newIncludeEntry(IPath resourcePath, IPath basePath, IPath includePath)
CDT_INCLUDE
resourcePath
- the affected project-relative resource pathbasePath
- the base path of the includePathincludePath
- the absolute path of the include
public static IIncludeEntry newIncludeEntry(IPath resourcePath, IPath basePath, IPath includePath, boolean isSystemInclude)
CDT_INCLUDE
resourcePath
- the affected project-relative resource pathbasePath
- the base path of the includePathincludePath
- the absolute path of the includeisSystemInclude
- whether this include path should be consider a system include path
public static IIncludeEntry newIncludeEntry(IPath resourcePath, IPath basePath, IPath includePath, boolean isSystemInclude, IPath[] exclusionPatterns)
CDT_INCLUDE
resoourcePath
- the affected project-relative resource pathbasePath
- the base path of the includePathincludePath
- the absolute path of the includeisSystemInclude
- wheter this include path should be consider the system
include pathexclusionPatterns
- exclusion patterns in the resource if a container
public static IIncludeEntry newIncludeEntry(IPath resourcePath, IPath basePath, IPath includePath, boolean isSystemInclude, IPath[] exclusionPatterns, boolean isExported)
CDT_INCLUDE
resourcePath
- the affected project-relative resource pathbasePath
- the base path of the includeincludePath
- the path of the includeisSystemInclude
- wheter this include path should be consider the system
include pathexclusionPatterns
- exclusion patterns in the resource if a containerisExported
- if the entry ix exported to reference projects
public static IIncludeEntry newIncludeRefEntry(IPath resourcePath, IPath baseRef, IPath includePath)
CDT_INCLUDE
resourcePath
- the affected project-relative resource pathbaseRef
- the base reference path of the includeincludePath
- the path of the include
public static IIncludeFileEntry newIncludeFileEntry(IPath resourcePath, IPath includeFile)
CDT_INCLUDE_FILE
resourcePath
- includeFile
-
public static IIncludeFileEntry newIncludeFileEntry(IPath resourcePath, IPath baseRef, IPath basePath, IPath includeFilePath, IPath[] exclusionPatterns, boolean isExported)
CDT_INCLUDE_FILE
resourcePath
- the affected project-relative resource pathbasePath
- the base path of the includeincludeFilePath
- the path of the includeexclusionPatterns
- exclusion patterns in the resource if a containerisExported
- if the entry ix exported to reference projects
public static IMacroEntry newMacroEntry(IPath resourcePath, String macroName, String macroValue)
CDT_MACRO
path
- the affected project-relative resource pathmacroName
- the name of the macromacroValue
- the value of the macro
public static IMacroEntry newMacroEntry(IPath resourcePath, String macroName, String macroValue, IPath[] exclusionPatterns)
CDT_MACRO
resourcePath
- the affected project-relative resource pathmacroName
- the name of the macromacroValue
- the value of the macroexclusionPatterns
- exclusion patterns in the resource if a container
public static IMacroEntry newMacroEntry(IPath resourcePath, String macroName, String macroValue, IPath[] exclusionPatterns, boolean isExported)
CDT_MACRO
resourcePath
- the affected workspace-relative resource pathmacroName
- the name of the macromacroValue
- the value of the macroexclusionPatterns
- exclusion patterns in the resource if a container
public static IMacroEntry newMacroRefEntry(IPath resourcePath, IPath baseRef, String macroName)
CDT_MACRO
resourcePath
- the affected workspace-relative resource pathbaseRef
- the base reference pathmacroName
- the name of the macro
public static IMacroFileEntry newMacroFileEntry(IPath resourcePath, IPath macroFile)
CDT_MACRO_FILE
resourcePath
- macroFile
-
public static IMacroFileEntry newMacroFileEntry(IPath resourcePath, IPath basePath, IPath baseRef, IPath macroFilePath, IPath[] exclusionPatterns, boolean isExported)
CDT_MACRO_FILE
resourcePath
- the affected workspace-relative resource pathbasePath
- the base pathmacroFilePath
- the file path where the macros are defineexclusionPatterns
- exclusion patterns in the resource if a container
public static IPathEntryContainer getPathEntryContainer(IPath containerPath, ICProject project) throws CModelException
null
.
Both the container path and the project context are supposed to be
non-null.
The containerPath is a formed by a first ID segment followed with extra
segments, which can be used as additional hints for resolution. If no
container was ever recorded for this container path onto this project
(using setPathEntryContainer
, then a PathEntryContainerInitializer
will be activated if any was registered for this container ID onto the
extension point "org.eclipse.cdt.core.PathEntryContainerInitializer".
PathEntry container values are persisted locally to the workspace, but
are not preserved from a session to another. It is thus highly
recommended to register a PathEntryContainerInitializer
for each referenced container (through the extension point
"org.eclipse.cdt.core.PathEntryContainerInitializer").
containerPath
- the name of the container, which needs to be resolvedproject
- a specific project in which the container is being resolved
null
if unable to
find one.
CModelException
- if an exception occurred while resolving the container,
or if the resolved container contains illegal entries
(contains CDT_CONTAINER entries or null entries).PathEntryContainerInitializer
,
IPathEntryContainer
,
#setPathEntryContainer(IPath, ICProject[], IPathEntryContainer,
IProgressMonitor)
public static void setPathEntryContainer(ICProject[] affectedProjects, IPathEntryContainer container, IProgressMonitor monitor) throws CModelException
IPathEntryContainer
).
This API must be invoked whenever changes in container need to be
reflected onto the CModel.
In reaction to changing container values, the CModel will be updated to reflect the new state of the updated container.
This functionality cannot be used while the resource tree is locked.
PathEntry container values are persisted locally to the workspace, but
are not preserved from a session to another. It is thus highly
recommended to register a PathEntryContainerInitializer
for each referenced container (through the extension point
"org.eclipse.cdt.core.PathEntryContainerInitializer").
Note: setting a container to null
will cause it to be
lazily resolved again whenever its value is required. In particular,
this will cause a registered initializer to be invoked again.
affectedProjects
- -
the set of projects for which this container is being boundnewContainer
- -
the container for the affected projectsmonitor
- a monitor to report progress
CModelException
PathEntryContainerInitializer
,
#getPathEntryContainer(IPath, IJavaProject)
,
IPathEntryContainer
public static void pathEntryContainerUpdates(IPathEntryContainerExtension container, PathEntryContainerChanged[] changes, IProgressMonitor monitor)
IPathEntryContainerExtension
It notify the model of changes.
Note: the paths in the PathEntryContainerChanged[]
array must be on
source that the container was set too. If not the changes will be silently ignore.
container
- changes
- array of changes.monitor
- progress monitorpublic static void setRawPathEntries(ICProject cproject, IPathEntry[] newEntries, IProgressMonitor monitor) throws CModelException
Setting the pathentries to null
specifies a default
classpath (the project root). Setting the pathentry to an empty array
specifies an empty pathentry.
entries
- a list of entriesmonitor
- the given progress monitor
CModelException
- if the entries could not be set. Reasons include:public static IPathEntry[] getRawPathEntries(ICProject cproject) throws CModelException
setRawPathEntries
CModelException
- if this element does not exist or if an exception occurs
while accessing its corresponding resourceIPathEntry
public static IPathEntry[] getResolvedPathEntries(ICProject cproject) throws CModelException
The resulting resolved entries are accurate for the given point in time. If the project's raw entries are later modified they can become out of date. Because of this, hanging on resolved pathentries is not recommended.
CModelException
IPathEntry
public static IIncludeEntry[] getIncludeEntries(IPath path) throws CModelException
The resulting resolved entries are accurate for the given point in time. If the project's raw entries are later modified they can become out of date. Because of this, hanging on resolved pathentries is not recommended.
CModelException
IPathEntry
public static IIncludeFileEntry[] getIncludeFileEntries(IPath path) throws CModelException
The resulting resolved entries are accurate for the given point in time. If the project's raw entries are later modified they can become out of date. Because of this, hanging on resolved pathentries is not recommended.
CModelException
IPathEntry
public static IMacroEntry[] getMacroEntries(IPath path) throws CModelException
The resulting resolved entries are accurate for the given point in time. If the project's raw entries are later modified they can become out of date. Because of this, hanging on resolved pathentries is not recommended.
CModelException
IPathEntry
public static IMacroFileEntry[] getMacroFileEntries(IPath path) throws CModelException
The resulting resolved entries are accurate for the given point in time. If the project's raw entries are later modified they can become out of date. Because of this, hanging on resolved pathentries is not recommended.
CModelException
IPathEntry
public static PathEntryContainerInitializer getPathEntryContainerInitializer(String containerID)
null
if none was found while
iterating over the contributions to extension point to the extension
point "org.eclipse.cdt.core.PathEntryContainerInitializer".
A containerID is the first segment of any container path, used to identify the registered container initializer.
containerID
- -
a containerID identifying a registered initializer
null
if none was found.public static IPathEntryStore getPathEntryStore(IProject project) throws CoreException
project
-
CoreException
public static void setPathEntryStore(IProject project, IPathEntryStore store)
project
- store
- public static ICModelStatus validatePathEntries(ICProject cProject, IPathEntry[] entries)
This validation is intended to anticipate issues prior to assigning it to a project. In particular, it will automatically be performed during the setting operation (if validation fails, the classpath setting will not complete) and during getResolvedPathEntries.
cProject
- the given C projectPathEntry
- entries
IStatus.OK
if
the entries location are compatible, otherwise a status
object indicating what is wrong with thempublic static ICModelStatus validatePathEntry(ICProject cProject, IPathEntry entry, boolean checkSourceAttachment, boolean recurseInContainers)
IStatus.OK
if the entry is fine (that is, if the
given entry denotes a valid element).
cProject
- the given C projectentry
- the given entrycheckSourceAttachment
- a flag to determine if source attachement should be checkedrecurseInContainers
- flag indicating whether validation should be applied to container entries recursively
IStatus.OK
if the entry is finepublic static CoreModel getDefault()
public void addElementChangedListener(IElementChangedListener listener)
public void removeElementChangedListener(IElementChangedListener listener)
listener
- the listenerpublic void startup()
Plugin#startup
public void shutdown()
public static void run(IWorkspaceRunnable action, IProgressMonitor monitor) throws CoreException
After running a method that modifies C elements, registered listeners receive after-the-fact notification of what just transpired, in the form of a element changed event. This method allows clients to call a number of methods that modify C elements and only have element changed event notifications reported at the end of the entire batch.
If this method is called outside the dynamic scope of another such call, this method runs the action and then reports a single element changed event describing the net effect of all changes done to C elements by the action.
If this method is called in the dynamic scope of another such call, this method simply runs the action.
action
- the action to performmonitor
- a progress monitor, or null
if progress
reporting and cancellation are not desired
CoreException
- if the operation failed.public static void run(IWorkspaceRunnable action, ISchedulingRule rule, IProgressMonitor monitor) throws CoreException
After running a method that modifies C elements, registered listeners receive after-the-fact notification of what just transpired, in the form of a element changed event. This method allows clients to call a number of methods that modify C elements and only have element changed event notifications reported at the end of the entire batch.
If this method is called outside the dynamic scope of another such call, this method runs the action and then reports a single element changed event describing the net effect of all changes done to C elements by the action.
If this method is called in the dynamic scope of another such call, this method simply runs the action.
The supplied scheduling rule is used to determine whether this operation can be
run simultaneously with workspace changes in other threads. See
IWorkspace.run(...)
for more details.
action
- the action to performrule
- the scheduling rule to use when running this operation, or
null
if there are no scheduling restrictions for this operation.monitor
- a progress monitor, or null
if progress
reporting and cancellation are not desired
CoreException
- if the operation failed.public void startIndexing()
public IndexManager getIndexManager()
public static boolean isScannerInformationEmpty(IResource resource)
Although this looks like IScannerInfoProvider method, eventually this interface will be deprecated and the service will be moved to CoreModel.
resource
-
|
Eclipse CDT Pre-release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |