Java Mailing List Archive

http://www.gg3721.com/

Home » eclipse-plugin-dev.groovy »

Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
 DSL

Andrew Eisenberg

2010-05-11

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi Maxime,

Unfortunately, the Grails tooling plugins are closed source and so
they are not available to browse. Also, it has always been my
intention to create an open sourced DSL tool support that extends
Groovy-Eclipse, but I have not yet had time.

If your DSL is simple enough, then adding tool support for it should
not be too difficult.

There are 3 extension points that you need to extend (all described in
the blog post). It seems that you already have syntax highlighting.
The next step is to get inferencing working.

For that, you need to extend the
org.eclipse.jdt.groovy.core.typeLookup extension point and extend the
AbstractSimplifiedTypeLookup class.

The initialize method should add any extra variables and their types
to the top-level scope of your compilation unit (ie- these are extra
variables that are accessible from anywhere in the file).

The lookupTypeAndDeclaration method that you need to implement is
where you decide what the type (if any) of a given identifier is when
in the context of a particular declaring class.

I'd recommend that you work on this a little bit and let me know if
you have any specific questions. It may help to look at the other
ITypeLookup implementations in the Groovy-Eclipse code.

Once you have this, then you can work on content assist.

Hope this helps,
--andrew



On Mon, May 10, 2010 at 2:45 PM, Maxime HAMM <Maxime.Hamm@(protected):
> Hi
>
>
>
> I’m working on a Groovy DSL named « SJS » for Jspresso framework (see here :
> www.jspresso.org)
>
> I would like to implement a plugin for my DSL.
>
>
>
> A found information about that here :
> http://contraptionsforprogramming.blogspot.com/2009/12/extending-groovy-eclipse-for-use-with.html
>
> Since now I succeed on Highlighting implementation…
>
>
>
> Now I’m look for more information about Content Assist…
>
>
>
> Could someone send me some plugin sample code ?
>
> I think Grail DSL ha sits own plugin… where can i get the source code ?
>
> Can you tell me about other DSL plugin implementation ?
>
>
>
> Thank you for reading,
>
> Kind regards,
>
> Maxime

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.