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.
Hello, Today I refactored all my packages in the project (almost 10 packages) and removed a prefix of all packages (i.e converted my.usm.cs.crowdsim.mabs, my.usm.cs.crowdsim.micromodel, .... -> crowdsim.mabs, crowdsim.micromodel, ...). This resulted into incorrect code (mostly caused by incorrect updated package imports). I needed to manually fix things (took 20 minutes to fix 40-50 files). I think this is serious issue so I am choosing P1.
Please attach your messages.log, thanks.
I had submited this almost 3 weeks ago and since then because netbeans had too much bugs (and I was not able to use it for serious work) I removed it totally. I do not have any files from it but it should be easy to reproduce such a thing.
Jirko, please test it. Thanks.
dup. of #122295 ?, without log we can do almost nothing ;(
Ok, I reinstall NB 6.0 and try to the same refactors and if it happens again I will submit the log. (Or I'd rather do it with my current nightly NB 6.1 version?)
I've tested it with 6.0 and the only issue I've found is issue 122295, which should be fixed now in daily 6.1. The result of the bug was broken sig files, so I've had to delete ${userdir}/var/cache/index to fully recover from it. Let's wait for the log, to see if there is another problem.
I installed NB6.0 and tried to refactor package names again and the same thing happens. The problem happens because NB updates imported packages lists incorrectly. (This time I tried to add a prefix to package names and the same problem happened). Please pay attention that unlike "issue 122295" this one does not crash NB, it just causes errors in code. I want to give you the project but I cannot post it here. To whom should I email the project? jbecicka@netbeans.org or jiriprox@netbeans.org ?
You can send it to me, thanks. I just want to mention that issue 122295 does not crash whole IDE, only exception is throw a the sig files were broken, which can cause nonsense error or other improper java editor behavior.
I also want to remind, that issue 122295 is not fixed in 6.0, but in 6.1M1.
I've seen this in 6.1 a well. I've used provided project, but I cannot find the reliable steps, it's happening only something. In my case it looks like that after refactoring is performed the editor shows dialog that file was changed externally and if I chose "Reload" there is not updated package statement. Maybe this can be caused by bad project configuration when source package are located directly in project folder, not in its subfolder. I'll do further investigation. Downgrading to P2 since the unusual project configuration.
I moved the source files to an src sub-folder (it was that way because I had imported it from eclipse). Even with sources inside src folder the problem can be reproduced. Though it seems the problem depends on the order of refactors (.i.e start from internal package directories or from outer or mixed)
Have you used refactoring undo feature during the modification? I've found testcase which is reproducible, if there is use d undo during the renaming (seems that metadata are not updated correctly when performing undo and next refactoring will fail)
No, I have not used undo. I will also try to see if it has any effect.
Probably dupe of issue 125105
Probably not reproducible after fix of issue 125105
Is this included in daily build? (If so I can test to see if it is reproducible)
Yes. Please test it in daily build. Thanks
Any progress? Still reproducible? Thanks
Sorry for the delay. It happens less now. (Previous time I refactored 10 packages and at least 4-5 packages had problem, this time only one of them had problem). Another new problem is now introduced. If you have : mainpack mainpack.something mainpack.something1 mainpack.something2.more mainpack.something2.more1 ... If you start refactoring from inner packages upward (for example add a com.test prefix) you will have problem refactoring "mainpack" itself. It will say com.test.mainpack already exists (while it is not, only subpackages of it exis , not itself).
can you provide the project once more time, please? I've tested it again with that one, you've send me some time ago, and I all worked for me (except the already existing package issue, of course). But I had to change project configuration before testing, since, there was absolute path. Maybe it had some impact of reproducibility of this issue.
Please provide your project or steps to reproduce. Problem with "package already exists" is already reproted (issue 99570). Let's focus on original issue.
Sent to jiriprox@netbeans.org The problem happens when you refactor one of the packages (there are less than 10).
Sorry we cannot reproduce it after fix of 125105
Had the same problem, I will attach my IDE log. I was executing TS_61_FormRefactoring "Rename a Package" (1). Some of the packages were not renamed in the source, or - if I tried again with a new project - they were renamed, but there were "error badges" in the Project window while there were no errors in the code (wrong refresh of the Project view after the refactoring?).
Product Version: NetBeans IDE Dev (Build 200803170003) Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 System: Linux version 2.6.24-12-generic running on i386; UTF-8; en_US (nb) Ide log and screenshot: http://www.netbeans.org/nonav/issues/showattachment.cgi/58492/idelog.txt http://www.netbeans.org/nonav/issues/showattachment.cgi/58493/screenshot.png
Note: To reproduce the issue, it seems to be sufficient to use refactor/rename twice on the source package that was generated in Java Desktop Application by default.
Well, maybe just more thing (as I paid more attention to this issue - see the screenshot). The funny thing about the screnshot is that the code is actually correct. It just remains underlined and with an error icons in the gutter - so my desc. is probably more for the "editor". If you delete the last "p" in DesktopApp and write it back, the error messages disappears.
moving opened issues from TM <= 6.1 to TM=Dev
Worksforme. Probably fixed with other issues (125105)