Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 105649 - Rename of local variables doesn't work inside of method with guarded blocks
Rename of local variables doesn't work inside of method with guarded blocks
Status: VERIFIED FIXED
Product: editor
Classification: Unclassified
Component: Refactoring
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Jan Pokorsky
issues@java
:
: 107414 108063 113162 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-04 22:03 UTC by Jana Maleckova
Modified: 2007-08-27 09:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
image documenting problem (61.25 KB, image/png)
2007-06-28 21:29 UTC, belkorin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jana Maleckova 2007-06-04 22:03:32 UTC
Product Version: NetBeans IDE Dev (Build 200706031800) 
Java: 1.6.0_02-ea; Java HotSpot(TM) Client VM 1.6.0_02-ea-b02 
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)

Description:
=============
Have project with form class. Form class contains component and this component
has defined handler for action performed (this method is bounded by guarded blocks)
1. define your local variable (is not in guarded block)
2. use it in handler
3. try to rename this variable
See, variable is not renamed in action method
Comment 1 Tomas Pavek 2007-06-08 11:00:54 UTC
This is inside event handler where only the method boundaries are guarded, but
the code inside the method is not protected. This should be handled by java
refactoring.
Comment 2 Jan Becicka 2007-06-08 13:36:57 UTC
Reassigning to guarded block master.
Detection of guarded block fails in this case.
Comment 3 Jana Maleckova 2007-06-20 12:57:51 UTC
*** Issue 107414 has been marked as a duplicate of this issue. ***
Comment 4 Tomas Pavek 2007-06-26 10:03:17 UTC
*** Issue 108063 has been marked as a duplicate of this issue. ***
Comment 5 belkorin 2007-06-28 21:28:52 UTC
the "find usages" function also thinks that inside of a method bounded by guarded blocks is a read-only block, as shown
in the attachment.

Product Version: NetBeans IDE Dev (Build 200706270000) 
Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 6 belkorin 2007-06-28 21:29:36 UTC
Created attachment 44552 [details]
image documenting problem
Comment 7 Max Sauer 2007-07-17 10:55:54 UTC
This error can be easily reproduced also when using 'Change method parameters' for a method defined inside form file,
and having this method called inside of a 'guarded' method.
---
Product Version: NetBeans IDE Dev (Build 070717) 
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05 
System: Linux version 2.6.12-1.1390_FC4smp running on i386; 
UTF-8; en_US (nb) Userdir: /home/ms159439/.netbeans/dev
Comment 8 Jan Pokorsky 2007-07-25 14:56:12 UTC
fixed in

/cvs/refactoring/api/src/org/netbeans/modules/refactoring/spi/RefactoringElementsBag.java
new revision: 1.17; previous revision: 1.16
Comment 9 Jiri Prox 2007-08-02 12:57:53 UTC
v.
Comment 10 Tomas Pavek 2007-08-27 09:19:21 UTC
*** Issue 113162 has been marked as a duplicate of this issue. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo