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 3549 - [completion]"this." bad result for innerclasses
Summary: [completion]"this." bad result for innerclasses
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: -S1S-
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Martin Roskanin
URL:
Keywords:
: 15465 20530 42071 52173 53145 61315 64537 69908 79451 84881 87230 (view as bug list)
Depends on: 17825 42068
Blocks:
  Show dependency tree
 
Reported: 1999-08-23 20:41 UTC by pzajac
Modified: 2007-11-05 13:38 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 1999-08-23 20:41:42 UTC
[pz] Code completion uses bad class for  this. in innert classes.
example :
class a {
 int hello () {
    Runnable r = new Runnable () {
      void run () {
         this.   // shows methods of class a
....
Comment 1 Jan Lahoda 2001-01-24 15:36:59 UTC
Only changed version to Development.
Comment 2 Jan Chalupa 2001-03-12 10:35:51 UTC
Version: 'Dev' -> 3.2
Comment 3 Martin Roskanin 2001-04-09 09:10:37 UTC
We are not able to parse anonymous inner classes yet. I propose to change this 
bug to enhancement in java module.
Comment 4 Svata Dedic 2001-04-09 10:01:48 UTC
The current parser does not inspect local classes (mainly for performance
reasons) - this is as desinged. However, it is a welcome enhancement to the next
NB version.
Comment 5 Jan Chalupa 2001-05-05 23:20:11 UTC
Target milestone -> 3.3
Comment 6 Martin Roskanin 2001-09-14 08:25:37 UTC
*** Issue 15465 has been marked as a duplicate of this issue. ***
Comment 7 Jan Chalupa 2001-11-27 12:49:37 UTC
Target milestone -> 3.3.1.
Comment 8 Martin Roskanin 2002-02-14 15:09:49 UTC
*** Issue 20530 has been marked as a duplicate of this issue. ***
Comment 9 Svata Dedic 2002-05-21 17:49:10 UTC
Cleaning up before 4.0 planning
Comment 10 Marek Grummich 2002-07-19 21:04:33 UTC
Target milestone was changed from 'not determined' to TBD.
Comment 11 pzajac 2002-10-17 12:03:58 UTC
Changed to defect. This enhanced was created in 1999-08-23.  
Comment 12 Martin Roskanin 2002-10-17 14:30:04 UTC
Can you explain this? I think it is valid enhancement for java module.
Comment 13 pzajac 2002-10-17 14:37:42 UTC
Ok,  mistake. This is defect of java. 
Comment 14 ehucka 2002-11-04 13:10:06 UTC
Better, you should report an enhancement to Java modul, this issue
leave in editor and it sets as depends on the Java enhancement.
Comment 15 Martin Roskanin 2003-01-06 09:21:49 UTC
This issue depends on the issue #17825. Resolving as LATER.
Comment 16 pzajac 2003-01-06 09:35:54 UTC
If the issue depends on other issue it isn't necessary to change state
to "RESOLVED LATER".
 
Comment 17 Martin Roskanin 2003-01-07 15:10:29 UTC
OK ;-)
I just thought that, it would be better to hide this bug from standard
query results, because it certainly will not be fixed soon.
And as the LATER definition says:
 "The problem described is a bug which will not be fixed in this
version of the product."
I thought it was the best resolution at the present time.

Comment 18 Martin Roskanin 2003-02-27 14:47:17 UTC
Changing the target milestone to FUTURE as it is not clear when the
issue #17825 will be implemented
Comment 19 Miloslav Metelka 2004-01-23 11:06:52 UTC
Assigning to Mato as he will likely work on this later.
Comment 20 psuk 2004-03-23 17:50:36 UTC
Changing subcomponent to code completion
Comment 21 Martin Roskanin 2004-05-07 09:59:06 UTC
*** Issue 42071 has been marked as a duplicate of this issue. ***
Comment 22 Martin Roskanin 2004-05-07 13:01:47 UTC
Making dependency on JMI based completion task. After integration with
MDR, we will be able to fix this problem
Comment 23 Miloslav Metelka 2004-08-09 10:51:56 UTC
Unfortunately we will likely not be able to resolve this into promoD :(
For performance reasons we are still required to use our existing
simple parser that is not able to properly resolve the context of
anonymous innerclasses. I hope that we will be able to address this
issue soon as it's a long-standing annoying problem.
Comment 24 ejroberts 2004-09-02 18:00:40 UTC
I am experiencing this as well - though not in inner classes. If I 
initiate code assist on a line within one of my class's methods 
expecting to see methods for the relevant object's class, the code 
assist window references "this" as the name of the first argument in 
each method entry. The process appears to be shifting the argument 
names along one in order to insert "this" at the start.
Comment 25 Dusan Balek 2004-12-10 18:13:36 UTC
*** Issue 52173 has been marked as a duplicate of this issue. ***
Comment 26 Dusan Balek 2005-01-10 09:12:11 UTC
*** Issue 53145 has been marked as a duplicate of this issue. ***
Comment 27 _ gtzabari 2005-01-10 14:45:37 UTC
Any update on this issue as of Netbeans 4.1? If this issue depends
upon the performance of the new parser, shouldn't we open an issue
against the performance problem and make this issue depend upon it?
Comment 28 Roman Strobl 2005-07-09 07:22:57 UTC
No, opening an issue against performance of current infrastructure won't solve
this issue. AFAIK this issue requires rewrite of java infrastructure which will
be done after 4.2. Then the issue can be resolved.
Comment 29 Roman Strobl 2005-07-25 09:49:27 UTC
*** Issue 61315 has been marked as a duplicate of this issue. ***
Comment 30 athompson 2005-07-25 12:38:41 UTC
i don't think Issue 61315 is quite the same. furthermore, i'm not sure this is
valid, since you're supposed to explicitly specify 'Runnable.this'.
Comment 31 athompson 2005-07-25 12:38:57 UTC
i don't think Issue 61315 is quite the same. furthermore, i'm not sure this is
valid, since you're supposed to explicitly specify 'Runnable.this'.
Comment 32 Roman Strobl 2005-07-25 12:41:14 UTC
The problem is the same - current infrastructure for code completion doesn't
recognize anonymous inner classes. Feel free to reopen the issue 61315, it's
true that it's not completely the same issue.
Comment 33 Dusan Balek 2005-10-21 15:48:18 UTC
*** Issue 64537 has been marked as a duplicate of this issue. ***
Comment 34 Dusan Balek 2005-12-06 08:12:01 UTC
*** Issue 69908 has been marked as a duplicate of this issue. ***
Comment 35 Jiri Prox 2006-06-30 09:09:00 UTC
*** Issue 79451 has been marked as a duplicate of this issue. ***
Comment 36 _ gtzabari 2006-06-30 14:42:12 UTC
Just food for thought, all the issues this dependant on are now implemented so
it should be technically possible to solve this issue. Can you please assign it
a Target Milestone?
Comment 37 Jiri Prox 2006-09-14 13:22:49 UTC
*** Issue 84881 has been marked as a duplicate of this issue. ***
Comment 38 Miloslav Metelka 2006-10-03 16:27:31 UTC
This will DEFINITELY be fixed for all the cases including

new Cls() { }.|

etc. in NB6.0. Marking TM to Dev.
Comment 39 Jiri Prox 2006-10-17 10:04:29 UTC
*** Issue 87230 has been marked as a duplicate of this issue. ***
Comment 40 Tim Lebedkov 2006-10-17 14:46:57 UTC
This is the oldest issue I have ever seen!
Wow!
Why don't you leave it unfixed till 7.0 (or even better forever) :-)?
And such a magically small number! 3549!
lol
Comment 41 Dusan Balek 2006-10-26 09:48:13 UTC
Fixed with the new Java language infrastructure recently merged to trunk.
Comment 42 athompson 2006-10-28 14:18:27 UTC
'this.' still shows methods for class 'a'.  additionally, CC shows completions
for 'Runnable.this' when it should not because 'Runnable' is the extended class,
not the enclosing class.

using 'a.this.' does work properly, however.
Comment 43 Dusan Balek 2006-10-30 09:10:56 UTC
I really cannot reproduce the issue in the latest dev build (NetBeans IDE Dev
Build 061030). Could you please tell me your build number? Make sure it is not
older than 061025 when the new Java language infrastructure was merged to trunk.
Comment 44 Jiri Prox 2006-11-02 09:40:56 UTC
Cannot reproduce either. Please provide the exact build number.

NetBeans IDE Dev (Build 061102)
1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b100
Windows XP version 5.1 running on x86
en_US (nb); Cp1252
Comment 45 athompson 2006-11-07 02:44:23 UTC
where are you guys getting newer builds?  according to the web site the most
recent build is 10/23.
Comment 46 Jiri Prox 2006-11-07 08:59:10 UTC
You're right the daily builds are temporarily not published. But you can produce
your own build from the trunk branch. Just do cvs checkout and build.
Comment 47 athompson 2006-11-12 06:42:07 UTC
yup, my mistake.  new stuff works good!  if you're in the Baltimore/Washington
area, beers are on me!
Comment 48 athompson 2006-11-12 06:43:45 UTC
am i allowed to verify this?  well, here goes...