|
Eclipse CDT Pre-release 3.0 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Common protocol for all elements provided by the C model.
Field Summary | |
---|---|
static int |
C_ARCHIVE
|
static int |
C_BINARY
|
static int |
C_CCONTAINER
Constant representing a folder(ICContainer object). |
static int |
C_CLASS
Constant representing a class structure. |
static int |
C_CLASS_CTOR
Deprecated. use IMethodDeclaration.isConstructor() |
static int |
C_CLASS_DECLARATION
Declaration of a class without the definition. |
static int |
C_CLASS_DTOR
Deprecated. use IMethodDeclaration.isDestructor() |
static int |
C_ENUMERATION
Enumeration. |
static int |
C_ENUMERATOR
Enumerator. |
static int |
C_FIELD
A Field definition part of a structure(class, struct, union). |
static int |
C_FUNCTION
a C/C++ function definition. |
static int |
C_FUNCTION_DECLARATION
a C/C++ function prototype. |
static int |
C_INCLUDE
Preprocessor #include directive. |
static int |
C_MACRO
A preprocessor macro. |
static int |
C_METHOD
A method definition part of a structure(class, struct, union). |
static int |
C_METHOD_DECLARATION
A method declaration part of a structure(class, struct, union). |
static int |
C_MODEL
Constant representing a C Root workspace (IWorkspaceRoot object). |
static int |
C_NAMESPACE
Namespace. |
static int |
C_PROJECT
Constant representing a C project(IProject object). |
static int |
C_STORAGE_EXTERN
Modifier indicating an extern storage attribute |
static int |
C_STORAGE_STATIC
Deprecated. use IDeclaration.isStatic() |
static int |
C_STRUCT
Constant representing a struct structure. |
static int |
C_STRUCT_DECLARATION
Declaration of a structure without the definition. |
static int |
C_TEMPLATE_CLASS
C++ template class with definition. |
static int |
C_TEMPLATE_CLASS_DECLARATION
C++ template class declaration without a definiton. |
static int |
C_TEMPLATE_FUNCTION
C++ template function. |
static int |
C_TEMPLATE_FUNCTION_DECLARATION
C++ template function declaration. |
static int |
C_TEMPLATE_METHOD
C++ template method. |
static int |
C_TEMPLATE_METHOD_DECLARATION
C++ template method. |
static int |
C_TEMPLATE_STRUCT
C++ template struct. |
static int |
C_TEMPLATE_STRUCT_DECLARATION
C++ template struct. |
static int |
C_TEMPLATE_UNION
C++ template union. |
static int |
C_TEMPLATE_UNION_DECLARATION
C++ template union. |
static int |
C_TEMPLATE_VARIABLE
C++ template variable. |
static int |
C_TYPEDEF
a Typedef. |
static int |
C_UNION
Constant representing a union structure. |
static int |
C_UNION_DECLARATION
Declaration of a union without the definition. |
static int |
C_UNIT
Constant representing a C/C++ children of a Translation Unit |
static int |
C_UNKNOWN_DECLARATION
An unknown ICElement. |
static int |
C_USING
Using. |
static int |
C_VARIABLE
Global variable. |
static int |
C_VARIABLE_DECLARATION
variable Declaration. |
static int |
C_VARIABLE_LOCAL
Local Variable. |
static int |
C_VCONTAINER
Virtual container serving as a place holder. |
static int |
CPP_FRIEND
Deprecated. use IMethodDeclaration.isFriend() |
static int |
CPP_PRIVATE
Deprecated. use IMember.getVisibility() |
static int |
CPP_PROTECTED
Deprecated. use IMember.getVisibility() |
static int |
CPP_PUBLIC
Deprecated. use IMember.getVisibility() |
Method Summary | |
---|---|
void |
accept(ICElementVisitor visitor)
Accept a visitor and walk the ICElement tree with it. |
boolean |
exists()
Returns whether this C element exists in the model. |
ICElement |
getAncestor(int ancestorType)
Returns the first ancestor of this C element that has the given type. |
ICModel |
getCModel()
Returns the C model. |
ICProject |
getCProject()
Returns the C project this element is contained in, or null if this element is not contained in any C project |
String |
getElementName()
Returns the name of this element. |
int |
getElementType()
Returns this element's kind encoded as an integer. |
ICElement |
getParent()
Returns the element directly containing this element, or null if this element has no parent. |
IPath |
getPath()
Returns the path to the innermost resource enclosing this element. |
IResource |
getResource()
Returns the Corresponding resource for this element, or null if this element does not have
a corresponding resource. |
IResource |
getUnderlyingResource()
Returns the underlying resource that contains this element, or null if this element is not contained
in a resource. |
boolean |
isReadOnly()
Returns whether this C element is read-only. |
boolean |
isStructureKnown()
Returns whether the structure of this element is known. |
Field Detail |
public static final int C_MODEL
ICModel
.
public static final int C_PROJECT
ICProject
.
public static final int C_CCONTAINER
ICContainer
.
public static final int C_BINARY
public static final int C_ARCHIVE
public static final int C_VCONTAINER
public static final int C_UNIT
public static final int C_NAMESPACE
public static final int C_USING
public static final int C_ENUMERATION
public static final int C_CLASS_DECLARATION
public static final int C_CLASS
public static final int C_STRUCT_DECLARATION
public static final int C_STRUCT
public static final int C_UNION_DECLARATION
public static final int C_UNION
public static final int C_METHOD
public static final int C_METHOD_DECLARATION
public static final int C_FIELD
public static final int C_FUNCTION_DECLARATION
public static final int C_FUNCTION
public static final int C_INCLUDE
public static final int C_VARIABLE
public static final int C_VARIABLE_DECLARATION
public static final int C_VARIABLE_LOCAL
public static final int C_MACRO
public static final int C_TYPEDEF
public static final int C_ENUMERATOR
public static final int C_TEMPLATE_CLASS_DECLARATION
public static final int C_TEMPLATE_CLASS
public static final int C_TEMPLATE_STRUCT_DECLARATION
public static final int C_TEMPLATE_STRUCT
public static final int C_TEMPLATE_UNION_DECLARATION
public static final int C_TEMPLATE_UNION
public static final int C_TEMPLATE_FUNCTION_DECLARATION
public static final int C_TEMPLATE_FUNCTION
public static final int C_TEMPLATE_METHOD_DECLARATION
public static final int C_TEMPLATE_METHOD
public static final int C_TEMPLATE_VARIABLE
public static final int C_UNKNOWN_DECLARATION
public static final int C_CLASS_CTOR
IMethodDeclaration.isConstructor()
public static final int C_CLASS_DTOR
IMethodDeclaration.isDestructor()
public static final int C_STORAGE_STATIC
IDeclaration.isStatic()
public static final int C_STORAGE_EXTERN
public static final int CPP_PRIVATE
IMember.getVisibility()
public static final int CPP_PUBLIC
IMember.getVisibility()
public static final int CPP_PROTECTED
IMember.getVisibility()
public static final int CPP_FRIEND
IMethodDeclaration.isFriend()
Method Detail |
public boolean exists()
true
if this element exists in the C modelpublic ICElement getAncestor(int ancestorType)
null
if no such an ancestor can be found.
This is a handle-only method.
ancestorType
- the given type
public String getElementName()
public int getElementType()
ICElement
ICElement
public ICModel getCModel()
public ICProject getCProject()
null
if this element is not contained in any C project
null
if this element is
not contained in a C projectpublic ICElement getParent()
null
if this element has no parent.
null
if this element has no parentpublic IPath getPath()
public IResource getUnderlyingResource()
null
if this element is not contained
in a resource.
null
if none
CModelException
- if this element does not exist or if an
exception occurs while accessing its underlying resourcepublic IResource getResource()
null
if this element does not have
a corresponding resource.
null
if none
CModelException
- if this element does not exist or if an
exception occurs while accessing its resourcepublic boolean isReadOnly()
true
if this element is read-onlypublic boolean isStructureKnown() throws CModelException
false
is returned.
If the structure of an element is unknown, navigations will return reasonable
defaults. For example, getChildren
will return an empty collection.
Note: This does not imply anything about consistency with the underlying resource/buffer contents.
true
if the structure of this element is known
CModelException
- if this element does not exist or if an
exception occurs while accessing its corresponding resourcepublic void accept(ICElementVisitor visitor) throws CoreException
visitor
-
CModelException
CoreException
|
Eclipse CDT Pre-release 3.0 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |