|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.operations.AbstractOperation
org.eclipse.emf.workspace.AbstractEMFOperation
org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand
public abstract class EditElementCommand
Abstract superclass for commands that modify model elements.
Constructor Summary | |
---|---|
protected |
EditElementCommand(java.lang.String label,
org.eclipse.emf.ecore.EObject elementToEdit,
IEditCommandRequest request)
Constructs a new command instance. |
Method Summary | |
---|---|
boolean |
canExecute()
Checks that the element to be modified by this command is of the correct kind. |
protected static java.util.List |
getAffectedFiles(IEditCommandRequest request)
|
protected org.eclipse.emf.ecore.EClass |
getEClass()
Gets the kind of element that can be modified by this command. |
protected org.eclipse.emf.ecore.EClass |
getEClassToEdit()
|
protected org.eclipse.emf.ecore.EObject |
getElementToEdit()
Gets the element to be modified by this command. |
protected IEditCommandRequest |
getRequest()
Gets the edit request. |
protected boolean |
isOK(CommandResult commandResult)
Convenience method to check the status of commandRequest . |
protected void |
setEClass(org.eclipse.emf.ecore.EClass eClass)
Sets the kind of element that can be modified by this command. |
protected void |
setElementToEdit(org.eclipse.emf.ecore.EObject element)
Sets the element to be modified by this command. |
Methods inherited from class org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand |
---|
aggregateStatuses, cleanup, compose, didRedo, didUndo, doExecute, doExecuteWithResult, doRedo, doUndo, getAffectedFiles, getCommandResult, getWorkspaceFiles, getWorkspaceFiles, internalSetResult, reduce, setResult |
Methods inherited from class org.eclipse.emf.workspace.AbstractEMFOperation |
---|
canRedo, canUndo, didCommit, dispose, execute, getChange, getEditingDomain, getOptions, redo, undo |
Methods inherited from class org.eclipse.core.commands.operations.AbstractOperation |
---|
addContext, getContexts, getLabel, hasContext, removeContext, setLabel, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.gmf.runtime.common.core.command.ICommand |
---|
setLabel |
Methods inherited from interface org.eclipse.core.commands.operations.IUndoableOperation |
---|
addContext, canRedo, canUndo, dispose, execute, getContexts, getLabel, hasContext, redo, removeContext, undo |
Constructor Detail |
---|
protected EditElementCommand(java.lang.String label, org.eclipse.emf.ecore.EObject elementToEdit, IEditCommandRequest request)
label
- the command labelelementToEdit
- the element to be modifiedrequest
- the edt requestMethod Detail |
---|
protected static java.util.List getAffectedFiles(IEditCommandRequest request)
public boolean canExecute()
canExecute
in interface IUndoableOperation
canExecute
in class AbstractOperation
protected org.eclipse.emf.ecore.EObject getElementToEdit()
protected org.eclipse.emf.ecore.EClass getEClassToEdit()
protected void setElementToEdit(org.eclipse.emf.ecore.EObject element)
protected IEditCommandRequest getRequest()
protected org.eclipse.emf.ecore.EClass getEClass()
protected void setEClass(org.eclipse.emf.ecore.EClass eClass)
eClass
- the kind of elementprotected boolean isOK(CommandResult commandResult)
commandRequest
.
commandResult
- the command result to check
true
if the result is OK, false
otherwise.
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.