| 
org.openide.src 1.8.22 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface SourceElement.Impl
Pluggable behaviour for source elements.
SourceElement| Field Summary | |
|---|---|
static int | 
ADD
Add some top-level classes.  | 
static int | 
REMOVE
Remove some top-level classes.  | 
static long | 
serialVersionUID
Deprecated. Only public by accident.  | 
static int | 
SET
Set the top-classes.  | 
| Method Summary | |
|---|---|
 void | 
changeClasses(ClassElement[] elems,
              int action)
Change the set of top-level classes.  | 
 void | 
changeImports(Import[] elems,
              int action)
Change the set of imports.  | 
 ClassElement[] | 
getAllClasses()
Get all classes recursively, both top-level and inner.  | 
 ClassElement | 
getClass(Identifier name)
Find a top-level class by name.  | 
 ClassElement[] | 
getClasses()
Get all top-level classes.  | 
 Import[] | 
getImports()
Get all imports.  | 
 Identifier | 
getPackage()
Get the package of this source file.  | 
 int | 
getStatus()
Get the parsing status of the element.  | 
 Task | 
prepare()
Begin parsing this source element.  | 
 void | 
runAtomic(Runnable run)
Lock the underlaing document to have exclusive access to it and could make changes on this SourceElement.  | 
 void | 
runAtomicAsUser(Runnable run)
Executes given runnable in "user mode" does not allowing any modifications to parts of text marked as guarded.  | 
 void | 
setPackage(Identifier id)
Set the package of this source file.  | 
| Methods inherited from interface org.openide.src.Element.Impl | 
|---|
addPropertyChangeListener, attachedToElement, getCookie, markCurrent, readResolve, removePropertyChangeListener | 
| Field Detail | 
|---|
static final int ADD
static final int REMOVE
static final int SET
static final long serialVersionUID
| Method Detail | 
|---|
int getStatus()
Task prepare()
getStatus() should be SourceElement.STATUS_NOT, and change
 to one of the other three when parsing is complete, according to whether
 or not errors were encountered, and their severity.
void setPackage(Identifier id) throws SourceException
id - the package name, or null to use the default package
SourceException - if the operation cannot proceedIdentifier getPackage()
null if this source file is in the default packageImport[] getImports()
void changeImports(Import[] elems, int action) throws SourceException
elems - the imports to changeaction - one of ADD, REMOVE, or SET
SourceException - if the action cannot be handledvoid changeClasses(ClassElement[] elems, int action) throws SourceException
elems - the classes to changeaction - one of ADD, REMOVE, or SET
SourceException - if the action cannot be handledClassElement[] getClasses()
ClassElement getClass(Identifier name)
name - the name to look for
null if it does not existClassElement[] getAllClasses()
void runAtomic(Runnable run)
run - the action to runvoid runAtomicAsUser(Runnable run) throws SourceException
run - the action to run
SourceException - if a modification of guarded text occured
   and that is why no changes to the document has been done.
  | 
org.openide.src 1.8.22 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||