Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Content Assist displayed as tree in separate view
Content Assist displayed as tree in separate view [message #637001] Wed, 03 November 2010 17:31 Go to next message
zmaker5 is currently offline zmaker5Friend
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 #637084 is a reply to message #637001] Thu, 04 November 2010 06:53 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
zmaker5 wrote:
> 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.
Not for free but you could implement this on your own.
>
> 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.
How much of the existing proposals you need (Java, templates, Mylyn,
etc.)? Basically, you need to call the core content assist
infrastructure with th right arguments and then write a view that
displays the results.

Dani
Re: Content Assist displayed as tree in seperate view [message #637165 is a reply to message #637084] Thu, 04 November 2010 12:41 Go to previous messageGo to next message
zmaker5 is currently offline zmaker5Friend
Messages: 4
Registered: November 2010
Junior Member
I need the classes and methods that can be accessed at the current cursor position.
Re: Content Assist displayed as tree in seperate view [message #637215 is a reply to message #637165] Thu, 04 November 2010 15:46 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
zmaker5 wrote:
> I need the classes and methods that can be accessed at the current
> cursor position.
Take a look at org.eclipse.jdt.core.ICodeAssist.

Dani
Re: Content Assist displayed as tree in seperate view [message #637304 is a reply to message #637215] Thu, 04 November 2010 23:05 Go to previous message
zmaker5 is currently offline zmaker5Friend
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

Previous Topic:Submenu does not show up
Next Topic:How to use GetListItems from Sharepoint
Goto Forum:
  


Current Time: Wed Jan 27 17:53:15 GMT 2021

Powered by FUDForum. Page generated in 0.02329 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top