This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 137642 - Add ability to copy UML sequence diagram
Summary: Add ability to copy UML sequence diagram
Status: RESOLVED DUPLICATE of bug 110073
Alias: None
Product: uml
Classification: Unclassified
Component: Diagram Sequence (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P2 blocker (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-18 23:03 UTC by moilejter
Modified: 2008-07-14 21:01 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Perl script to copy a sequence diagram (2.29 KB, text/plain)
2008-06-19 23:40 UTC, moilejter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description moilejter 2008-06-18 23:03:24 UTC
I cannot seem to create a new sequence diagram that is a copy of an existing one, in a netBeans 6.1 UML prpoject.
I've tried:
- copy the diagram node in the project view
- select all in the first sequence diagram, Edit->Copy, then in the new diagran, Edit->Paste
- select all items that are children of the first sequence diagram node, in the project view, then Edit->Copy, then try
Edit->Paste inside the node for the second sequence diagram...

Sometimes, the Paste option in the main menu is enabled, but it doesn't seem to do anything.  The Paste option in the
context menu (right-click) in the sequence diagram is never enabled in these, and the project pane does not seem to have
a copy option in its context menu for sequence diagrams.

Moises
Comment 1 moilejter 2008-06-19 23:40:43 UTC
Created attachment 63138 [details]
Perl script to copy a sequence diagram
Comment 2 moilejter 2008-06-19 23:46:24 UTC
I just attached a Perl script that seems to do (most of) what I wanted (copy a sequence diagram).
It requires that one have a project that has (a) an existing sequence diagram to copy, and (b) a new empty sequence
diagram that will become a copy of the first.  The two parameters to the script are the names of the two sets of files
(etlp and etld) without the extensions - the first parameter is the file name for the two files that represent the
existing complete diagram, and the second parameter is the file name for the two files that represent the initially
empty destination diagram.

It'd be great if someone who understands the representation used by Netbeans could take a look, and let me know if there
are any other changes that would make this copy a little more robust... I did not know what the numeric encoding on file
names means, which is why I set it up so that the target diagram has to be created first, as an empty one. And I noticed
that, once the script is run and Netbeans opens the project, some changes to one of the two diagrams mark both as
changed - even the change to the second diagram did not seem to change anything in the first one...
Comment 3 Yang Su 2008-06-20 00:14:32 UTC
That's pretty much the same logic in 'Save As' action, this functionality was taken out for sequence diagram and
collaboration diagram, see issue 102294.
Comment 4 moilejter 2008-06-20 16:40:05 UTC
I am happy to list this as a duplicate of issue 110073 - which I am requesting include the ability to copy the diagram,
too.  Chances are that, if I am copying an interaction, the new interaction will be modeled after the original once -
hence the copy.  In that case, it seems silly to have the user redraw the initial diagram from scratch...

*** This issue has been marked as a duplicate of 110073 ***