Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] selection engine implementation

alex -

  thanks for the response.

  i get the basic idea and understand that 'walking' implementations need to be different b/c the ASTs are different, i was more confused by the IAssistParser implementations and the fact that the _javascript_ plugin went a completely separate route. but ok, it looks like i'm free to do this however, as long as i give back the correct IModelElement(s).

  i do have another question, what is 'i' supposed to represent in this method:

    public IModelElement[] select(IModuleSource module, int position, int i)

  i traced back in the code and see that it represents a length, but i don't know what that length is, or how it could sometimes have a value of -1.

  thanks!

On Wed, Apr 18, 2012 at 12:15 AM, Alexey Panchenko <alex.panchenko@xxxxxxxxx> wrote:
Hi Jae,

You are supposed to return the IModelElement representing the thing at
the specified location.
If the exact match couldn't be found, then multiple candidates could
be returned.

The first step is locating the AST node at the location - it's done
visiting the tree.
Then if the AST node looks like a reference you try to resolve it and
return the IModelElement found (type, method, field or create a local
variable).
Something like that.

Implementations are slightly different, as they were created in
different time and actually the languages are different too.

Regards,
Alex

On Wed, Apr 18, 2012 at 07:36, Jae Gangemi <jgangemi@xxxxxxxxx> wrote:
> hello all -
>
>   i'm looking to start adding some basic hyperlink support to my editor, so
> i've starting working on an implementation of a ScriptSelectionEngine...
>
>   the problem is, there's basically no documentation on how any of this is
> supposed to work and the 4 dltk language plugins all seem to do things some
> what differently, w/ the _javascript_ plugin blazing a trail w/ a whole new
> set of implementations, so i'm a little perplexed on how to get started.
>
>   any suggestions?
>
>   thanks!!
>
> --
> -jae
>
> _______________________________________________
> dltk-dev mailing list
> dltk-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/dltk-dev
>
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev



--
-jae

Back to the top