Summary: | [javadoc][assist] Errors in org.eclipse.jdt.ui.JavaTypeCompletionProposalComputer | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Max Gilead <max.gilead> | ||||||||||
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> | ||||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||||
Severity: | major | ||||||||||||
Priority: | P3 | CC: | david_audel, eric_jodet | ||||||||||
Version: | 3.3 | Flags: | david_audel:
review+
Olivier_Thomann: review+ |
||||||||||
Target Milestone: | 3.3 RC2 | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Attachments: |
|
Description
Max Gilead
2007-05-21 13:19:32 EDT
Can you provide a small example of the code where you performed the completion to help us to reproduce? Thanks Of course Frederic, I was just preparing a test case. I had to split it into three parts since the archive was too big for bugzilla. There are two tarballs: test.tar.gz with all files except .metadata/.plugins/org.eclipse.jdt.core/1779200859.index . The second part is split into two pieces: test_org.eclipse.jdt.core_index.tar.gz_1 and test_org.eclipse.jdt.core_index.tar.gz_2. To recreate real tarball you should: cat test_org.eclipse.jdt.core_index.tar.gz_1 test_org.eclipse.jdt.core_index.tar.gz_2 > test_org.eclipse.jdt.core_index.tar.gz Both tarballs should be extracted into the same directory. Sorry for the inconvenience but it's bugzilla's fault :P Created attachment 68007 [details]
Test case, archive 1
Created attachment 68008 [details]
Test case, archive 2, part 1/2
Created attachment 68010 [details]
Test case, archive 2, part 2/2
Unfortunately installing your example results in lot of compiler errors due to missing type references (I'm currently not granted to get the J2ME product)... I also do not know where did you perform the completion when you got this problem. Some questions which may avoid me to get this specific product: 1) What are your compiler compliance and the JRE you refer to in your project? 2) Can you reproduce same error without the references to J2ME libs? > Unfortunately installing your example results in lot of compiler errors Yes, I just copied some files to this project and intended to work on it. It would not work on compile anyway, even with correct libraries installed. > (I'm currently not granted to get the J2ME product) Maybe you can get PhoneME release? It's basically the same thing as WTK but packaged and licensed differently. It can be downloaded from https://phoneme.dev.java.net/downloads_page.html and is released under the GNU GPL. > I also do not know where did you perform the completion when you got this problem. Class TestCanvas: g.setColor(0xff, 0xff, 0xff); g.fillRect(0, 0, g.| <--- that's where I tried to activate autocompletion Some questions which may avoid me to get this specific product: > 1) What are your compiler compliance and the JRE you refer to in your project? Compiler compliance settings are default for Eclipse 3.3M7 -- I created new workspace. I tried it with the JREs mentioned above, but workspace has been created when running JDK7. I know it's early access version but I've been running it for quite some time doing regular development and encountered no problems at all. > 2) Can you reproduce same error without the references to J2ME libs? No, I can't even reproduce it with the same sources copied to new workspace/project. It must be something wrong with this exact project metafiles. > 2) Can you reproduce same error without the references to J2ME libs?
Sorry, I misread your question. I don't know if this error occurs without J2ME libs in the project. I'll try when I get access to my development machine.
Completion works well for me using 3.3 RC1 on your sample at the location you indicated. I think there's really something broken in your workspace because: 1) you cannot reproduce the problem in another workspace 2) the exception occurred in Javadoc completion code although your source didn't have any javadoc comment... One other question is there attached source with the J2ME libraries? OK, I can reproduce your problem after having manually changed the compiler compliance to 1.7... Didn't you also change it manually or during a debug session as the compiler preference page do not propose this value...!? Err... no, I did not. Actually I wasn't even aware there is a 1.7 compiler compliance level available. As I said -- it's a fresh workspace just as Eclipse created it. All I did was creating a new project in it. Ok, summarizing: 1. I manually created workspace directory (test) 2. I manually created project directory (test/MIDP_minimal) 3. Copied files into test/MIDP_minimal directory 4. Launched second Eclipse instance (one was already running on my base workspace) 5. Created new project named MIDP_minimal 6. Stared editing which ended with the exceptions above This new workspace is a subdirectory of my main workspace (with compiler level set to 6.0). My main workspace is ~/Projects directory, new workspace was ~/Projects/BitCruncher/test. I don't know if it's supported or no but I did it before a lot of times and everything worked fine. The J2ME library jar files contain no javadoc or source files -- only binary .class files. Heh, I know why I wasn't aware of 7.0 compiler compliance level -- that's because there's no such thing in 3.3M7 I was using :) I do not know how this happened, however, I cannot see other way to reproduce the problem than specify a 1.7 compliance. So, a simple test case is: 1) Create a java project 2) Manually set the compliance to 1.7 (modifying the org.eclipse.jdt.core.prefs file) 3) Create a class in the project public class Test { void foo(String str) { str.<|> } } 4) Complete a <|> location => you get the AIOOBE Created attachment 68306 [details]
Proposed patch
Simply add 1.7 (empty) support for Javadoc parsers
No test case added. It's enough to run JavadocCompletionParserTest using 1.7 compliance to verify that this bug is fixed... +1 +1 Released for 3.3 RC2 in HEAD stream. Verified for 3.3RC2 using I20070524-0010. |