is there a way to get an independent copy of an element in a diagram?
For instance to preserve all the formatting and just change the name to get a similar looking but independent new element.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Copy/paste should be enabled on most diagrams except the sequence diagram and the similar ones. If on the other hand you think about copying a model represented by a diagram element, select and copy/paste a model in the Model Explorer panel.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You should use Inheritance (<<Generalization>> or <<Realizes>>) to make a duplicate a Classifier. Copy/Paste does not make a new instance of a Classifier. This is consistent with UML standard and correctly implemented in StarUML...
SARC
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sorry for bugging, just want to use a Statechart Diagram for documentation purposes. To distinguish system internal states and user-defined states I'd like to format the states (line/fill-color, font...). To preserve the formatting it should be possible to copy/paste the elements as new element for further independent editing.
Thanks for any help or better ideas. Walter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The tricky part is the conceptual separation between the view and the model. The program is generally model centric so if you copy a model no existing views are copied, just a new model appears in the Model Explorer. On the other hand copying a view results in creating a new view with all formatting preserved but connected to the original model.
So there is no a way to clone a model while keeping formatting of its views. Maybe a function "copy/paste formatting" operating on views would help with that problem. Some more investigation would be required to see how it could be done.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I understand question, I think that this can be done by using Export/Import "Model Fragment".
1. Select package, Export-Model Fragment, save as file.
2. From menu Import-Model Fragment, select saved file, choose location of package.
All elements have then new guid. Layout and formatting is preserved.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@Michal: Export/Import Model Fragment doesn't work with a single Element.
@Janusz: A new Diagram-function "paste formatting" is exactly what I am looking for. Is it possible to implement this? Can't find anything in the docu how to extend WhiteStarUML by scripting.
Thanks Walter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It looks that "Paste Formatting" can be done. By reusing the copy function as it is and pasting the formatting attributes instead of creating a new view when a target view is selected. Coding it as a script is not easy as you most likely will lack the access to the clipboard but it should be achievable in the program code. I just need to find a suitable way to achieve double dispatch (to copy formatting between views of different types) in Delphi.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Build 5.6.0.1 is now posted in DailiesAndNighties with the Copy/Paste Formatting feature. Due to restrictions of the copy command you cannot copy independent associations but it is possible to paste formatting into them.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Janusz that was fast!
Can't see the new version in the Files/DailiesAndNighties?!
Is it possible to paste the formatting to multiple selected items? That would be great.
Thanks again
Walter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
is the "Paste Formatting" consistent with UM 2.x standard? What would it do to the Classifier - create a new instance, or show the same instance but with different color/fonts, or other? I'm really concerned that we stick to UML standard - we have Visio and Dia for non-standard models.... Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The updated file is WhiteStarUML-5.6.0.1.zip and it is present in Files/DailiesAndNighties. Yes, it is possible to paste formatting to several views at the same time.
Paste Formatting does not introduce anything new to the UML model. It just aggregates already existing functions like "set font" or "set line style" of a view into one batch copying formatting data from another one. You could do all of that with any previous version just by performing all steps manually.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
is there a way to get an independent copy of an element in a diagram?
For instance to preserve all the formatting and just change the name to get a similar looking but independent new element.
Copy/paste should be enabled on most diagrams except the sequence diagram and the similar ones. If on the other hand you think about copying a model represented by a diagram element, select and copy/paste a model in the Model Explorer panel.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
You should use Inheritance (<<Generalization>> or <<Realizes>>) to make a duplicate a Classifier. Copy/Paste does not make a new instance of a Classifier. This is consistent with UML standard and correctly implemented in StarUML...
SARC
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
sorry for bugging, just want to use a Statechart Diagram for documentation purposes. To distinguish system internal states and user-defined states I'd like to format the states (line/fill-color, font...). To preserve the formatting it should be possible to copy/paste the elements as new element for further independent editing.
Thanks for any help or better ideas. Walter
The tricky part is the conceptual separation between the view and the model. The program is generally model centric so if you copy a model no existing views are copied, just a new model appears in the Model Explorer. On the other hand copying a view results in creating a new view with all formatting preserved but connected to the original model.
So there is no a way to clone a model while keeping formatting of its views. Maybe a function "copy/paste formatting" operating on views would help with that problem. Some more investigation would be required to see how it could be done.
If I understand question, I think that this can be done by using Export/Import "Model Fragment".
1. Select package, Export-Model Fragment, save as file.
2. From menu Import-Model Fragment, select saved file, choose location of package.
All elements have then new guid. Layout and formatting is preserved.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
@Michal: Export/Import Model Fragment doesn't work with a single Element.
@Janusz: A new Diagram-function "paste formatting" is exactly what I am looking for. Is it possible to implement this? Can't find anything in the docu how to extend WhiteStarUML by scripting.
Thanks Walter
It looks that "Paste Formatting" can be done. By reusing the copy function as it is and pasting the formatting attributes instead of creating a new view when a target view is selected. Coding it as a script is not easy as you most likely will lack the access to the clipboard but it should be achievable in the program code. I just need to find a suitable way to achieve double dispatch (to copy formatting between views of different types) in Delphi.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thanks Janusz, can you outline how long it will take to implement "Paste Formatting"?
It is in progress now. If no unpredicted problem appears a nightly build should show up before the end of the week.
Build 5.6.0.1 is now posted in DailiesAndNighties with the Copy/Paste Formatting feature. Due to restrictions of the copy command you cannot copy independent associations but it is possible to paste formatting into them.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thanks Janusz that was fast!
Can't see the new version in the Files/DailiesAndNighties?!
Is it possible to paste the formatting to multiple selected items? That would be great.
Thanks again
Walter
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hello,
is the "Paste Formatting" consistent with UM 2.x standard? What would it do to the Classifier - create a new instance, or show the same instance but with different color/fonts, or other? I'm really concerned that we stick to UML standard - we have Visio and Dia for non-standard models.... Thanks!
The updated file is WhiteStarUML-5.6.0.1.zip and it is present in Files/DailiesAndNighties. Yes, it is possible to paste formatting to several views at the same time.
Paste Formatting does not introduce anything new to the UML model. It just aggregates already existing functions like "set font" or "set line style" of a view into one batch copying formatting data from another one. You could do all of that with any previous version just by performing all steps manually.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thanks Janusz, works perfect!
To top it, is it possible to assign a shortcut i.e. Shift+Ctrl+F?
Walter
Looks that shortcut is not conflicting with any present functionality so it should be present in the next release.