| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A generic source code-based model's element.
It defines the functionality shared by all SCI objects.
SciObject can be copied, cut, replaced, or deleted. Methods copy, cut,
and replace
return SciObject which can be pasted later into SciContainer using the
SciContainer.paste method.
It is possible to get the file containing this SciObject through the
getContainingFile method.
It is also possible to store any Object instance within this SciObject
using the setUserProperty method.
Given a key, the associated element can be looked up using the
getUserProperty method.
| Method Summary | |
boolean | canCut()Checks whether it is possible to cut this SciObject. |
boolean | canDelete()Checks whether it is possible to delete this SciObject. |
boolean | canReplace(SciObject newObject)Checks whether it is possible to replace this SciObject with the specified
SciObject. |
SciObject | copy()Copies this SciObject. |
SciObject | cut()Cuts this SciObject. |
void | delete()Deletes this SciObject. |
SciFile | getContainingFile()Returns an SciFile object this object is contained in. |
SciScope | getContainingScope()Returns a containing scope for this object. |
String | getLanguage()Returns a string with the name of the source code language for this object. |
SciTextPositions | getPositions()Returns SciTextPositions instance, which contains the start and the end offsets
of the text of this object in the file. |
String | getText()Returns a string with object's source code. |
Object | getUserProperty(Object key)Returns the value to which the specified key is mapped in this SciObject. |
boolean | isReadOnly()Returns true if this object is read-only, false otherwise. |
SciObject | replace(SciObject newObject)Replaces this SciObject with the specified SciObject. |
void | setUserProperty(Object key, Object value)Maps the specified key to the specified value in this SciObject. |
| Method Detail |
public boolean canCut()
SciObject.true if it can be cut, false otherwisepublic boolean canDelete()
SciObject.true if it is possible to delete this SciObject, false
public boolean canReplace(SciObject newObject)
SciObject with the specified
SciObject.SciObject which needs to be placed instead of this SciObjecttrue if this SciObject can be replaced, false otherwisepublic SciObject copy()
SciObject. It can be pasted into some container later.SciObjectpublic SciObject cut()
SciObject. It can be pasted into some container later.SciObjectpublic void delete()
SciObject. Note that this method doesn't return the deleted object
cut method does).public SciFile getContainingFile()
SciFile object this object is contained in. For files and packages returns
null.SciFile object this object is contained inpublic SciScope getContainingScope()
SciFiles, SciCodeBlocks,
SciClasses.
null.public String getLanguage()
public SciTextPositions getPositions()
SciTextPositions instance, which contains the start and the end offsets
null.SciTextPositions instancepublic String getText()
getPositions method. For files and packages
null.public Object getUserProperty(Object key)
SciObject.SciObject; null
SciObjectpublic boolean isReadOnly()
true if this object is read-only, false otherwise.true if this object is read-only, false otherwisepublic SciObject replace(SciObject newObject)
SciObject with the specified SciObject.SciObject which needs to be placed instead of this SciObjectSciObject that has been placed instead of this SciObjectpublic void setUserProperty(Object key, Object value)
SciObject.
null then the property with the specified key will be deleted from
SciObject.null.
| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||