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.
1) Create an UML project with a Class Diagram 2) Add a few elements in it 3) Move them around 4) Do a bit of scrolling 5) Close the Diagram 6) Open the Diagram again. The editor view will be at the bottom right of your original viewpoint.
This is a known issue.
*** Issue 98748 has been marked as a duplicate of this issue. ***
This should be a P2 Ease of Use issue. Actually this issue has been fixed and working well in NB 5.5 but it's getting much worse in NB 6.0. I'd call this a regression now compare to NB 5.5 moving to NB 6.0.
Version should be 6.0 now since it no longer exists in NB 5.
*** Issue 86153 has been marked as a duplicate of this issue. ***
see also Issue 86153 with additional steps
Fixed the defect in calculating current view port position when diagram is saved. Now when diagram is reopened, the previous view port is restored, even better than blindly centering the graph.
I'm using the latest NBI build 200704251200 and still see that all 8 different types of diagrams opened all the way to the top-left corner.
How did you test it? If you just open a diagram created in a previous version which had a bug in calculating the view port information, the wrong data from old version saved in the diagram file will be loaded and used to adjust the view port initially, you won't see the fix at this moment. Now try to modify the diagram by moving elements and/or view port followed by saving the diagram, reopen it again to verify the fix. Or simply create a new diagram to start from fresh.
After I installed the new ide with the latest nbi build, I started from fresh userdir. Then, created new uml project and new diagram, saved and closed diagram, and then re-opened the saved diagram. I tried this a few times and for everyone of the 8 different diagram types. I'll try again with tomorrow's nbi build to see if it's still the same for me and let you know.
Ok, here's kind of a consistent reproducible case. Seems like the initially created diagram, regardless of its size: small or big, saving/closing and reopening it would have the issue.
I'm able to reproduce too.
Created attachment 48685 [details] Java sources for Blueprints project (no nb project included)
Ignore the Blueprints attachment. I attached to wrong issue.
Still reproducible on: Product Version: NetBeans IDE Dev (Build 200709150000) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 System: Windows Vista version 6.0 running on x86; Cp1252; en_GB (nb) Userdir: C:\Users\User\.netbeans\dev Every time I reopen the Class Diagram, it shows up on the bottom right corner. On another note, the zoom levels are not restored neither.
The zoom levels are only restored if the diagram is saved after the zoom level is changed. Unfortunately, changing the zoom level doesn't "dirty" the diagram. Maybe this should be a separate issue. But if you just slightly move one of the elements on the diagram, you can force it to go to dirty state so that you can save your changed zoom setting. Still, after saving, closing and opening again, the diagram is shifted up and left off the viewable area. I was able to reproduce this in 5.5.1 as well, so it is not a regression from then.
Seems that anytime the diagram is saved it is enlarging the total size of the diagram by padding some space to the left and bottom of the diagram. I realize this is not new information, but it must be a difference in viewable graph vs. total graph. The challenge is finding where this is happening.
When we store the zoom and the view location in the diagram file what we are really saying is this is the view of the last person that opened the diagram. This distinction is more important when version control is being used. Instead the zoom level, and viewable area should be stored in a users properties. In other words it should be stored in the <project dir>/nbproject/priviate directory. This also fits with the comment that zooming the diagram does not mark the diagram as dirty. We do not want to mark the diagram as dirty when the user is simply looking around the diagram. The user will be asked to save the diagram when they have not actually made any modifications. This use case is a second argument for storing the view properties in a userdir not in the diagram file. With the current implementation our graphing tool is giving us a little grief with opening the diagram to a know zoom and location. Since we are currently working on replacing our graphing package in the next release (the development has already started), and that these properties should be moved to the private user directory, we have decided to do something a little different. When the diagram is opened we are going to zoom it to fit the window. That way it will be easy to navigate to the desired location. In the next version we will add better support for this feature.
verified in instrumented trunk build 200710110401. All diagrams are now opened in fit-to-window. However, the generated report has the smaller size diagrams shrunk to the sizes that are too small to be unreadable, which is tracked in issue 118643. Leaving this one as fixed and perhaps the fix might need to be rolled back if no easy resolution to issue 118643.
verified in trunk build 20071015. issue 118643 has been verified in the same build.
alexlamsl, please try it with the recent builds to see if the automated fit-to-window option works for you. Thanks.