Class FunctionCommand<T>
- java.lang.Object
-
- org.eclipse.core.commands.operations.AbstractOperation
-
- com.e1c.g5.v8.dt.platform.standaloneserver.wst.core.command.FunctionCommand<T>
-
- All Implemented Interfaces:
org.eclipse.core.commands.operations.IUndoableOperation
public class FunctionCommand<T> extends org.eclipse.core.commands.operations.AbstractOperation
Command which acceptFunction
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.core.runtime.IStatus
execute(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info)
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)
-
-
-
Constructor Detail
-
FunctionCommand
public FunctionCommand(T value, String label, Function<T,org.eclipse.core.runtime.IStatus> execute, Function<T,org.eclipse.core.runtime.IStatus> undo)
Constructor with parameters.- Parameters:
value
- to modify, cannot benull
label
- a label, cannot benull
execute
- to run execute, cannot benull
undo
- to run undo, cannot benull
-
-
Method Detail
-
redo
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
- Specified by:
redo
in interfaceorg.eclipse.core.commands.operations.IUndoableOperation
- Specified by:
redo
in classorg.eclipse.core.commands.operations.AbstractOperation
- Throws:
org.eclipse.core.commands.ExecutionException
-
execute
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
- Specified by:
execute
in interfaceorg.eclipse.core.commands.operations.IUndoableOperation
- Specified by:
execute
in classorg.eclipse.core.commands.operations.AbstractOperation
- Throws:
org.eclipse.core.commands.ExecutionException
-
undo
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
- Specified by:
undo
in interfaceorg.eclipse.core.commands.operations.IUndoableOperation
- Specified by:
undo
in classorg.eclipse.core.commands.operations.AbstractOperation
- Throws:
org.eclipse.core.commands.ExecutionException
-
-