public class ChangeAttributeOperation extends org.eclipse.core.commands.operations.AbstractOperation implements ITransactionalOperation
ChangeAttributeOperation
can be used to manipulate the value of
an attribute of an IAttributeStore
.Constructor and Description |
---|
ChangeAttributeOperation(org.eclipse.gef.common.attributes.IAttributeStore attributeStore,
java.lang.String attributeKey,
java.lang.Object attributeValue)
Constructs a new
ChangeAttributeOperation to manipulate the value
of an attribute for the given IAttributeStore . |
Modifier and Type | Method and Description |
---|---|
org.eclipse.core.runtime.IStatus |
execute(org.eclipse.core.runtime.IProgressMonitor monitor,
org.eclipse.core.runtime.IAdaptable info) |
boolean |
isContentRelevant() |
boolean |
isNoOp() |
org.eclipse.core.runtime.IStatus |
redo(org.eclipse.core.runtime.IProgressMonitor monitor,
org.eclipse.core.runtime.IAdaptable info) |
org.eclipse.core.runtime.IStatus |
undo(org.eclipse.core.runtime.IProgressMonitor monitor,
org.eclipse.core.runtime.IAdaptable info) |
addContext, canExecute, canRedo, canUndo, dispose, getContexts, getLabel, hasContext, removeContext, setLabel, toString
public ChangeAttributeOperation(org.eclipse.gef.common.attributes.IAttributeStore attributeStore, java.lang.String attributeKey, java.lang.Object attributeValue)
ChangeAttributeOperation
to manipulate the value
of an attribute for the given IAttributeStore
.attributeStore
- The IAttributeStore
that is manipulated by this
operation.attributeKey
- The key that identifies the attribute to change.attributeValue
- The new value of the attribute.public org.eclipse.core.runtime.IStatus execute(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException
execute
in interface org.eclipse.core.commands.operations.IUndoableOperation
execute
in class org.eclipse.core.commands.operations.AbstractOperation
org.eclipse.core.commands.ExecutionException
public boolean isContentRelevant()
isContentRelevant
in interface ITransactionalOperation
public boolean isNoOp()
isNoOp
in interface ITransactionalOperation
public org.eclipse.core.runtime.IStatus redo(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException
redo
in interface org.eclipse.core.commands.operations.IUndoableOperation
redo
in class org.eclipse.core.commands.operations.AbstractOperation
org.eclipse.core.commands.ExecutionException
public org.eclipse.core.runtime.IStatus undo(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException
undo
in interface org.eclipse.core.commands.operations.IUndoableOperation
undo
in class org.eclipse.core.commands.operations.AbstractOperation
org.eclipse.core.commands.ExecutionException
Copyright (c) 2014 itemis AG and others. All rights reserved.