Menu

independent copy of diagram elements

Anonymous
2014-12-19
2015-01-20
  • Anonymous

    Anonymous - 2014-12-19

    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.

     
  • Janusz Szpilewski

    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.

     
  • Anonymous

    Anonymous - 2014-12-23

    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

     
  • Anonymous

    Anonymous - 2015-01-12

    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

     
  • Janusz Szpilewski

    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.

     
  • Michal

    Michal - 2015-01-13

    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.

     
  • Anonymous

    Anonymous - 2015-01-13

    @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

     
  • Janusz Szpilewski

    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.

     
  • Anonymous

    Anonymous - 2015-01-14

    Thanks Janusz, can you outline how long it will take to implement "Paste Formatting"?

     
  • Janusz Szpilewski

    It is in progress now. If no unpredicted problem appears a nightly build should show up before the end of the week.

     
  • Janusz Szpilewski

    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.

     
  • Anonymous

    Anonymous - 2015-01-16

    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

     
  • Anonymous

    Anonymous - 2015-01-16

    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!

     
  • Janusz Szpilewski

    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.

     
  • Anonymous

    Anonymous - 2015-01-19

    Thanks Janusz, works perfect!
    To top it, is it possible to assign a shortcut i.e. Shift+Ctrl+F?
    Walter

     
  • Janusz Szpilewski

    Looks that shortcut is not conflicting with any present functionality so it should be present in the next release.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.