Java Doc for CopyFilesAndFoldersOperation.java in  » IDE-Eclipse » ui-ide » org » eclipse » ui » actions » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui ide » org.eclipse.ui.actions 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.ui.actions.CopyFilesAndFoldersOperation

All known Subclasses:   org.eclipse.ui.actions.MoveFilesAndFoldersOperation,
CopyFilesAndFoldersOperation
public class CopyFilesAndFoldersOperation (Code)
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
public  CopyFilesAndFoldersOperation(Shell shell)
     Creates a new operation initialized with a shell.

Method Summary
protected  booleancanPerformAutoRename()
     Returns whether this operation is able to perform on-the-fly auto-renaming of resources with name collisions.
 IStatuscheckExist(IFileStore[] stores)
     Checks whether the infos exist.
 IStatuscheckExist(IResource[] resources)
     Checks whether the resources with the given names exist.
protected  voidcopy(IResource[] resources, IPath destination, IProgressMonitor subMonitor)
     Copies the resources to the given destination.
public  voidcopyFiles(URI[] uris, IContainer destination)
     Copies the given URIS and folders to the destination.
public  voidcopyFiles(String[] fileNames, IContainer destination)
     Copies the given files and folders to the destination.
public  voidcopyFilesInCurrentThread(URI[] uris, IContainer destination, IProgressMonitor monitor)
     Copies the given files and folders to the destination without forking a new Thread or blocking using a WorkspaceModifyOperation.
public  voidcopyFilesInCurrentThread(String[] fileNames, IContainer destination, IProgressMonitor monitor)
     Copies the given files and folders to the destination without forking a new Thread or blocking using a WorkspaceModifyOperation.
public  IResource[]copyResources(IResource[] resources, IContainer destination)
     Copies the given resources to the destination.
public  IResource[]copyResourcesInCurrentThread(IResource[] resources, IContainer destination, IProgressMonitor monitor)
     Copies the given resources to the destination in the current Thread without forking a new Thread or blocking using a WorkspaceModifyOperation.
 IResourcecreateLinkedResourceHandle(IContainer destination, IResource source)
     Creates a file or folder handle for the source resource as if it were to be created in the destination container.
 booleandelete(IResource resource, IProgressMonitor monitor)
     Removes the given resource from the workspace.
static  IPathgetAutoNewNameFor(IPath originalName, IWorkspace workspace)
     Returns a new name for a copy of the resource at the given path in the given workspace.
protected  StringgetDeepCheckQuestion(IResource source)
     Returns the message for querying deep copy/move of a linked resource.
protected  IFilegetFile(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.
Parameters:
  fileNames - files to return File object for.
protected  IFoldergetFolder(IResource resource)
     Returns the resource either casted to or adapted to an IFolder.
public  String[]getModelProviderIds()
     Returns the model provider ids that are known to the client that instantiated this operation.
protected  StringgetOperationTitle()
     Returns the task title for this operation's progress dialog.
protected  StringgetProblemsMessage()
     Returns the message for this operation's problems dialog.
protected  StringgetProblemsTitle()
     Returns the title for this operation's problems dialog.
protected  AbstractWorkspaceOperationgetUndoableCopyOrMoveOperation(IResource[] resources, IPath destinationPath)
     Returns an AbstractWorkspaceOperation suitable for performing the move or copy operation that will move or copy the given resources to the given destination path.
protected  booleangetValidateConflictSource()
     Returns whether the source file in a destination collision will be validateEdited together with the collision itself.
protected  booleanhomogenousResources(IResource source, IResource destination)
     Returns whether the given resources are either both linked or both unlinked.
Parameters:
  source - source resource
Parameters:
  destination - destination resource boolean true if both resources are either linkedor unlinked.
 booleanisDestinationSameAsSource(IResource[] sourceResources, IContainer destination)
     Returns whether any of the given source resources are being recopied to their current container.
protected  booleanisMove()
    
public  voidsetModelProviderIds(String[] modelProviderIds)
     Sets the model provider ids that are known to the client that instantiated this operation.
public  StringvalidateDestination(IContainer destination, IResource[] sourceResources)
     Checks whether the destination is valid for copying the source resources.

Note this method is for internal use only.

public  StringvalidateImportDestination(IContainer destination, String[] sourceNames)
     Checks whether the destination is valid for copying the source files.

Note this method is for internal use only.



Constructor Detail
CopyFilesAndFoldersOperation
public CopyFilesAndFoldersOperation(Shell shell)(Code)
Creates a new operation initialized with a shell.
Parameters:
  shell - parent shell for error dialogs




Method Detail
canPerformAutoRename
protected boolean canPerformAutoRename()(Code)
Returns whether this operation is able to perform on-the-fly auto-renaming of resources with name collisions. true if auto-rename is supported, andfalse otherwise



checkExist
IStatus checkExist(IFileStore[] stores)(Code)
Checks whether the infos exist.
Parameters:
  stores - the file infos to test Multi status with one error message for each missing file.



checkExist
IStatus checkExist(IResource[] resources)(Code)
Checks whether the resources with the given names exist.
Parameters:
  resources - IResources to checl Multi status with one error message for each missing file.



copy
protected void copy(IResource[] resources, IPath destination, IProgressMonitor subMonitor) throws CoreException(Code)
Copies the resources to the given destination. This method is called recursively to merge folders during folder copy.
Parameters:
  resources - the resources to copy
Parameters:
  destination - destination to which resources will be copied
Parameters:
  subMonitor - a progress monitor for showing progress and for cancelationCopyFilesAndFoldersOperation.getUndoableCopyOrMoveOperation(IResource[],IPath)



copyFiles
public void copyFiles(URI[] uris, IContainer destination)(Code)
Copies the given URIS and folders to the destination. The current Thread is halted while the resources are copied using a WorkspaceModifyOperation. This method should be called from the UI Thread.
Parameters:
  uris - the URIs to copy
Parameters:
  destination - destination to which files will be copied
See Also:   WorkspaceModifyOperation
See Also:   Display.getThread
See Also:   Thread.currentThread
since:
   3.2



copyFiles
public void copyFiles(String[] fileNames, IContainer destination)(Code)
Copies the given files and folders to the destination. The current Thread is halted while the resources are copied using a WorkspaceModifyOperation. This method should be called from the UI Thread.
Parameters:
  fileNames - names of the files to copy
Parameters:
  destination - destination to which files will be copied
See Also:   WorkspaceModifyOperation
See Also:   Display.getThread
See Also:   Thread.currentThread
since:
   3.2



copyFilesInCurrentThread
public void copyFilesInCurrentThread(URI[] uris, IContainer destination, IProgressMonitor monitor)(Code)
Copies the given files and folders to the destination without forking a new Thread or blocking using a WorkspaceModifyOperation. It is recommended that this method only be called from a WorkspaceJob to avoid possible deadlock.
Parameters:
  uris - the URIs to copy
Parameters:
  destination - destination to which URIS will be copied
Parameters:
  monitor - the monitor that information will be sent to.
See Also:   WorkspaceModifyOperation
See Also:   WorkspaceJob
since:
   3.2



copyFilesInCurrentThread
public void copyFilesInCurrentThread(String[] fileNames, IContainer destination, IProgressMonitor monitor)(Code)
Copies the given files and folders to the destination without forking a new Thread or blocking using a WorkspaceModifyOperation. It is recommended that this method only be called from a WorkspaceJob to avoid possible deadlock.
Parameters:
  fileNames - names of the files to copy
Parameters:
  destination - destination to which files will be copied
Parameters:
  monitor - the monitor that information will be sent to.
See Also:   WorkspaceModifyOperation
See Also:   WorkspaceJob
since:
   3.2



copyResources
public IResource[] copyResources(IResource[] resources, IContainer destination)(Code)
Copies the given resources to the destination. The current Thread is halted while the resources are copied using a WorkspaceModifyOperation. This method should be called from the UIThread.
Parameters:
  resources - the resources to copy
Parameters:
  destination - destination to which resources will be copied IResource[] the resulting IResource[]
See Also:   WorkspaceModifyOperation
See Also:   Display.getThread
See Also:   Thread.currentThread



copyResourcesInCurrentThread
public IResource[] copyResourcesInCurrentThread(IResource[] resources, IContainer destination, IProgressMonitor monitor)(Code)
Copies the given resources to the destination in the current Thread without forking a new Thread or blocking using a WorkspaceModifyOperation. It recommended that this method only be called from a WorkspaceJob to avoid possible deadlock.
Parameters:
  resources - the resources to copy
Parameters:
  destination - destination to which resources will be copied
Parameters:
  monitor - the monitor that information will be sent to. IResource[] the resulting IResource[]
See Also:   WorkspaceModifyOperation
See Also:   WorkspaceJob
since:
   3.2



createLinkedResourceHandle
IResource createLinkedResourceHandle(IContainer destination, IResource source)(Code)
Creates a file or folder handle for the source resource as if it were to be created in the destination container.
Parameters:
  destination - destination container
Parameters:
  source - source resource IResource file or folder handle, depending on the source type.



delete
boolean delete(IResource resource, IProgressMonitor monitor)(Code)
Removes the given resource from the workspace.
Parameters:
  resource - resource to remove from the workspace
Parameters:
  monitor - a progress monitor for showing progress and for cancelation true the resource was deleted successfully false the resource wasnot deleted because a CoreException occurred



getAutoNewNameFor
static IPath getAutoNewNameFor(IPath originalName, IWorkspace workspace)(Code)
Returns a new name for a copy of the resource at the given path in the given workspace. This name is determined automatically.
Parameters:
  originalName - the full path of the resource
Parameters:
  workspace - the workspace the new full path for the copy



getDeepCheckQuestion
protected String getDeepCheckQuestion(IResource source)(Code)
Returns the message for querying deep copy/move of a linked resource.
Parameters:
  source - resource the query is made for the deep query message



getFile
protected IFile getFile(IResource resource)(Code)
Returns the resource either casted to or adapted to an IFile.
Parameters:
  resource - resource to cast/adapt the resource either casted to or adapted to an IFile.null if the resource does not adapt to IFile



getFiles
protected File[] getFiles(String[] fileNames)(Code)
Returns java.io.File objects for the given file names.
Parameters:
  fileNames - files to return File object for. java.io.File objects for the given file names.



getFolder
protected IFolder getFolder(IResource resource)(Code)
Returns the resource either casted to or adapted to an IFolder.
Parameters:
  resource - resource to cast/adapt the resource either casted to or adapted to an IFolder.null if the resource does not adapt to IFolder



getModelProviderIds
public String[] getModelProviderIds()(Code)
Returns the model provider ids that are known to the client that instantiated this operation. the model provider ids that are known to the client thatinstantiated this operation.
since:
   3.2



getOperationTitle
protected String getOperationTitle()(Code)
Returns the task title for this operation's progress dialog. the task title



getProblemsMessage
protected String getProblemsMessage()(Code)
Returns the message for this operation's problems dialog. the problems message



getProblemsTitle
protected String getProblemsTitle()(Code)
Returns the title for this operation's problems dialog. the problems dialog title



getUndoableCopyOrMoveOperation
protected AbstractWorkspaceOperation getUndoableCopyOrMoveOperation(IResource[] resources, IPath destinationPath)(Code)
Returns an AbstractWorkspaceOperation suitable for performing the move or copy operation that will move or copy the given resources to the given destination path.
Parameters:
  resources - the resources to be moved or copied
Parameters:
  destinationPath - the destination path to which the resources should be moved the operation that should be used to perform the move or cop
since:
   3.3



getValidateConflictSource
protected boolean getValidateConflictSource()(Code)
Returns whether the source file in a destination collision will be validateEdited together with the collision itself. Returns false. Should return true if the source file is to be deleted after the operation. boolean true if the source file in a destinationcollision should be validateEdited. false if onlythe destination should be validated.



homogenousResources
protected boolean homogenousResources(IResource source, IResource destination)(Code)
Returns whether the given resources are either both linked or both unlinked.
Parameters:
  source - source resource
Parameters:
  destination - destination resource boolean true if both resources are either linkedor unlinked. false otherwise.



isDestinationSameAsSource
boolean isDestinationSameAsSource(IResource[] sourceResources, IContainer destination)(Code)
Returns whether any of the given source resources are being recopied to their current container.
Parameters:
  sourceResources - the source resources
Parameters:
  destination - the destination container true if at least one of the given sourceresource's parent container is the same as the destination



isMove
protected boolean isMove()(Code)
Return whether the operation is a move or a copy whether the operation is a move or a copy
since:
   3.2



setModelProviderIds
public void setModelProviderIds(String[] modelProviderIds)(Code)
Sets the model provider ids that are known to the client that instantiated this operation. Any potential side effects reported by these models during validation will be ignored.
Parameters:
  modelProviderIds - the model providers known to the client who is using thisoperation.
since:
   3.2



validateDestination
public String validateDestination(IContainer destination, IResource[] sourceResources)(Code)
Checks whether the destination is valid for copying the source resources.

Note this method is for internal use only. It is not API.


Parameters:
  destination - the destination container
Parameters:
  sourceResources - the source resources an error message, or null if the path is valid



validateImportDestination
public String validateImportDestination(IContainer destination, String[] sourceNames)(Code)
Checks whether the destination is valid for copying the source files.

Note this method is for internal use only. It is not API.


Parameters:
  destination - the destination container
Parameters:
  sourceNames - the source file names an error message, or null if the path is valid



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.