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 205332

Summary: refactor move on jpanel gives error popup but succeeds
Product: guibuilder Reporter: monezz <monezz>
Component: CodeAssignee: issues@guibuilder <issues>
Status: REOPENED ---    
Severity: normal CC: MackSix
Priority: P3    
Version: 7.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Refactor move jpanel error
externally modified warning jframe
log file
Project to use for reproduction.

Description monezz 2011-11-20 21:18:06 UTC
[ BUILD # : 201111171527 ]
[ JDK VERSION : 1.6.27 ]

http://wiki.netbeans.org/TS_68_FormAndSupportSanity#Test_suite:_Refactoring

- Create new java application with a Jpanel MyPanel and a jframe MyViewRenamed
in package mydata
- Create new package "aa.bb" in MyApplication
- Right-click into the Projects window and select 'View Java Packages as >
Tree'
- Select 'MyViewRenamed.java' and 'MyPanel.java' in the 'mydata' package (Use
Ctrl-click or Shift-click)
- Drag both files into 'aa' package and confirm Refactoring dialog
- Drag the 'MyPanel.java' into 'bb' package and confirm Refactoring dialog

EXPECTED RESULT: Files are moved successfully. Form can be compiled and opened
in editor.

ACTUAL RESULT: Error window pops up when confirming the refactoring containing
mydata.MyPanel

moving the jpanel and the jframe from aa to aa.bb and back will give
consistently the same error on the jpanel. The jframe move gives a externally
modified warning when it is move from aa to aa.bb after the jpanel.

The refactoring seem the be successfull, form and java files are moved.
Comment 1 monezz 2011-11-20 21:19:22 UTC
Created attachment 113350 [details]
Refactor move jpanel error
Comment 2 monezz 2011-11-20 21:19:51 UTC
Created attachment 113351 [details]
externally modified warning jframe
Comment 3 Jan Stola 2011-11-22 10:20:40 UTC

*** This bug has been marked as a duplicate of bug 203477 ***
Comment 4 monezz 2011-12-07 11:12:55 UTC
I can reproduce this issue on 7.1 RC2.
Comment 5 MackSix 2012-05-16 09:10:52 UTC
Created attachment 119509 [details]
log file

I see an Exception dialog pop up and go away real fast moving the files back and forth. I attached the message log that shows the exception. The JFrames package declaration stops updating when moved, but it is moved anyway.

Then Undo does not work and gives an error that the JFrame file can't be found.

Product Version: NetBeans IDE Dev (Build 201205140400)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)

This is caused by moving the files back and forth and it related: http://netbeans.org/bugzilla/show_bug.cgi?id=212567

I think this is related some how: http://netbeans.org/bugzilla/show_bug.cgi?id=212129
Comment 6 MackSix 2012-05-16 09:14:10 UTC
Created attachment 119510 [details]
Project to use for reproduction.

I just moved both files into aa then into aa.bb back and forth as a pair while refactoring until I saw the barely visible exception dialog box. See attached project.