|
Eclipse JDT Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Common protocol for Java elements that have associated source code.
This set consists of IClassFile, ICompilationUnit,
IPackageDeclaration, IImportDeclaration,
IImportContainer, IType, IField,
IMethod, and IInitializer.
Note: For IClassFile, IType and other members
derived from a binary type, the implementation returns source iff the
element has attached source code.
Source reference elements may be working copies if they were created from a compilation unit that is a working copy.
This interface is not intended to be implemented by clients.
IPackageFragmentRoot.attachSource(org.eclipse.core.runtime.IPath, org.eclipse.core.runtime.IPath, org.eclipse.core.runtime.IProgressMonitor)| Method Summary | |
|---|---|
boolean |
exists()
Returns whether this element exists in the model. |
String |
getSource()
Returns the source code associated with this element. |
ISourceRange |
getSourceRange()
Returns the source range associated with this element. |
| Method Detail |
public boolean exists()
true if this element exists in the Java model
public String getSource()
throws JavaModelException
getSourceRange.
For class files, this returns the source of the entire compilation unit associated with the class file (if there is one).
null if this element has no
associated source code
JavaModelException - if an exception occurs while accessing its corresponding resource
public ISourceRange getSourceRange()
throws JavaModelException
For class files, this returns the range of the entire compilation unit associated with the class file (if there is one).
null if this element has no
associated source code
JavaModelException - if an exception occurs while accessing its corresponding resource
|
Eclipse JDT Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||