Class 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 the PasteFromClipboardCommand which enabled progress reporting.
    Since:
    1.11
    Author:
    Johannes Faltermeier
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand

        org.eclipse.emf.common.command.AbstractCommand.NonDirtying
    • Field Summary

      • Fields inherited from class org.eclipse.emf.edit.command.PasteFromClipboardCommand

        command, DESCRIPTION, feature, index, LABEL, optimize, owner
      • Fields inherited from class org.eclipse.emf.edit.command.AbstractOverrideableCommand

        domain, overrideCommand
      • Fields inherited from class org.eclipse.emf.common.command.AbstractCommand

        description, isExecutable, isPrepared, label
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doExecute()  
      protected void doExecuteWithProgress​(java.lang.String task)
      Does the same as doExecute() but also displays a progress dialog.
      void doRedo()  
      protected void doRedoWithProgress​(java.lang.String task)
      Does the same as doRedo() but also displays a progress dialog.
      void doUndo()  
      protected void doUndoWithProgress​(java.lang.String task)
      Does the same as doUndo() but also displays a progress dialog.
      org.eclipse.core.runtime.IProgressMonitor getProgressMonitor()  
      protected int getTotalWorkExecute()  
      protected boolean prepare()  
      • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.emf.common.command.Command

        chain
    • Constructor Detail

      • ProgressPasteFromClipboardCommand

        public ProgressPasteFromClipboardCommand​(org.eclipse.emf.edit.domain.EditingDomain domain,
                                                 java.lang.Object owner,
                                                 java.lang.Object feature,
                                                 int index)
        Parameters:
        domain - the EditingDomain
        owner - the owner object
        feature - the feature
        index - the index
      • ProgressPasteFromClipboardCommand

        public ProgressPasteFromClipboardCommand​(org.eclipse.emf.edit.domain.EditingDomain domain,
                                                 java.lang.Object owner,
                                                 java.lang.Object feature,
                                                 int index,
                                                 boolean optimize)
        Parameters:
        domain - the EditingDomain
        owner - the owner object
        feature - the feature
        index - the index
        optimize - whether to call the optimized can execute method
    • Method Detail

      • prepare

        protected boolean prepare()
        Overrides:
        prepare in class org.eclipse.emf.edit.command.PasteFromClipboardCommand
      • doExecute

        public void doExecute()
        Specified by:
        doExecute in interface org.eclipse.emf.edit.command.OverrideableCommand
        Overrides:
        doExecute in class org.eclipse.emf.edit.command.PasteFromClipboardCommand
      • doExecuteWithProgress

        protected void doExecuteWithProgress​(java.lang.String task)
        Does the same as doExecute() 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:
        doUndo in interface org.eclipse.emf.edit.command.OverrideableCommand
        Overrides:
        doUndo in class org.eclipse.emf.edit.command.PasteFromClipboardCommand
      • doUndoWithProgress

        protected void doUndoWithProgress​(java.lang.String task)
        Does the same as doUndo() but also displays a progress dialog.
        Parameters:
        task - the name of the task
      • doRedo

        public void doRedo()
        Specified by:
        doRedo in interface org.eclipse.emf.edit.command.OverrideableCommand
        Overrides:
        doRedo in class org.eclipse.emf.edit.command.PasteFromClipboardCommand
      • doRedoWithProgress

        protected void doRedoWithProgress​(java.lang.String task)
        Does the same as doRedo() but also displays a progress dialog.
        Parameters:
        task - the name of the task