Content Assist displayed as tree in separate view [message #637001] |
Wed, 03 November 2010 17:31 |
zmaker5 Messages: 4 Registered: November 2010 |
Junior Member |
|
|
I'm wondering if it would be possible to get the content assist results to show up in a side view as a tree rather than the current at the cursor pop-up.
Essentially I want to navigate what's "possible" at my current location and quickly expand through call paths without having to type them out. The content assist interface already "knows" what's available, so this seems feasible, it's just a question of how deep in the content assist code I have to change things.
[Updated on: Wed, 03 November 2010 17:32] Report message to a moderator
|
|
|
|
|
|
Re: Content Assist displayed as tree in seperate view [message #637304 is a reply to message #637215] |
Thu, 04 November 2010 23:05 |
zmaker5 Messages: 4 Registered: November 2010 |
Junior Member |
|
|
ICodeAssist looks like it needs proposals to come in from content assist, but far as I can tell ItextViewer's don't have a public call like getContentAssistantProcessor() that I can find.
I had assumed I could somehow combine
int offset = 0;
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (editor instanceof ITextEditor)
{
ISelectionProvider selectionProvider = ((ITextEditor)editor).getSelectionProvider();
ISelection sel = selectionProvider.getSelection();
if (sel instanceof ITextSelection)
{
ITextSelection tSel = (ITextSelection)sel ;
offset = tSel.getOffset(); // etc.
}
}
With info related to
http://wiki.eclipse.org/FAQ_How_do_I_add_Content_Assist_to_m y_language_editor%3F
But I'm just not finding any access to the JavaCompletionProcessor end of things, is it one of the few proprietary things and thus not accessible to external plugins?
It would seem odd that I would have to recreate the content assist results when Eclipse already "knows" everything I need to generate the tree view I want to create.
Is this more of what I need to be looking at?
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.jdt.doc.isv/guide/jdt_api_codeassist.htm
Though I saw your post elsewhere mentioning
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocume ntProvider.createFakeCompiltationUnit(*)
but can't fathom how I interact with a package that doesn't seem to exist for me, at least as far as Eclipse is concerned.
At this point I have an ArrayList I am gathering proposals in, I'm getting the offset in the focused text editor, but I need to actually generate the proposals. Confusing me more is that codeComplete() only takes in an offset and the completionRequestor reference but no reference to the text editor.
[Updated on: Fri, 05 November 2010 13:39] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02966 seconds