public interface ICProject extends IParent, IOpenable, ICElement
CoreModel.create(project).
CoreModel#create(org.eclipse.core.resources.IProject)ASM_LABEL, C_ARCHIVE, C_BINARY, C_CCONTAINER, C_CLASS, C_CLASS_CTOR, C_CLASS_DECLARATION, C_CLASS_DTOR, C_ENUMERATION, C_ENUMERATOR, C_FIELD, C_FUNCTION, C_FUNCTION_DECLARATION, C_INCLUDE, C_MACRO, C_METHOD, C_METHOD_DECLARATION, C_MODEL, C_NAMESPACE, C_PROJECT, C_STORAGE_EXTERN, C_STORAGE_STATIC, C_STRUCT, C_STRUCT_DECLARATION, C_TEMPLATE_CLASS, C_TEMPLATE_CLASS_DECLARATION, C_TEMPLATE_FUNCTION, C_TEMPLATE_FUNCTION_DECLARATION, C_TEMPLATE_METHOD, C_TEMPLATE_METHOD_DECLARATION, C_TEMPLATE_STRUCT, C_TEMPLATE_STRUCT_DECLARATION, C_TEMPLATE_UNION, C_TEMPLATE_UNION_DECLARATION, C_TEMPLATE_VARIABLE, C_TYPEDEF, C_UNION, C_UNION_DECLARATION, C_UNIT, C_UNKNOWN_DECLARATION, C_USING, C_VARIABLE, C_VARIABLE_DECLARATION, C_VARIABLE_LOCAL, C_VCONTAINER, CPP_FRIEND, CPP_PRIVATE, CPP_PROTECTED, CPP_PUBLIC, EMPTY_ARRAY| Modifier and Type | Method and Description |
|---|---|
ICElement |
findElement(IPath path)
Returns the
ICElement corresponding to the given
path, or null if no such
ICElement is found. |
ISourceRoot |
findSourceRoot(IPath path) |
ISourceRoot |
findSourceRoot(IResource resource) |
ISourceRoot[] |
getAllSourceRoots()
Returns all of the existing source roots that exist
on the project, in the order they are defined by the ".cdtproject".
|
IArchiveContainer |
getArchiveContainer()
Return the ArchiveContainer of this Project.
|
IBinaryContainer |
getBinaryContainer()
Return the BinaryContainer of this Project.
|
IIncludeReference[] |
getIncludeReferences()
Return the include paths set on the project.
|
ILibraryReference[] |
getLibraryReferences()
Return the library references for this project.
|
java.lang.Object[] |
getNonCResources()
Returns an array of non-C resources directly contained in this project.
|
java.lang.String |
getOption(java.lang.String optionName,
boolean inheritCCoreOptions)
Helper method for returning one option value only.
|
java.util.Map<java.lang.String,java.lang.String> |
getOptions(boolean inheritCCoreOptions)
Returns the table of the current custom options for this project.
|
IOutputEntry[] |
getOutputEntries()
Return the output entries.
|
IProject |
getProject() |
IPathEntry[] |
getRawPathEntries()
Returns the list of entries for the project.
|
java.lang.String[] |
getRequiredProjectNames()
Returns the names of the projects that are directly required by this
project.
|
IPathEntry[] |
getResolvedPathEntries()
Returns the list of entries for the project.
|
ISourceRoot |
getSourceRoot(ISourceEntry entry) |
ISourceRoot[] |
getSourceRoots()
Returns the source root folders of the project.
|
boolean |
isOnOutputEntry(IResource resource) |
boolean |
isOnSourceRoot(IResource resource) |
void |
setOption(java.lang.String optionName,
java.lang.String optionValue)
Helper method for setting one option value only.
|
void |
setOptions(java.util.Map<java.lang.String,java.lang.String> newOptions)
Sets the project custom options.
|
void |
setRawPathEntries(IPathEntry[] entries,
IProgressMonitor monitor)
Sets the entries for this project.
|
getChildren, getChildrenOfType, hasChildrenclose, getBuffer, hasUnsavedChanges, isConsistent, isOpen, makeConsistent, makeConsistent, open, savebufferChangedaccept, exists, getAncestor, getCModel, getCProject, getElementName, getElementType, getHandleIdentifier, getLocationURI, getParent, getPath, getResource, getUnderlyingResource, isReadOnly, isStructureKnownICElement findElement(IPath path) throws CModelException
ICElement corresponding to the given
path, or null if no such
ICElement is found.CModelException - if the given path is null
or absoluteIArchiveContainer getArchiveContainer() throws CModelException
CModelExceptionIBinaryContainer getBinaryContainer() throws CModelException
CModelExceptionISourceRoot[] getSourceRoots() throws CModelException
NOTE: This is equivalent to getChildren().
CModelExceptionISourceRoot[] getAllSourceRoots() throws CModelException
CModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resourceISourceRoot getSourceRoot(ISourceEntry entry) throws CModelException
entry - CModelExceptionISourceRoot findSourceRoot(IResource resource)
ISourceRoot findSourceRoot(IPath path)
IOutputEntry[] getOutputEntries() throws CModelException
CModelExceptionboolean isOnOutputEntry(IResource resource)
resource - boolean isOnSourceRoot(IResource resource)
resource - ILibraryReference[] getLibraryReferences() throws CModelException
CModelExceptionIIncludeReference[] getIncludeReferences() throws CModelException
CModelExceptionjava.lang.String[] getRequiredProjectNames()
throws CModelException
The project names are returned in the order they appear on the cpathentries.
CModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resourceIProject getProject()
java.lang.String getOption(java.lang.String optionName,
boolean inheritCCoreOptions)
(String)this.getOptions(inheritCCoreOptions).get(optionName)
Note that it may answer null if this option does not exist, or if there is no custom value for it.
For a complete description of the configurable options, see CCorePlugin#getDefaultOptions.
optionName - the name of an optioninheritCCoreOptions - - boolean indicating whether CCorePlugin options should be inherited as wellCCorePlugin#getDefaultOptionsjava.util.Map<java.lang.String,java.lang.String> getOptions(boolean inheritCCoreOptions)
CCorePlugin.
For a complete description of the configurable options, see CCorePlugin#getDefaultOptions.
inheritCCoreOptions - - boolean indicating whether CCorePlugin options should be inherited as wellString; value type: String)CCorePlugin#getDefaultOptionsvoid setOption(java.lang.String optionName,
java.lang.String optionValue)
Map options = this.getOptions(false); map.put(optionName, optionValue); this.setOptions(map)
For a complete description of the configurable options, see CCorePlugin#getDefaultOptions.
optionName - the name of an optionoptionValue - the value of the option to setCCorePlugin#getDefaultOptionsvoid setOptions(java.util.Map<java.lang.String,java.lang.String> newOptions)
For a complete description of the configurable options, see CCorePlugin#getDefaultOptions.
newOptions - the new options (key type: String; value type: String),
or null to flush all custom options (clients will automatically get the global CCorePlugin options).CCorePlugin#getDefaultOptionsIPathEntry[] getResolvedPathEntries() throws CModelException
setCPathEntries.
CModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resourceIPathEntry[] getRawPathEntries() throws CModelException
setCPathEntries.
CModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resourcevoid setRawPathEntries(IPathEntry[] entries, IProgressMonitor monitor) throws CModelException
entries - a list of IPathEntry[] entriesmonitor - the given progress monitorCModelException - if the entries could not be set. Reasons include:
java.lang.Object[] getNonCResources()
throws CModelException
Non-C resources includes files, folders, projects not accounted for.
CModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resourceCopyright (c) IBM Corp. and others 2004, 2014. All Rights Reserved.