| Summary: | Content assist doesn't work on some anonymous inner classes when there are a lot of them. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Missing name <gouseinov> | ||||
| Component: | Core | Assignee: | Ayushman Jain <amj87.iitr> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | 8forty, anchakrk, daniel_megert, horia.muntean, mario.pierro, mauromol, remy.suen, srikanth_sankaran, stephan.herrmann, tbee | ||||
| Version: | 3.8 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
|
Description
Missing name
Anonymous inner classes. Gasan, it would greatly help if you can give some more information about those anonymous classes where content assist doesn't work. (It is certainly not a matter of the number of inner classes :) ) Some questions: Do you have compile errors in your code when you hit Ctrl-space? Can you see a correlation between the super type of your anonymous classes and on which of them content assist is broken? Does the bug occur in specific control structures, e.g., if the anonymous class is created inside a loop or a try-catch etc.? Where exactly do you invoke content assist? Inside a method of the anonymous class or in the body of the class (as to create a new method override)? Ideally, you might strip down your example to a test case that you can attach to this bug. Stephan,
1. Do you have compile errors in your code when you hit Ctrl-space?
-No, I don't
2. Can you see a correlation between the super type of your anonymous
classes and on which of them content assist is broken?
-There are 3 types of supertypes of anonymous classes and for 1 specified superclass some anonymous classes are working and some don't.
3. Does the bug occur in specific control structures, e.g., if the
anonymous class is created inside a loop or a try-catch etc.?
-All classes are constructed inside method call: foo(new Parent("param"){}); foo(new
AnotherParent("param"){}); etc.
4. Where exactly do you invoke content assist? Inside a method of
the anonymous class or in the body of the class (as to create
a new method override)?
-Content assist doesn't work both inside methods of anonymous class and it's body, e.g. if I try to add a field to that anonymous class and write: public String foo = "asdf" then dot (.) then press ctrl+space(content assist), it doesn't show anything.
As for sample, I'll try to do that lately.
Thanks, Gasan, for your replies. Unfortunately this doesn't yet give a clue why in some locations content assist does not work. If you find anything that distinguishes the broken locations please let us know. (In reply to comment #3) > As for sample, I'll try to do that lately. Yes, please. At this point this may be the only way how we can reproduce (and fix) the problem. See also bug 306908, bug 311356, bug 318192, bug 336620. I not sure if it's related to this but I can always reproduce the following: If one has an array of anonymous inner classes with more that one item then CC breaks. If the array has only one item, the CC works fine. See the attached print screen where CTRL+SPACE at line 12 yields only templates. Created attachment 209710 [details]
code assist broken with array of AIC
Forgot to mention context: Version: Indigo Service Release 1 Build id: 20110916-0149 Win7 64-bit Maybe I should open a new issue? I've got a simple case where this code completion is not working; a AIC provided as a argument to a constructor of another AIC. http://www.eclipse.org/forums/index.php?t=rview&goto=870951#msg_870951 (In reply to comment #9) > I've got a simple case where this code completion is not working; a AIC > provided as a argument to a constructor of another AIC. > > http://www.eclipse.org/forums/index.php?t=rview&goto=870951#msg_870951 Thanks for the test case. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |