Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.actions
Class MoveFilesAndFoldersOperation

java.lang.Object
  extended by 

org.eclipse.ui.actions.CopyFilesAndFoldersOperation
      extended by 
org.eclipse.ui.actions.MoveFilesAndFoldersOperation

public class MoveFilesAndFoldersOperation
extends CopyFilesAndFoldersOperation

Moves files and folders.

This class may be instantiated; it is not intended to be subclassed.

Since:
2.1
Restriction:
This class is not intended to be subclassed by clients.

Constructor Summary
MoveFilesAndFoldersOperation ( 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)
          Deprecated. As of 3.3, the work is performed in the undoable operation created in getUndoableCopyOrMoveOperation(IResource[], IPath)
protected   String getDeepCheckQuestion ( IResource source)
          Returns the message for querying deep copy/move of a linked resource.
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   AbstractWorkspaceOperation getUndoableCopyOrMoveOperation ( 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  boolean getValidateConflictSource ()
          Returns whether the source file in a destination collision will be validateEdited together with the collision itself.
protected  boolean isMove ()
          Return whether the operation is a move or a copy
  String validateDestination ( IContainer destination, IResource[] sourceResources)
          Checks whether the destination is valid for copying the source resources.
 
Methods inherited from class org.eclipse.ui.actions. CopyFilesAndFoldersOperation
copyFiles, copyFiles, copyFilesInCurrentThread, copyFilesInCurrentThread, copyResources, copyResourcesInCurrentThread, getFile, getFiles, getFolder, getModelProviderIds, homogenousResources, setModelProviderIds, validateImportDestination
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoveFilesAndFoldersOperation

public MoveFilesAndFoldersOperation(
Shell shell)
Creates a new operation initialized with a shell.

Parameters:
shell - parent shell for error dialogs
Method Detail

canPerformAutoRename

protected boolean canPerformAutoRename()
Returns whether this operation is able to perform on-the-fly auto-renaming of resources with name collisions.

Overrides:
canPerformAutoRename in class CopyFilesAndFoldersOperation
Returns:
true if auto-rename is supported, and false otherwise

copy

protected void copy(
IResource[] resources,
                    
IPath destination,
                    
IProgressMonitor subMonitor)
             throws 
CoreException
Deprecated. As of 3.3, the work is performed in the undoable operation created in getUndoableCopyOrMoveOperation(IResource[], IPath)

Moves the resources to the given destination. This method is called recursively to merge folders during folder move.

Overrides:
copy in class CopyFilesAndFoldersOperation
Parameters:
resources - the resources to move
destination - destination to which resources will be moved
subMonitor - a progress monitor for showing progress and for cancelation
Throws:
CoreException

getDeepCheckQuestion

protected 
String getDeepCheckQuestion(
IResource source)
Returns the message for querying deep copy/move of a linked resource.

Overrides:
getDeepCheckQuestion in class CopyFilesAndFoldersOperation
Parameters:
source - resource the query is made for
Returns:
the deep query message

getOperationTitle

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

Overrides:
getOperationTitle in class CopyFilesAndFoldersOperation
Returns:
the task title

getProblemsMessage

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

Overrides:
getProblemsMessage in class CopyFilesAndFoldersOperation
Returns:
the problems message

getProblemsTitle

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

Overrides:
getProblemsTitle in class CopyFilesAndFoldersOperation
Returns:
the problems dialog title

getValidateConflictSource

protected boolean getValidateConflictSource()
Returns whether the source file in a destination collision will be validateEdited together with the collision itself. Returns true.

Overrides:
getValidateConflictSource in class CopyFilesAndFoldersOperation
Returns:
boolean true, the source file in a destination collision should be validateEdited.

validateDestination

public 
String validateDestination(
IContainer destination,
                                  
IResource[] sourceResources)
Description copied from class: CopyFilesAndFoldersOperation
Checks whether the destination is valid for copying the source resources.

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

Overrides:
validateDestination in class CopyFilesAndFoldersOperation
Parameters:
destination - the destination container
sourceResources - the source resources
Returns:
an error message, or null if the path is valid

isMove

protected boolean isMove()
Description copied from class: CopyFilesAndFoldersOperation
Return whether the operation is a move or a copy

Overrides:
isMove in class CopyFilesAndFoldersOperation
Returns:
whether the operation is a move or a copy

getUndoableCopyOrMoveOperation

protected 
AbstractWorkspaceOperation getUndoableCopyOrMoveOperation(
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.

Overrides:
getUndoableCopyOrMoveOperation in class CopyFilesAndFoldersOperation
Parameters:
resources - the resources to be moved or copied
destinationPath - the destination path to which the resources should be moved
Returns:
the operation that should be used to perform the move or copy
Since:
3.3

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire