|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
javax.ide.command.Context
public final class Context
The Context class provides information about the state of the IDE when a command is in the process of being executed. Such information includes:
Document
the user is working on,Project
the user is working on, andElement
s in the active View
.In addition, to this information, the context allows clients to store arbitrary data to pass on to a command. Such data is stored in the context under a client specified string key. The data can be retrieved using that same key.
Constructor Summary | |
---|---|
Context(Document document, Project project) Constructor. |
|
Context(Document document, Project project, Element[] selection) Constructor. |
Method Summary | |
---|---|
Document |
getDocument() The current Document the user is working on. |
Project |
getProject() The current Project the user is working on. |
java.lang.Object |
getProperty(java.lang.String name, java.lang.Object defaultValue) Retrieves the value associated with a property. |
Element[] |
getSelection() Get the currently selected objects. |
void |
setProperty(java.lang.String name, java.lang.Object value) Sets the value for a property. |
void |
setSelection(Element[] selection) Set the currently selected objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Context(Document document, Project project, Element[] selection)
document
- The document the user is working on when a command is executed.project
- The project the document is in.selection
- The selected objects.public Context(Document document, Project project)
document
- The document the user is working on when a command is executed.project
- The project the document is in.Method Detail |
---|
public Project getProject()
Project
the user is working on.public Document getDocument()
Document
the user is working on.public Element[] getSelection()
Element
s that users can select inside IDE views.public void setSelection(Element[] selection)
Element
s that users can select inside IDE views.selection
- An array of Element
s.public java.lang.Object getProperty(java.lang.String name, java.lang.Object defaultValue)
name
- the property key for which a value is desired.defaultValue
- the value to return if no value currently exists.public void setProperty(java.lang.String name, java.lang.Object value)
null
removes that property. Use context properties to pass along extra data meaningful to an extension.name
- the property key to setvalue
- the value to set
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |