|
|||||||||
| Home >> All >> javax >> ide >> [ command overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.ide.command
Class Context

java.lang.Objectjavax.ide.command.Context
- public final class Context
- extends java.lang.Object
The Context class provides information about the state of the IDE when a command is in the process of being executed. Such information includes:
- the javax.ide.model.Document the user is working on,
- the javax.ide.model.Project the user is working on, and
- the currently selected javax.ide.model.Elements in the active javax.ide.view.View.
| Field Summary | |
private javax.ide.model.Document |
_document
|
private javax.ide.model.Project |
_project
|
private java.util.HashMap |
_properties
|
private javax.ide.model.Element[] |
_selection
|
| Constructor Summary | |
Context(javax.ide.model.Document document,
javax.ide.model.Project project)
Constructor. |
|
Context(javax.ide.model.Document document,
javax.ide.model.Project project,
javax.ide.model.Element[] selection)
Constructor. |
|
| Method Summary | |
javax.ide.model.Document |
getDocument()
The current javax.ide.model.Document the user is working on. |
javax.ide.model.Project |
getProject()
The current javax.ide.model.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. |
javax.ide.model.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(javax.ide.model.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 |
| Field Detail |
_properties
private java.util.HashMap _properties
_document
private javax.ide.model.Document _document
_project
private javax.ide.model.Project _project
_selection
private javax.ide.model.Element[] _selection
| Constructor Detail |
Context
public Context(javax.ide.model.Document document, javax.ide.model.Project project, javax.ide.model.Element[] selection)
- Constructor.
Context
public Context(javax.ide.model.Document document, javax.ide.model.Project project)
- Constructor.
| Method Detail |
getProject
public javax.ide.model.Project getProject()
- The current javax.ide.model.Project the user is working on.
getDocument
public javax.ide.model.Document getDocument()
- The current javax.ide.model.Document the user is working on.
getSelection
public javax.ide.model.Element[] getSelection()
- Get the currently selected objects. These are javax.ide.model.Elements
that users can select inside IDE views.
setSelection
public void setSelection(javax.ide.model.Element[] selection)
- Set the currently selected objects. These are javax.ide.model.Elements
that users can select inside IDE views.
getProperty
public java.lang.Object getProperty(java.lang.String name, java.lang.Object defaultValue)
- Retrieves the value associated with a property. If no value
exists for the requested property, the specified default value
is returned. Use context properties to pass along extra data
meaningful to an extension.
setProperty
public void setProperty(java.lang.String name, java.lang.Object value)
- Sets the value for a property. Setting a value to
nullremoves that property. Use context properties to pass along extra data meaningful to an extension.
|
|||||||||
| Home >> All >> javax >> ide >> [ command overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
javax.ide.command.Context