|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.actions.WorkspaceModifyOperation | +--org.eclipse.ui.wizards.datatransfer.ImportOperation
An operation which does the actual work of copying objects from the local file system into the workspace.
This class may be instantiated; it is not intended to be subclassed.
Field Summary | |
protected IOverwriteQuery |
overwriteCallback
|
Constructor Summary | |
ImportOperation(IPath containerPath,
IImportStructureProvider provider,
IOverwriteQuery overwriteImplementor,
List filesToImport)
Creates a new operation that imports specific file system objects. |
|
ImportOperation(IPath containerPath,
Object source,
IImportStructureProvider provider,
IOverwriteQuery overwriteImplementor)
Creates a new operation that recursively imports the entire contents of the specified root file system object. |
|
ImportOperation(IPath containerPath,
Object source,
IImportStructureProvider provider,
IOverwriteQuery overwriteImplementor,
List filesToImport)
Creates a new operation that imports specific file system objects. |
Method Summary | |
protected void |
execute(IProgressMonitor progressMonitor)
Performs the steps that are to be treated as a single logical workspace change. |
IStatus |
getStatus()
Returns the status of the import operation. |
void |
setCreateContainerStructure(boolean value)
Sets whether the containment structures that are implied from the full paths of file system objects being imported should be duplicated in the workbench. |
void |
setFilesToImport(List filesToImport)
Sets the file system objects to import. |
void |
setOverwriteResources(boolean value)
Sets whether imported file system objects should automatically overwrite existing workbench resources when a conflict occurs. |
Methods inherited from class org.eclipse.ui.actions.WorkspaceModifyOperation |
run |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected IOverwriteQuery overwriteCallback
Constructor Detail |
public ImportOperation(IPath containerPath, Object source, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor)
The source
parameter represents the root file system object to
import. All contents of this object are imported. Valid types for this parameter
are determined by the supplied IImportStructureProvider
.
The provider
parameter allows this operation to deal with the
source object in an abstract way. This operation calls methods on the provider
and the provider in turn calls specific methods on the source object.
The default import behavior is to recreate the complete container structure
for the contents of the root file system object in their destination.
If setCreateContainerStructure
is set to false then the container
structure created is relative to the root file system object.
containerPath
- the full path of the destination container within the
workspacesource
- the root file system object to importprovider
- the file system structure provider to useoverwriteImplementor
- the overwrite strategy to usepublic ImportOperation(IPath containerPath, Object source, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor, List filesToImport)
The source
parameter represents the root file system object to
import. Valid types for this parameter are determined by the supplied
IImportStructureProvider
. The contents of the source which
are to be imported are specified in the filesToImport
parameter.
The provider
parameter allows this operation to deal with the
source object in an abstract way. This operation calls methods on the provider
and the provider in turn calls specific methods on the source object.
The filesToImport
parameter specifies what contents of the root
file system object are to be imported.
The default import behavior is to recreate the complete container structure
for the file system objects in their destination. If setCreateContainerStructure
is set to false
, then the container structure created for each of
the file system objects is relative to the supplied root file system object.
containerPath
- the full path of the destination container within the
workspacesource
- the root file system object to import fromprovider
- the file system structure provider to useoverwriteImplementor
- the overwrite strategy to usefilesToImport
- the list of file system objects to be imported
(element type: Object
)public ImportOperation(IPath containerPath, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor, List filesToImport)
The provider
parameter allows this operation to deal with the
source object in an abstract way. This operation calls methods on the provider
and the provider in turn calls specific methods on the source object.
The filesToImport
parameter specifies what file system objects
are to be imported.
The default import behavior is to recreate the complete container structure
for the file system objects in their destination. If setCreateContainerStructure
is set to false
, then no container structure is created for each of
the file system objects.
containerPath
- the full path of the destination container within the
workspaceprovider
- the file system structure provider to useoverwriteImplementor
- the overwrite strategy to usefilesToImport
- the list of file system objects to be imported
(element type: Object
)Method Detail |
protected void execute(IProgressMonitor progressMonitor)
WorkspaceModifyOperation
Subclasses must implement this method.
execute
in class WorkspaceModifyOperation
progressMonitor
- the progress monitor to use to display progress and field
user requests to cancelpublic IStatus getStatus()
OK
.
public void setCreateContainerStructure(boolean value)
value
- true
if containers should be created, and
false
otherwisepublic void setFilesToImport(List filesToImport)
filesToImport
- the list of file system objects to be imported
(element type: Object
)public void setOverwriteResources(boolean value)
value
- true
to automatically overwrite, and
false
otherwise
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |