|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.action.Action | +--org.eclipse.gef.ui.actions.WorkbenchPartAction | +--org.eclipse.gef.ui.actions.EditorPartAction | +--org.eclipse.gef.ui.actions.SelectionAction | +--org.eclipse.gef.ui.actions.DirectEditAction
An action to perform direct editing on a selected part. The DirectEditAction provides
the function of sending a Request
of the type RequestConstants.REQ_DIRECT_EDIT
to a single EditPart. The request will be sent to the
editpart using EditPart.performRequest(Request)
.
This action will be enabled whenever the current selection is one EditPart, and that
editpart returns true
for EditPart.understandsRequest(Request)
,
using the getDirectEditRequest()
.
Clients can control the request that is sent by calling setDirectEditRequest(Request)
. The DirectEditRequest
class allows the client to specify the feature that should be edited when
invoked.
Field Summary | |
static String |
ID
Deprecated. |
Fields inherited from interface org.eclipse.jface.action.IAction |
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, IMAGE, TEXT, TOOL_TIP_TEXT |
Constructor Summary | |
DirectEditAction(IEditorPart editor)
Deprecated. use DirectEditAction(IWorkbenchPart part) |
|
DirectEditAction(IWorkbenchPart part)
Constructs a DirectEditAction using the specified part. |
Method Summary | |
protected boolean |
calculateEnabled()
returns true if there is exactly 1 EditPart selected that understand
a request of type: RequestConstants.REQ_DIRECT_EDIT . |
protected Request |
getDirectEditRequest()
Returns the Request being used. |
protected void |
init()
Initializes this action. |
void |
run()
|
void |
setDirectEditRequest(Request req)
Clients may override the request that is used to perform the direct edit. |
Methods inherited from class org.eclipse.gef.ui.actions.SelectionAction |
dispose, getSelectedObjects, getSelection, handleSelectionChanged, setSelection, setSelectionProvider, update |
Methods inherited from class org.eclipse.gef.ui.actions.EditorPartAction |
getEditorPart, setEditorPart |
Methods inherited from class org.eclipse.gef.ui.actions.WorkbenchPartAction |
execute, getCommandStack, getWorkbenchPart, isEnabled, refresh, setLazyEnablementCalculation, setWorkbenchPart |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String ID
Constructor Detail |
public DirectEditAction(IEditorPart editor)
editor
- the editorpublic DirectEditAction(IWorkbenchPart part)
part
- the workbench partMethod Detail |
protected boolean calculateEnabled()
true
if there is exactly 1 EditPart selected that understand
a request of type: RequestConstants.REQ_DIRECT_EDIT
.
calculateEnabled
in class WorkbenchPartAction
true
if enabledprotected Request getDirectEditRequest()
Request
being used.
public void run()
run
in interface IAction
run
in class Action
IAction.run()
public void setDirectEditRequest(Request req)
req
- the new request to be usedprotected void init()
WorkbenchPartAction
init
in class WorkbenchPartAction
WorkbenchPartAction.init()
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |