|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.AbstractHandler
org.eclipse.ui.editors.text.FileBufferOperationHandler
Operation handler for a file buffer.
This class may be instantiated or be subclassed.
Constructor Summary | |
---|---|
FileBufferOperationHandler(IFileBufferOperation fileBufferOperation)
Creates a new file buffer operation handler. |
Method Summary | |
---|---|
protected IFile[] |
collectFiles(IResource[] resources)
Collects the files out of the given resources. |
protected void |
computeSelectedResources()
Computes the selected resources. |
protected void |
doRun(IFile[] files,
IPath location,
IFileBufferOperation fileBufferOperation)
Runs the given operation. |
Object |
execute(ExecutionEvent event)
Executes with the map of parameter values by name. |
protected IPath[] |
generateLocations(IFile[] files,
IProgressMonitor progressMonitor)
Generates the file buffer locations out of the given files. |
protected ISelection |
getSelection()
Returns the selection of the active workbench window. |
protected Shell |
getShell()
Returns the shell of the active workbench window. |
protected IWorkbenchWindow |
getWorkbenchWindow()
Returns the active workbench window. |
void |
initialize(IResource[] resources,
IPath location)
Initializes this file buffer operation handler with the given resources and the given location. |
protected boolean |
isAcceptableLocation(IPath location)
Tells whether the given location is accepted by this handler. |
Methods inherited from class org.eclipse.core.commands.AbstractHandler |
---|
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileBufferOperationHandler(IFileBufferOperation fileBufferOperation)
fileBufferOperation
- the file buffer operationMethod Detail |
public void initialize(IResource[] resources, IPath location)
resources
- the resources to be adoptedlocation
- the locationprotected final void computeSelectedResources()
protected final ISelection getSelection()
null
protected final IWorkbenchWindow getWorkbenchWindow()
null
if not availableprotected IFile[] collectFiles(IResource[] resources)
resources
- the resources from which to get the files
protected final void doRun(IFile[] files, IPath location, IFileBufferOperation fileBufferOperation)
files
- the file on which to run this operationlocation
- the file buffer locationfileBufferOperation
- the operation to runprotected final Shell getShell()
protected final IPath[] generateLocations(IFile[] files, IProgressMonitor progressMonitor)
files
- an array of filesprogressMonitor
- the progress monitor
protected boolean isAcceptableLocation(IPath location)
location
- a file buffer location
true
if the given location is acceptablepublic Object execute(ExecutionEvent event) throws ExecutionException
IHandler
event
- An event containing all the information about the current
state of the application; must not be null
.
null
.
ExecutionException
- if an exception occurred during execution.
|
Eclipse Platform Release 3.1 |
|||||||||||
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. and others 2000, 2005. All rights reserved.