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.
I had an existing activity diagram. Created a brand new one. Wanted to copy all the items from the original diagram into the new one. Selected original diagram, Ctrl+A to select all items, copy. Went to new blank diagram, Ctrl+V to paste...all items were pasted, but they were horribly misplaced and mangled compared to the original diagram. Please see attachments for original diagram and the copied version.
Created attachment 33410 [details] original diagram
Created attachment 33411 [details] Copied diagram
consider loss of data - let say copying a big diagram which user manually did the layout so the result of the copy and paste to a new diagram is lost.
The cross-diagram-paste function does not work at all (i.e. nothing is pasted) in the latest daily build, which is the side effect of the fix for the issue 92846. I'm working to restore the paste function and will address this issue next.
Fixed to retain the size of the copied nodes and the bend points of the edges when copying the graph to the new diagram.
Created attachment 38077 [details] original class diagram
Created attachment 38078 [details] copied/pasted class diagram
Created attachment 38079 [details] original activity diagram
Created attachment 38080 [details] copied/pasted activity diagram
the fix does make the copied/pasted diagram looks better, especially the activity diagram as indicated in the attachements (original activity diagram & copied/pasted activity diagram). However, trying the same for the class diagram still looks screwed up as shown in attachements (original class diagram & copied/pasted class diagram). Have not tried with all different diagram types yet. Re-opening the issue.
Created attachment 38136 [details] original activity diagram
Created attachment 38137 [details] copy/paste activity diagram
Created attachment 38138 [details] copy/paste activity diagram
just attached another 2 snapshots showing the original and copied/pasted activity diagram that contains the Partition elements which was not copied/pasted properly to the new diagram.
Fine-tunned the code some more to keep the size, the shape and the position of most of modeling elements the same as those on the source diagram. There's still some minor issues with a certain element, e.g, the width of the left partition of a Partition element takes up the entire width of the node when the element being pasted. For those minor issue, the workaround is manually adjusting the position of the element.
Wouldn't it be possible to fix that as well as part of this defect? Seems incomplete if there are still any issues left with the paste functionality. Thank you
Yes, I agree. This is not an easy fix and I think it is too risky to get into the detail here for the Customer Acceptance (CA) release. However, the fix so far is a lot better than before but I'll re-open this and putting a waiver request for the CA release. Hopefully it can be fixed for the FCS release.
Targeted in the drawing area redesign.
REstoring the original priority and using the NB 6.0 waiver process.
Diagram area bugs waived for 6.0 will also be waived for 6.1.
Still exists in 6.5
Removing obsolete assignments. Bugs will be reassigned for M2.
initial case with ctrl-a (i.e. copy-paste of all elements) have easy alternative, save as for a diagram.
I was not able to reproduce the original problem with 6.5. Therefore I am going to close this issue. However when I was testing peters last use case with the partitions I noticed that the diagram was really messed up after copy and past. However this issue is covered by the issue 143108.
While the original problem is fixed in 6.5, this issue is being used as an umbrella bug. The following issues still need to be fixed. 1. copy paste node with label didn't work, I checked in the implementation this week, didn't file a new issue though, I thought we had enough 2. copy paste connection with label does not work, (neither label visibility nor location was thought of, not to mention the color) 3. view info ( iconic vs. standard ) is not preserved (137774 outstanding blocking issue as shown on dependency tree) 4. copy pasting package with contained class only yields package alone, same problem with activity group 5. widget with collapsible compartments is not pasted with the show/hide state in mind 6. movable compartment size info is not preserved, neither is contained element location, size, color or anything 7. copy/pasting parameter usage results in altered multiline label format 8. pasted use case does not even have the same size, not to mention the hide/show extension state 9. copy/pasting lifelines with messages does not work
With implementation of cloning the connection widget and fix to #1, #4, #5, #6, #7 and #8, the major issues in copy/paste this one can be verified now. The remaining issues (e.g. #2 edge label and #9 lifeline) are either trivial or should be tracked separately with appropriate priority.
Verified in build 20080902. Just tried something similar to the original activity diagram. On the first paste of a copied activity diagram by left clicking on an empty diagram area on a new activity diagram to paste, the following exception popped up (see attached ide log file for complete exception), but not sure if it's a result of the fix. Tried to paste again with Ctrl+V but nothing seems to be in the buffer at this time. So, copied again and pasted again. The diagram does look better but not exactly as the original. See attached screenshots. java.lang.AssertionError at org.netbeans.modules.uml.drawingarea.actions.SceneAcceptProvider.isContained(SceneAcceptProvider.java:667) at org.netbeans.modules.uml.drawingarea.actions.SceneAcceptProvider.accept(SceneAcceptProvider.java:250) at org.netbeans.modules.uml.drawingarea.actions.SceneAcceptProvider.accept(SceneAcceptProvider.java:205) at org.netbeans.modules.uml.drawingarea.actions.DiagramSceneAcceptAction.mouseClicked(DiagramSceneAcceptAction.java:78) at org.netbeans.api.visual.action.WidgetAction$Chain.mouseClicked(WidgetAction.java:752)
Created attachment 68907 [details] ide log file
Created attachment 68908 [details] screenshot of copy and paste diagram
fixed recent regression on copy/paste edges with bending points changeset d2b0a1979f92 in uml-main details: http://hg.netbeans.org/uml-main?cmd=changeset;node=d2b0a1979f92 copy/paste edge label is tracked in issue 143102
Reviewed