Package org.eclipse.ui.actions
Class CopyProjectOperation
java.lang.Object
org.eclipse.ui.actions.CopyProjectOperation
Implementation class to perform the actual copying of project resources from
the clipboard when paste action is invoked.
This class may be instantiated; it is not intended to be subclassed.
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
ConstructorDescriptionCopyProjectOperation
(Shell shell) Create a new operation initialized with a shell. -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyProject
(IProject project) Paste a copy of the project on the clipboard to the workspace.String[]
Returns the model provider ids that are known to the client that instantiated this operation.void
setModelProviderIds
(String[] modelProviderIds) Sets the model provider ids that are known to the client that instantiated this operation.protected static boolean
validateCopy
(Shell shell, IProject project, String newName, String[] modelProviderIds) Deprecated.As of 3.3, validation is performed in the undoable operation executed by this operation.
-
Constructor Details
-
CopyProjectOperation
Create a new operation initialized with a shell.- Parameters:
shell
- parent shell for error dialogs
-
-
Method Details
-
validateCopy
@Deprecated protected static boolean validateCopy(Shell shell, IProject project, String newName, String[] modelProviderIds) Deprecated.As of 3.3, validation is performed in the undoable operation executed by this operation.Validates that the copy of the project will not have undesirable side effects.- Parameters:
shell
- a shellproject
- the project being copiednewName
- the new name of the projectmodelProviderIds
- the model provider ids of models that are known to the client (and can hence be ignored)- Returns:
- whether the operation should proceed
- Since:
- 3.2
-
copyProject
Paste a copy of the project on the clipboard to the workspace.- Parameters:
project
- The project that is beign copied.
-
getModelProviderIds
Returns the model provider ids that are known to the client that instantiated this operation.- Returns:
- the model provider ids that are known to the client that instantiated this operation.
- Since:
- 3.2
-
setModelProviderIds
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 this operation.- Since:
- 3.2
-