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 211240 - Navigator: After rename a JLable/JTextField the Menu is collapsed
Summary: Navigator: After rename a JLable/JTextField the Menu is collapsed
Status: RESOLVED WONTFIX
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1.2
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 208066 212503 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-16 10:07 UTC by stefan79
Modified: 2012-05-30 01:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
I have recorded a sreenvideo (2.55 MB, video/x-ms-wmv)
2012-04-16 13:14 UTC, stefan79
Details
This project works as expected (JPanel isn´t collapsed). (12.36 KB, application/octet-stream)
2012-04-17 11:33 UTC, stefan79
Details
At this project the JPanel is always collapsed. (13.06 KB, application/octet-stream)
2012-04-17 11:34 UTC, stefan79
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefan79 2012-04-16 10:07:41 UTC
Test following:
-) Create a new JPanel
-) Add a JTextField
-) Rename the JTextField1 to JTextFieldX (at Navigator)
   -> JPanel is collapsed
Comment 1 Jan Stola 2012-04-16 12:39:02 UTC
I tried to create a new JPanel form, insert JTextField, select jTextField1 in Navigator, invoke Change Variable Name action, enter 'jTextFieldx', press OK, but I don't see anything suspicious/collapsed.

Could you, please, provide more details. It would help to emphasize the difference between the actual and expected behavior and maybe even attach a screenshot showing the problem. Thank you in advance.
Comment 2 stefan79 2012-04-16 13:14:03 UTC
Created attachment 118334 [details]
I have recorded a sreenvideo
Comment 3 Jan Stola 2012-04-16 13:45:47 UTC
Thank you for the video. Now I can see what happens on your machine. Unfortunately, I am still not able to reproduce this behavior on my machine. Does it happen every time you try it or sometimes only (it may be some race condition)?

The severity of this issue seems to be pretty slow, but if you think that it is worth the effort, you may try to figure out more about when exactly it happens: JDK 6 versus JDK 7, various look and feels, NB builds, etc. I am not able to do anything until I am able to reproduce this problem locally and this kind of information may help me in reproduction.
Comment 4 stefan79 2012-04-16 13:57:51 UTC
(In reply to comment #3)
> Thank you for the video. Now I can see what happens on your machine.

I use JDK1.7u3 on Win7x64 and the NB7.1.2 Version:

Product Version: NetBeans IDE 7.1.2 (Build 201204101705)
Java: 1.7.0_03; Java HotSpot(TM) 64-Bit Server VM 22.1-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb)

> Does it happen every time you try it or sometimes only (it may be some race
condition)?
It´s always reproduceable.

I´ve also tried JDK1.6u31 -> Same result.
Comment 5 Jan Stola 2012-04-16 16:39:52 UTC
*** Bug 208066 has been marked as a duplicate of this bug. ***
Comment 6 stefan79 2012-04-17 07:56:17 UTC
Very strange:
I´ve changed my User-Dir to a non existing directory and then it worked.
Then I change every setting at Options/Miscellaneous/GUI-Builder to the same options (as my default-config) and it worked still as expected.

What can I check else?
Comment 7 Tomas Pavek 2012-04-17 10:00:33 UTC
Can you still reproduce it with your original user dir? If yes, than make a back up of it, and start experimenting with deleting parts of it. Do it always when the IDE is shut down, then start it again.

First you may try to delete dirs under 'config', e.g. 'preferences'. This way you can find out if some IDE setting influences the wrong behavior. If it is the case, there is a chance someone else can reproduce it and fix.

Also try to delete the entire 'var' directory under the user dir. If this has an effect, then it means the cause is in some cached data. In such case the chance to diagnose which cache is broken and why is rather low, I'm afraid.
Comment 8 stefan79 2012-04-17 11:32:37 UTC
It´s a problem of the project.
I´ll upload the two projects.
Comment 9 stefan79 2012-04-17 11:33:08 UTC
Created attachment 118394 [details]
This project works as expected (JPanel isn´t collapsed).
Comment 10 stefan79 2012-04-17 11:34:14 UTC
Created attachment 118395 [details]
At this project the JPanel is always collapsed.
Comment 11 Jan Stola 2012-04-17 13:23:37 UTC
Thank you for the additional information. I am able to reproduce this issue now. In fact, this behavior is not project-related. The important aspect is whether the renamed component is private or protected. When the corresponding field is protected then GUI Builder starts the refactoring infrastructure and reloads the form once the refactoring is finished.

There is no way to keep the set of expanded/collapsed branched in Navigator when the form is reloaded (i.e., closed and reopened). Hence, the only way to fix this issue is avoidance of the reload. Unfortunately, we cannot skip reload in general. It is important for many refactorings. We may try to identify some cases when the reload is not necessary but it is probably not worth the effort (it is error-prone and the benefit is not worth the risk).
Comment 12 Tomas Pavek 2012-05-29 16:22:49 UTC
*** Bug 212503 has been marked as a duplicate of this bug. ***
Comment 13 richwilsonaus 2012-05-30 01:32:18 UTC
Resolved? Won't fix? How ridicuolous!