Community
Participate
Working Groups
build 3.1RC1 I tried the reproduce the bug 93157 but i cannot because the JDTCore completion API is never call with this test case. My exact test case is 1) launch eclipse 2) import the jdtcore plugin inside the workspace 3) set a breakpoint inside CompletionEngine#complete(IType .....) 4) launch in debug mode 5) import org.eclipse.ui.form inside this new workspace 6) set a breakpoint inside FormEditor#pageChange 7) launch in debug mode 8) import a plugin and open a Manifest file *the breakpoint of 6) is reached 9) do ctrl+space in the variable view *no completion and the breakpoint of 3) is not reached Redo the same test case but set a beakpoint in DisplayCompletionProcessor#computeCompletionProposals() instead of CompletionEngine#complete. Then this breakpoint is reached. Step inside getReceivingType() and you can see that 'project' is 'org.eclipse.ui.forms' and 'typeName' is ManifestEditor. The following code seems to search ManifestEditor inside 'org.eclipse.ui.forms' but this class is inside 'org.eclise.jdt.debug.ui' and not in 'org.eclipse.ui.forms. Then no IType is found and the completion failed. I am not sure of my diagnosis but the problem seems to be inside this area.
The problem is that the receiving type (ManifestEditor) is not in the workspace. We hit a breakpoint in FormEditor, but we are trying code assist in the conext of the receiver (ManifestEditor), which cannot be found.
And, even when it is in the workspace, we are searching for the receiving type (ManifestEditor) in the project of the stack frame's declaring type. This does not work either. I.e. the project org.eclispe.ui.forms will not be able to find an upstream subclass.
Fixed. Changes to: DetailsCompletionProcessor DisplayCompletionProcessor DisplayMessages.java/.properties To peform code assist we resolve an IType. However, we were doing this by searching for the receiving type name in the declaring type's project (which might not be the same - the receiving type may be defined in an upstream project). Fix is to use the source locator to search for the receiving type source element, and then resolve a Java element (and then type) from that. This provides the correct IType and IJavaProject for the completion. Note that for this test case to work, you also need to import org.eclipse.pde.ui (in step 5 of original problem description) for code assist to work. Otherwise the source locator still cannot find the ManifestEditor type.
Please verify, Kevin.
verified