| |
|
| org.eclipse.ui.actions.SelectionListenerAction org.eclipse.ui.actions.CopyResourceAction
All known Subclasses: org.eclipse.ui.actions.MoveResourceAction,
CopyResourceAction | public class CopyResourceAction extends SelectionListenerAction implements ISelectionValidator(Code) | | Standard action for copying the currently selected resources elsewhere
in the workspace. All resources being copied as a group must be siblings.
This class may be instantiated; it is not intended to be subclassed.
|
Method Summary | |
protected CopyFilesAndFoldersOperation | createOperation() Returns the operation to perform when this action runs. | IContainer | getInitialContainer() | public String[] | getModelProviderIds() Returns the model provider ids that are known to the client
that instantiated this operation. | public static IPath | getNewNameFor(IPath originalName, IWorkspace workspace) Returns a new name for a copy of the resource at the given path in the given
workspace. | protected IResource[] | getResources(List resourceList) Returns an array of resources to use for the operation from
the provided list.
Parameters: resourceList - The list of resources to converted into an array. | Shell | getShell() | public String | isValid(Object destination) The CopyResourceAction implementation of this
ISelectionValidator method checks whether the given path
is a good place to copy the selected resources. | IPath | queryDestinationResource() Asks the user for the destination of this action. | public void | run() | protected void | runOperation(IResource[] resources, IContainer destination) | public void | setModelProviderIds(String[] modelProviderIds) Sets the model provider ids that are known to the client
that instantiated this operation. | protected boolean | updateSelection(IStructuredSelection selection) The CopyResourceAction implementation of this
SelectionListenerAction method enables this action only if
all of the one or more selections are sibling resources which are
local (depth infinity). |
ID | final public static String ID(Code) | | The id of this action.
|
CopyResourceAction | public CopyResourceAction(Shell shell)(Code) | | Creates a new action.
Parameters: shell - the shell for any dialogs |
CopyResourceAction | CopyResourceAction(Shell shell, String name)(Code) | | Creates a new action with the given text.
Parameters: shell - the shell for any dialogs Parameters: name - the string used as the name for the action, or null if there is no name |
createOperation | protected CopyFilesAndFoldersOperation createOperation()(Code) | | Returns the operation to perform when this action runs.
the operation to perform when this action runs. |
getInitialContainer | IContainer getInitialContainer()(Code) | | Returns the path of the container to initially select in the container
selection dialog, or null if there is no initial selection
The initial container; null if none. |
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 clientthat instantiated this operation. since: 3.2 |
getNewNameFor | public static IPath getNewNameFor(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 could be determined either automatically or by querying
the user. This name will not be verified by the caller, so it must be
valid and unique.
Note this method is for internal use only.
Parameters: originalName - the full path of the resource Parameters: workspace - the workspace the new full path for the copy, or null if the resourceshould not be copied |
getResources | protected IResource[] getResources(List resourceList)(Code) | | Returns an array of resources to use for the operation from
the provided list.
Parameters: resourceList - The list of resources to converted into an array. an array of resources to use for the operation |
getShell | Shell getShell()(Code) | | Returns the shell in which to show any dialogs
The shell for parenting dialogs; never null . |
isValid | public String isValid(Object destination)(Code) | | The CopyResourceAction implementation of this
ISelectionValidator method checks whether the given path
is a good place to copy the selected resources.
|
queryDestinationResource | IPath queryDestinationResource()(Code) | | Asks the user for the destination of this action.
the path on an existing or new resource container, or null if the operation should be abandoned |
runOperation | protected void runOperation(IResource[] resources, IContainer destination)(Code) | | Runs the operation created in createOperaiton
Parameters: resources - source resources to pass to the operation Parameters: destination - destination container to pass to the operation |
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 clientwho is using this operation. since: 3.2 |
updateSelection | protected boolean updateSelection(IStructuredSelection selection)(Code) | | The CopyResourceAction implementation of this
SelectionListenerAction method enables this action only if
all of the one or more selections are sibling resources which are
local (depth infinity).
|
|
|
|