Bug 160982

Summary: Provide a public, extendable API for Java snippet code completion
Product: [Eclipse Project] JDT Reporter: Fred Wilson <whitepaper234>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: martinae, Olivier_Thomann, thatnitind
Version: 3.3Keywords: needinfo
Target Milestone: 3.5 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Fred Wilson CLA 2006-10-15 19:06:22 EDT
Would like a public, extendable API for code completion on Java snippets. This would be similar to completion in the breakpoint editor.

Currently using the following internal API's to accomplish this:

org.eclipse.jdt.internal.codeassist.impl.Engine;
org.eclipse.jdt.internal.core.SearchableEnvironment;
org.eclipse.jdt.internal.codeassist.CompletionEngine;
org.eclipse.jdt.internal.codeassist.IExtendedCompletionRequestor;
org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
org.eclipse.jdt.internal.core.BinaryType;
org.eclipse.jdt.internal.core.NameLookup;
org.eclipse.jdt.internal.debug.ui.JDIContentAssistPreference;
org.eclipse.jdt.internal.ui.JavaPlugin;
org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer;
org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner;
org.eclipse.jdt.internal.ui.text.Symbols;
org.eclipse.jdt.internal.codeassist.complete.InvalidCursorLocation;
Comment 1 Martin Aeschlimann CLA 2006-10-17 05:22:01 EDT
You have to elaborate:
What do you try to achive? Do you have an own view and want to offer code completion?
Is the normal code completion API not good enough?

Moving to Darin who knows more about snippets and the breakpoint editor. Darin, are you using internal jdt.core API?
Comment 2 Darin Wright CLA 2006-10-17 08:33:05 EDT
The debugger is *not* using internal JCORE api's. See JavaDebugContentAssistProcessor - we use IType.codeComplete(...) API. We use some internal JUI API to get templates and parameters to appear the same in the debugger as in the Java editor.
Comment 3 Darin Wright CLA 2006-10-23 11:48:01 EDT
Marking as remind for more input.
Comment 4 Fred Wilson CLA 2007-04-19 19:27:00 EDT
Our product requires more than simple snippet completion, so we needed to create a custom completion processor. Our processor performs two tasks, first it extends the standard Java syntax with our own custom keywords, and second we cache the completion results for performance reasons. We extend the Java Code snippet completion engine to do this, and it is an internal class. Writing our own snippet completion engine from scratch is just not practical.

Comment 5 Darin Wright CLA 2007-04-19 22:20:21 EDT
re-open to move to JCore
Comment 6 Darin Wright CLA 2007-04-19 22:20:49 EDT
Moving to JCore for comment. JCore provides code completion APIs.
Comment 7 Jerome Lanneluc CLA 2007-04-23 05:30:19 EDT
Please provide the APIs you need.
Comment 8 Jerome Lanneluc CLA 2007-04-26 12:27:09 EDT
(In reply to comment #7)
> Please provide the APIs you need.
I meant could you please tell us exactly what APIs you need ?

Comment 9 Jerome Lanneluc CLA 2008-08-26 06:56:34 EDT
Not enough information. Closing as INVALID.
Comment 10 Olivier Thomann CLA 2008-09-15 08:59:19 EDT
Verified for 3.5M2 using I20080914-2000