Select the diagram before pasting the elements, by overriding ClipboardCommandSet.ProcessOnPasteCommand(). For more information, see Customizing Element Creation and Movement. This will have the same effect on drag operations. Normally, the item you just copied is still selected, and you cannot paste the same type of element onto it.Īdd an Element Merge Directive to the domain class, and set it to forward merges to the parent class. Rapidly duplicate elements by copying and pasting. For more information, see Customizing Link Copy Behavior. Set the Propagates Copy property of the role to Propagate copy to link and opposite role player. For example, when you copy a new element, copies of any linked comment boxes are made as well. For more information, see Customizing Link Copy Behavior.Ĭopy linked elements. Set the Propagates Copy property of the role to Propagate copy to link only. For example, to have a copied comment box linked to the same subject element. In DSL Explorer, set the Enable Copy Paste property of the Editor node.Ĭopy links to the same target. For example, in a DSL generated from the components solution template, the user can paste ports onto components, but not onto the diagram and can paste components onto the diagram, but not onto other components.įor more information about customizing the model by using program code, see Navigating and Updating a Model in Program Code. The user can paste copied elements onto a target that can accept the elements according to the DSL Definition. This allows the user to paste into other applications such as Word. The copied elements and links are serialized and stored in an ElementGroupPrototype (EGP), which is placed on the clipboard.Īn image of the copied elements is also placed on the clipboard. This rule applies recursively to the copied elements and links. Relationship links between the copied elements. (That is, elements that are the targets of embedding relationships that are sourced at copied elements.) To enable copying, set the Enable Copy Paste property of the Editor node in DSL Explorer.īy default, when the user copies elements to the clipboard, the following elements are also copied:Įmbedded descendants of the selected elements. In a domain-specific language (DSL) created with the Visual Studio Visualization and Modeling SDK, you can alter what happens when the user copies and pastes elements. Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |