|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.actions.CopyFilesAndFoldersOperation
Perform the copy of file and folder resources from the clipboard when paste action is invoked.
This class may be instantiated; it is not intended to be subclassed.
Constructor Summary | |
CopyFilesAndFoldersOperation(Shell shell)
Creates a new operation initialized with a shell. |
Method Summary | |
protected boolean |
canPerformAutoRename()
Returns whether this operation is able to perform on-the-fly auto-renaming of resources with name collisions. |
protected void |
copy(IResource[] resources,
IPath destination,
IProgressMonitor subMonitor)
Copies the resources to the given destination. |
void |
copyFiles(String[] fileNames,
IContainer destination)
Copies the given files and folders to the destination. |
IResource[] |
copyResources(IResource[] resources,
IContainer destination)
Copies the given resources to the destination. |
protected String |
getDeepCheckQuestion(IResource source)
Returns the message for querying deep copy/move of a linked resource. |
protected IFile |
getFile(IResource resource)
Returns the resource either casted to or adapted to an IFile. |
protected File[] |
getFiles(String[] fileNames)
Returns java.io.File objects for the given file names. |
protected IFolder |
getFolder(IResource resource)
Returns the resource either casted to or adapted to an IFolder. |
protected String |
getOperationTitle()
Returns the task title for this operation's progress dialog. |
protected String |
getProblemsMessage()
Returns the message for this operation's problems dialog. |
protected String |
getProblemsTitle()
Returns the title for this operation's problems dialog. |
protected boolean |
getValidateConflictSource()
Returns whether the source file in a destination collision will be validateEdited together with the collision itself. |
protected boolean |
homogenousResources(IResource source,
IResource destination)
Returns whether the given resources are either both linked or both unlinked. |
String |
validateDestination(IContainer destination,
IResource[] sourceResources)
Checks whether the destination is valid for copying the source resources. |
String |
validateImportDestination(IContainer destination,
String[] sourceNames)
Checks whether the destination is valid for copying the source files. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CopyFilesAndFoldersOperation(Shell shell)
shell
- parent shell for error dialogsMethod Detail |
protected boolean canPerformAutoRename()
true
if auto-rename is supported,
and false
otherwiseprotected String getDeepCheckQuestion(IResource source)
source
- resource the query is made forprotected void copy(IResource[] resources, IPath destination, IProgressMonitor subMonitor) throws CoreException
resources
- the resources to copydestination
- destination to which resources will be copiedsubMonitor
- a progress monitor for showing progress and for cancelationpublic IResource[] copyResources(IResource[] resources, IContainer destination)
resources
- the resources to copydestination
- destination to which resources will be copiedpublic void copyFiles(String[] fileNames, IContainer destination)
fileNames
- names of the files to copydestination
- destination to which files will be copiedprotected IFile getFile(IResource resource)
resource
- resource to cast/adaptnull
if the resource does not adapt to IFileprotected File[] getFiles(String[] fileNames)
fileNames
- files to return File object for.protected IFolder getFolder(IResource resource)
resource
- resource to cast/adaptnull
if the resource does not adapt to IFolderprotected String getOperationTitle()
protected String getProblemsMessage()
protected String getProblemsTitle()
protected boolean getValidateConflictSource()
true
if the source file in a
destination collision should be validateEdited.
false
if only the destination should be validated.protected boolean homogenousResources(IResource source, IResource destination)
source
- source resourcedestination
- destination resourcetrue
if both resources are either
linked or unlinked. false
otherwise.public String validateDestination(IContainer destination, IResource[] sourceResources)
Note this method is for internal use only. It is not API.
destination
- the destination containersourceResources
- the source resourcesnull
if the path is validpublic String validateImportDestination(IContainer destination, String[] sourceNames)
Note this method is for internal use only. It is not API.
destination
- the destination containersourceNames
- the source file namesnull
if the path is valid
|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |