Package org.eclipse.gef.ui.actions
Class DirectEditAction
- All Implemented Interfaces:
- Disposable,- UpdateAction,- IAction
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 SummaryFieldsFields inherited from interface org.eclipse.jface.action.IActionAS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
- 
Constructor SummaryConstructorsConstructorDescriptionDirectEditAction(IEditorPart editor) Same asDirectEditAction(IWorkbenchPart).Constructs a DirectEditAction using the specified part.
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleanreturnstrueif there is exactly 1 EditPart selected that understand a request of type:RequestConstants.REQ_DIRECT_EDIT.protected RequestReturns theRequestbeing used.protected voidinit()Initializes this action.voidrun()voidClients may override the request that is used to perform the direct edit.Methods inherited from class org.eclipse.gef.ui.actions.SelectionActiondispose, getSelectedEditParts, getSelectedObjects, getSelection, handleSelectionChanged, setSelection, setSelectionProvider, updateMethods inherited from class org.eclipse.gef.ui.actions.WorkbenchPartActionexecute, getCommandStack, getWorkbenchPart, isEnabled, refresh, setLazyEnablementCalculation, setWorkbenchPartMethods inherited from class org.eclipse.jface.action.ActionconvertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipTextMethods inherited from class org.eclipse.jface.action.AbstractActionaddPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListenerMethods inherited from class org.eclipse.core.commands.common.EventManageraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
- 
Field Details- 
IDDeprecated.- See Also:
 
 
- 
- 
Constructor Details- 
DirectEditActionSame asDirectEditAction(IWorkbenchPart).- Parameters:
- editor- the editor
 
- 
DirectEditActionConstructs a DirectEditAction using the specified part.- Parameters:
- part- the workbench part
 
 
- 
- 
Method Details- 
calculateEnabledprotected boolean calculateEnabled()returnstrueif there is exactly 1 EditPart selected that understand a request of type:RequestConstants.REQ_DIRECT_EDIT.- Specified by:
- calculateEnabledin class- WorkbenchPartAction
- Returns:
- trueif enabled
 
- 
getDirectEditRequestReturns theRequestbeing used.- Returns:
- the request
 
- 
runpublic void run()
- 
setDirectEditRequestClients may override the request that is used to perform the direct edit.- Parameters:
- req- the new request to be used
 
- 
initprotected void init()Description copied from class:WorkbenchPartActionInitializes this action.- Overrides:
- initin class- WorkbenchPartAction
- See Also:
 
 
-