2

I'm writing an eclipse plugin for JOII but got stuck on modifying the outline in a JavaScript editor.

I have a ContentAssistant that provides me with a list of ICompletionProposal and got the IJavaCompletionProposalComputer functioning perfectly, giving me nice code completions as I type. There is, however, no outline for it (besides the default javascript stuff).

So the question is: How do I hook the ContentAssistant into something that alters/updates the outline view?

Example code I'm parsing with the plugin:

var SomeClass = Class({
    foo: function() {},
    bar: function() {}
});

In the outline, "SomeClass" is shown as: SomeClass : Any, but I'd like it to display itself as an actual class with the members.

I've been searching all day (litterally) for an example on this, but no luck..

Thanks in advance!!

Harold
  • 1,372
  • 1
  • 14
  • 25
  • An outline view usually uses some sort of listener to listen for changes to the document (or the abstract syntax tree or some or model of the document contents) and updates from that. – greg-449 Jun 07 '14 at 07:55
  • Harold, why not writing a tern plugin (in JavaScript) for JOII? After that your plugin will work for Vim, Emacs, Atom, Sublime and Eclipse https://github.com/angelozerr/tern.java – Angelo Jul 08 '15 at 13:22

0 Answers0