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.
Summary: | Refactoring fails if there's no space after initComponents() and variable declarations section | ||
---|---|---|---|
Product: | java | Reporter: | roger_rf <roger_rf> |
Component: | Source | Assignee: | Rastislav Komara <moonko> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | ||
Priority: | P4 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
roger_rf
2007-10-24 20:49:02 UTC
Please attach messages.log I can reproduce it as well. Message.log does not contain any exception. I'd say it's caused by the guarded blocks Product Version: NetBeans IDE Dev (Build 20071024093841) Java: 1.6.0_03-ea; Java HotSpot(TM) Client VM 1.6.0_03-ea-b01 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb) There are 2 issues here. 1. Refactoring UI does not warn, if it is not possible to perform refactoring due to read only files or read only parts. This is duplicate of issue 57518. 2. Java/source tries to insert code into guarded block, although it is possible to generate code into non-guarded parts. It's like jiriprox said, messages.log doesn't contain any exception. I can attach it if you think it's really necessary. Reproducible in current trunk build. Generator test-case. It works, not sure what is wrong. Manually still reproducible. IDE:------------------------------------------------- IDE: [11/1/07 12:27 PM] Committing "GuardedBlockTest.java" started Checking in GuardedBlockTest.java; /cvs/java/source/test/unit/src/org/netbeans/api/java/source/gen/GuardedBlockTest.java,v <-- GuardedBlockTest.java new revision: 1.11; previous revision: 1.10 done IDE: [11/1/07 12:27 PM] Committing "GuardedBlockTest.java" finished I've tested it more and I cannot reproduce GuardedException, but refactoring still does not work. Honza mentioned there are two problems, reassigning back to get further evaluation from refactoring guys. Sorry Pavel, but I think that the problem is that the codegen still does not place the code at a perfect place - it tries to insert the getter and setter at the very beginning of the first guarded line of variables, which cannot be done. The reason why the exception does not appear seems to be that the Refactoring itself excludes modifications that would throw the exception. This usecase seems a bit artificial to me (as long as it works OK with at least one empty line) -> P4. Yes, that is something what comes to my mind too. I just went through it, but I tried to override method (suggested by
code-completion) at the same position and it worked correctly. Moreover, similar test passes.
> The reason why the exception does not appear seems to be that the Refactoring itself excludes modifications that would
> throw the exception.
If this is true, then you made the evaluation for refactoring guys and there is some difference in my test and in
code-completion example, which has to be investigated.
Overtake. Resolving all issues with milestone "future" as LATER. If you feel strongly that it should be implemented please reopen and set the target milestone to "next". NetBeans.org Migration: changing resolution from LATER to WONTFIX |