Community
Participate
Working Groups
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;
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?
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.
Marking as remind for more input.
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.
re-open to move to JCore
Moving to JCore for comment. JCore provides code completion APIs.
Please provide the APIs you need.
(In reply to comment #7) > Please provide the APIs you need. I meant could you please tell us exactly what APIs you need ?
Not enough information. Closing as INVALID.
Verified for 3.5M2 using I20080914-2000