Class ProgressPasteFromClipboardCommand
- java.lang.Object
-
- org.eclipse.emf.common.command.AbstractCommand
-
- org.eclipse.emf.edit.command.AbstractOverrideableCommand
-
- org.eclipse.emf.edit.command.PasteFromClipboardCommand
-
- org.eclipse.emf.ecp.edit.spi.swt.commands.ProgressPasteFromClipboardCommand
-
- All Implemented Interfaces:
org.eclipse.emf.common.command.Command,IProgressMonitorProvider,org.eclipse.emf.edit.command.OverrideableCommand
public class ProgressPasteFromClipboardCommand extends org.eclipse.emf.edit.command.PasteFromClipboardCommand implements IProgressMonitorProvider
Extension of thePasteFromClipboardCommandwhich enabled progress reporting.- Since:
- 1.11
- Author:
- Johannes Faltermeier
-
-
Constructor Summary
Constructors Constructor Description ProgressPasteFromClipboardCommand(org.eclipse.emf.edit.domain.EditingDomain domain, java.lang.Object owner, java.lang.Object feature, int index)Constructs a newProgressPasteFromClipboardCommand.ProgressPasteFromClipboardCommand(org.eclipse.emf.edit.domain.EditingDomain domain, java.lang.Object owner, java.lang.Object feature, int index, boolean optimize)Constructs a newProgressPasteFromClipboardCommand.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoExecute()protected voiddoExecuteWithProgress(java.lang.String task)Does the same asdoExecute()but also displays a progress dialog.voiddoRedo()protected voiddoRedoWithProgress(java.lang.String task)Does the same asdoRedo()but also displays a progress dialog.voiddoUndo()protected voiddoUndoWithProgress(java.lang.String task)Does the same asdoUndo()but also displays a progress dialog.org.eclipse.core.runtime.IProgressMonitorgetProgressMonitor()protected intgetTotalWorkExecute()protected booleanprepare()-
Methods inherited from class org.eclipse.emf.edit.command.PasteFromClipboardCommand
create, create, doDispose, doGetAffectedObjects, doGetResult, getFeature, getIndex, getOwner, optimizedCanExecute, toString
-
Methods inherited from class org.eclipse.emf.edit.command.AbstractOverrideableCommand
canExecute, canUndo, dispose, doCanExecute, doCanUndo, doGetChildrenToCopy, doGetDescription, doGetLabel, execute, getAffectedObjects, getChildrenToCopy, getDescription, getDomain, getLabel, getOverride, getOwnerList, getResult, redo, setOverride, undo, updateEMap
-
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand
chain, setDescription, setLabel
-
-
-
-
Constructor Detail
-
ProgressPasteFromClipboardCommand
public ProgressPasteFromClipboardCommand(org.eclipse.emf.edit.domain.EditingDomain domain, java.lang.Object owner, java.lang.Object feature, int index)Constructs a newProgressPasteFromClipboardCommand.- Parameters:
domain- theEditingDomainowner- the owner objectfeature- the featureindex- the index
-
ProgressPasteFromClipboardCommand
public ProgressPasteFromClipboardCommand(org.eclipse.emf.edit.domain.EditingDomain domain, java.lang.Object owner, java.lang.Object feature, int index, boolean optimize)Constructs a newProgressPasteFromClipboardCommand.- Parameters:
domain- theEditingDomainowner- the owner objectfeature- the featureindex- the indexoptimize- whether to call the optimized can execute method
-
-
Method Detail
-
prepare
protected boolean prepare()
- Overrides:
preparein classorg.eclipse.emf.edit.command.PasteFromClipboardCommand
-
doExecute
public void doExecute()
- Specified by:
doExecutein interfaceorg.eclipse.emf.edit.command.OverrideableCommand- Overrides:
doExecutein classorg.eclipse.emf.edit.command.PasteFromClipboardCommand
-
doExecuteWithProgress
protected void doExecuteWithProgress(java.lang.String task)
Does the same asdoExecute()but also displays a progress dialog.- Parameters:
task- the name of the task
-
getTotalWorkExecute
protected int getTotalWorkExecute()
- Returns:
- the total work required to execute the paste operation
-
doUndo
public void doUndo()
- Specified by:
doUndoin interfaceorg.eclipse.emf.edit.command.OverrideableCommand- Overrides:
doUndoin classorg.eclipse.emf.edit.command.PasteFromClipboardCommand
-
doUndoWithProgress
protected void doUndoWithProgress(java.lang.String task)
Does the same asdoUndo()but also displays a progress dialog.- Parameters:
task- the name of the task
-
doRedo
public void doRedo()
- Specified by:
doRedoin interfaceorg.eclipse.emf.edit.command.OverrideableCommand- Overrides:
doRedoin classorg.eclipse.emf.edit.command.PasteFromClipboardCommand
-
doRedoWithProgress
protected void doRedoWithProgress(java.lang.String task)
Does the same asdoRedo()but also displays a progress dialog.- Parameters:
task- the name of the task
-
getProgressMonitor
public org.eclipse.core.runtime.IProgressMonitor getProgressMonitor()
- Specified by:
getProgressMonitorin interfaceIProgressMonitorProvider- Returns:
- the
IProgressMonitor
-
-