IModelCopyService.CanPaste Method
Namespace: NextDesign.Core.Runtime
Description
Checks whether a copied model in the specified project can be pasted to the specified model location.
If any of the following conditions are met, the function determines that pasting is not possible and returns false.
- The specified base model for the paste destination does not exist in the specified project.
- The metamodel structure of the base model for the paste destination does not support pasting (for example, the corresponding class type field does not exist).
Argument
Name | Type | Description |
---|---|---|
project | IProject | Project |
context | ICopyContext | Copy context |
pasteTarget | IModel | Base model for the paste destination |
Return value
- bool
Exception
Name | Exception class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | If null is specified for project If null is specified for context If null is specified for pasteTarget |
Invalid operation | ExtensionInvalidOperationException | If project If a closed project is specified |
Unsupported | ExtensionNotSupportedException | If the current edition of the application is not compatible |