Re: Groovy eclipse plugin for specific DSL

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Groovy eclipse plugin for specific DSL

Andrew Eisenberg
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 <[hidden email]> wrote:

> 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


Reply | Threaded
Open this post in threaded view
|

Re: Groovy eclipse plugin for specific DSL

Maxime HAMM

Hi Andrew
Thank you for this detailed answer.
I will study on that and i will let you know the result !
Regards,
Maxime

Envoyé de mon iPhone

Le 11 mai 2010 à 06:00, Andrew Eisenberg <[hidden email]> a  
écrit :

>
> 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  
> <[hidden email]> wrote:
>> 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 c
>> ode ?
>>
>> 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
>
>
>


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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Groovy eclipse plugin for specific DSL

Maxime HAMM
In reply to this post by Andrew Eisenberg
Hi Andrew

I tried to implement the "syntaxHighlightingExtension", "typeLookup" and the
"completionProposalProvider" extension points... I was setting breakpoints
into all my methods, but at runtime, the only the
syntaxHighlightingExtension code is reached...

Can you please take a look at my project ?

To continue, can i find some documentation about VariableScope, ClassNode,
TypeAndDeclaration, ContentAssistContext, MethodNode, IGroovyProposal, etc.
?

Thank you for spending time on that...

Regards,
Maxime

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la
part de Andrew Eisenberg
Envoyé : mardi 11 mai 2010 06:01
À : [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
DSL


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 <[hidden email]>
wrote:
> 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-ecli
pse-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




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

    http://xircles.codehaus.org/manage_email

org.jspresso.contrib.sjsplugin.zip (18K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Groovy eclipse plugin for specific DSL

Andrew Eisenberg
In reply to this post by Andrew Eisenberg
I had a quick look at your project.  Several problems there:

1. you need to define a project nature that your type lookups will
apply to.  You can use the groovy nature if you don't want to create
your own and want to have it apply to all groovy projects.

You can create a nature that looks like this:

 <extension
       id="nature"
       point="org.eclipse.core.resources.natures">
    <runtime>
       <run
             class="org.jspresso.contrib.sjsplugin.ProjectNature">
       </run>
    </runtime>
</extension>

And the nature ID that you use to reference it will be this:
org.jspresso.contrib.sjsplugin.nature
also, you must define the ProjectNature class.  A simple stub is
usually sufficient.

2. you redefined the typeLookup extension point locally.  This is
causing some confusion in Eclipse.  Delete that.  And use the
typeLookup extension point defined in org.eclipse.jdt.groovy.core

3. You have lots of extraneous builders and natures applied to your
project.  Remove all of the natures and builders that have 'wst' and
'jem' in them.

4. Your target execution environment is Tomcat.  This is not correct.
It should be something like Java 6.

On Wed, May 12, 2010 at 3:00 PM, Maxime LaPoste <[hidden email]> wrote:

> Hi Andrew
>
> I tried to implement the "syntaxHighlightingExtension", "typeLookup" and the
> "completionProposalProvider" extension points... I was setting breakpoints
> into all my methods, but at runtime, the only the
> syntaxHighlightingExtension code is reached...
>
> Can you please take a look at my project ?
>
> To continue, can i find some documentation about VariableScope, ClassNode,
> TypeAndDeclaration, ContentAssistContext, MethodNode, IGroovyProposal, etc.
> ?
>
> Thank you for spending time on that...
>
> Regards,
> Maxime
>
> -----Message d'origine-----
> De : [hidden email] [mailto:[hidden email]] De la
> part de Andrew Eisenberg
> Envoyé : mardi 11 mai 2010 06:01
> À : [hidden email]
> Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
> DSL
>
>
> 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 <[hidden email]>
> wrote:
>> 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-ecli
> pse-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
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Groovy eclipse plugin for specific DSL

Maxime HAMM
Hi Andrew

1. I already set the "org.jspresso.sjsnature" to my target project. In fact
the project i send you is the plugin-project, not the SJS project that will
use my Groovy DSL... I think the nature is correct because the highlinting
is working on my SJS Project.
I send you this time, the plugin project, and the Jspresso-SJS test project
also.

2. I delete the typeLookup extension point locally... but :
- my "plugin.xml" doesn't match any more what is explain at
http://contraptionsforprogramming.blogspot.com/2009/12/extending-groovy-ecli
pse-for-use-with.html
- i didn't understand how to link the extension point to my
org.jspresso.contrib.sjsplugin.editor.SJSTypeLookup class And of course my
breakpoint are'nt raised at runtime...

3. Ok i did what you told me.

4. I can't find the "target execution environment" that you're speaking
about??

Regards
Maxime

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la
part de Andrew Eisenberg Envoyé : jeudi 13 mai 2010 05:29 À :
[hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
DSL


I had a quick look at your project.  Several problems there:

1. you need to define a project nature that your type lookups will apply to.
You can use the groovy nature if you don't want to create your own and want
to have it apply to all groovy projects.

You can create a nature that looks like this:

 <extension
       id="nature"
       point="org.eclipse.core.resources.natures">
    <runtime>
       <run
             class="org.jspresso.contrib.sjsplugin.ProjectNature">
       </run>
    </runtime>
</extension>

And the nature ID that you use to reference it will be this:
org.jspresso.contrib.sjsplugin.nature
also, you must define the ProjectNature class.  A simple stub is usually
sufficient.

2. you redefined the typeLookup extension point locally.  This is causing
some confusion in Eclipse.  Delete that.  And use the typeLookup extension
point defined in org.eclipse.jdt.groovy.core

3. You have lots of extraneous builders and natures applied to your project.
Remove all of the natures and builders that have 'wst' and 'jem' in them.

4. Your target execution environment is Tomcat.  This is not correct.
It should be something like Java 6.

On Wed, May 12, 2010 at 3:00 PM, Maxime LaPoste <[hidden email]>
wrote:

> Hi Andrew
>
> I tried to implement the "syntaxHighlightingExtension", "typeLookup"
> and the "completionProposalProvider" extension points... I was setting
> breakpoints into all my methods, but at runtime, the only the
> syntaxHighlightingExtension code is reached...
>
> Can you please take a look at my project ?
>
> To continue, can i find some documentation about VariableScope,
> ClassNode, TypeAndDeclaration, ContentAssistContext, MethodNode,
IGroovyProposal, etc.

> ?
>
> Thank you for spending time on that...
>
> Regards,
> Maxime
>
> -----Message d'origine-----
> De : [hidden email] [mailto:[hidden email]] De
> la part de Andrew Eisenberg Envoyé : mardi 11 mai 2010 06:01 À :
> [hidden email]
> Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for
> specific DSL
>
>
> 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 <[hidden email]>
> wrote:
>> 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-groov
> y-ecli
> pse-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
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




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

    http://xircles.codehaus.org/manage_email

org.jspresso.contrib.sjsplugin.rar (27K) Download Attachment
org.jspresso.contrib.sjsplugin.testproject.rar (46K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Groovy eclipse plugin for specific DSL

Andrew Eisenberg
In reply to this post by Andrew Eisenberg
> 1. I already set the "org.jspresso.sjsnature" to my target project. In fact
> the project i send you is the plugin-project, not the SJS project that will
> use my Groovy DSL... I think the nature is correct because the highlinting
> is working on my SJS Project.
> I send you this time, the plugin project, and the Jspresso-SJS test project
> also.
OK...maybe that works, but it shouldn't.  You really should be
defining your own nature, or use the predefined groovy nature.


> 2. I delete the typeLookup extension point locally... but :
> - my "plugin.xml" doesn't match any more what is explain at
> http://contraptionsforprogramming.blogspot.com/2009/12/extending-groovy-ecli
> pse-for-use-with.html
> - i didn't understand how to link the extension point to my
> org.jspresso.contrib.sjsplugin.editor.SJSTypeLookup class And of course my
> breakpoint are'nt raised at runtime...
You need to delete the extension point definition.  The line that
looks like this:
<extension-point id="typeLookup" name="Type Lookup"
schema="schema/typeLookup.exsd"/>

You must keep the extension itself, the line that starts with:

<extension id="testLookup"
       point="org.eclipse.jdt.groovy.core.typeLookup">



>
> 3. Ok i did what you told me.
>
> 4. I can't find the "target execution environment" that you're speaking
> about??

Don't worry about this.  It is a setting in your MANIFEST.MF, I think.

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Groovy eclipse plugin for specific DSL

Maxime HAMM
Hi Andrew
I hope you still have available time to assist me !
Now i define a nature for my plugin, i delete the local extension
definition... but its still not working !
I send you my current project, please take a look again...
Greetings from Paris,
Maxime

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la
part de Andrew Eisenberg
Envoyé : jeudi 13 mai 2010 19:33
À : [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
DSL


> 1. I already set the "org.jspresso.sjsnature" to my target project. In
fact
> the project i send you is the plugin-project, not the SJS project that
will
> use my Groovy DSL... I think the nature is correct because the highlinting
> is working on my SJS Project.
> I send you this time, the plugin project, and the Jspresso-SJS test
project
> also.
OK...maybe that works, but it shouldn't.  You really should be
defining your own nature, or use the predefined groovy nature.


> 2. I delete the typeLookup extension point locally... but :
> - my "plugin.xml" doesn't match any more what is explain at
>
http://contraptionsforprogramming.blogspot.com/2009/12/extending-groovy-ecli
> pse-for-use-with.html
> - i didn't understand how to link the extension point to my
> org.jspresso.contrib.sjsplugin.editor.SJSTypeLookup class And of course my
> breakpoint are'nt raised at runtime...
You need to delete the extension point definition.  The line that
looks like this:
<extension-point id="typeLookup" name="Type Lookup"
schema="schema/typeLookup.exsd"/>

You must keep the extension itself, the line that starts with:

<extension id="testLookup"
       point="org.eclipse.jdt.groovy.core.typeLookup">



>
> 3. Ok i did what you told me.
>
> 4. I can't find the "target execution environment" that you're speaking
> about??

Don't worry about this.  It is a setting in your MANIFEST.MF, I think.

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

    http://xircles.codehaus.org/manage_email




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

    http://xircles.codehaus.org/manage_email

org.jspresso.contrib.sjsplugin.rar (34K) Download Attachment
org.jspresso.contrib.sjsplugin.testproject.rar (46K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Groovy eclipse plugin for specific DSL

Andrew Eisenberg
In reply to this post by Andrew Eisenberg
Maxime,

If I continue to help you with this, then you have to promise to make
your project available for public use on the Groovy-Eclipse wiki.  Is
that reasonable?  :)

On Thu, May 13, 2010 at 2:04 PM, Maxime LaPoste <[hidden email]> wrote:

> Hi Andrew
> I hope you still have available time to assist me !
> Now i define a nature for my plugin, i delete the local extension
> definition... but its still not working !
> I send you my current project, please take a look again...
> Greetings from Paris,
> Maxime
>
> -----Message d'origine-----
> De : [hidden email] [mailto:[hidden email]] De la
> part de Andrew Eisenberg
> Envoyé : jeudi 13 mai 2010 19:33
> À : [hidden email]
> Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
> DSL
>
>
>> 1. I already set the "org.jspresso.sjsnature" to my target project. In
> fact
>> the project i send you is the plugin-project, not the SJS project that
> will
>> use my Groovy DSL... I think the nature is correct because the highlinting
>> is working on my SJS Project.
>> I send you this time, the plugin project, and the Jspresso-SJS test
> project
>> also.
> OK...maybe that works, but it shouldn't.  You really should be
> defining your own nature, or use the predefined groovy nature.
>
>
>> 2. I delete the typeLookup extension point locally... but :
>> - my "plugin.xml" doesn't match any more what is explain at
>>
> http://contraptionsforprogramming.blogspot.com/2009/12/extending-groovy-ecli
>> pse-for-use-with.html
>> - i didn't understand how to link the extension point to my
>> org.jspresso.contrib.sjsplugin.editor.SJSTypeLookup class And of course my
>> breakpoint are'nt raised at runtime...
> You need to delete the extension point definition.  The line that
> looks like this:
> <extension-point id="typeLookup" name="Type Lookup"
> schema="schema/typeLookup.exsd"/>
>
> You must keep the extension itself, the line that starts with:
>
> <extension id="testLookup"
>       point="org.eclipse.jdt.groovy.core.typeLookup">
>
>
>
>>
>> 3. Ok i did what you told me.
>>
>> 4. I can't find the "target execution environment" that you're speaking
>> about??
>
> Don't worry about this.  It is a setting in your MANIFEST.MF, I think.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Groovy eclipse plugin for specific DSL

Maxime HAMM

I think its possible !

In fact my plugin is for a Java framework named "Jspresso" which is
opensource.
You can take a look here : www.jspresso.org

The next release, in few weeks, will use a groovy DSL. We're working on
documentation but i invite your to consult this preview here :
http://www.youtube.com/watch?v=NGSgDifPSW4 

Regards,
Maxime

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la
part de Andrew Eisenberg
Envoyé : jeudi 13 mai 2010 23:19
À : [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
DSL


Maxime,

If I continue to help you with this, then you have to promise to make
your project available for public use on the Groovy-Eclipse wiki.  Is
that reasonable?  :)

On Thu, May 13, 2010 at 2:04 PM, Maxime LaPoste <[hidden email]>
wrote:

> Hi Andrew
> I hope you still have available time to assist me !
> Now i define a nature for my plugin, i delete the local extension
> definition... but its still not working !
> I send you my current project, please take a look again...
> Greetings from Paris,
> Maxime
>
> -----Message d'origine-----
> De : [hidden email] [mailto:[hidden email]] De la
> part de Andrew Eisenberg
> Envoyé : jeudi 13 mai 2010 19:33
> À : [hidden email]
> Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
> DSL
>
>
>> 1. I already set the "org.jspresso.sjsnature" to my target project. In
> fact
>> the project i send you is the plugin-project, not the SJS project that
> will
>> use my Groovy DSL... I think the nature is correct because the
highlinting

>> is working on my SJS Project.
>> I send you this time, the plugin project, and the Jspresso-SJS test
> project
>> also.
> OK...maybe that works, but it shouldn't.  You really should be
> defining your own nature, or use the predefined groovy nature.
>
>
>> 2. I delete the typeLookup extension point locally... but :
>> - my "plugin.xml" doesn't match any more what is explain at
>>
>
http://contraptionsforprogramming.blogspot.com/2009/12/extending-groovy-ecli
>> pse-for-use-with.html
>> - i didn't understand how to link the extension point to my
>> org.jspresso.contrib.sjsplugin.editor.SJSTypeLookup class And of course
my

>> breakpoint are'nt raised at runtime...
> You need to delete the extension point definition.  The line that
> looks like this:
> <extension-point id="typeLookup" name="Type Lookup"
> schema="schema/typeLookup.exsd"/>
>
> You must keep the extension itself, the line that starts with:
>
> <extension id="testLookup"
>       point="org.eclipse.jdt.groovy.core.typeLookup">
>
>
>
>>
>> 3. Ok i did what you told me.
>>
>> 4. I can't find the "target execution environment" that you're speaking
>> about??
>
> Don't worry about this.  It is a setting in your MANIFEST.MF, I think.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

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

    http://xircles.codehaus.org/manage_email






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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Groovy eclipse plugin for specific DSL

Andrew Eisenberg
In reply to this post by Andrew Eisenberg
Apparently, the attachment was too large to send, so you can get the
project here:

http://codehaus.org/~werdna/jspresso.zip

On Fri, May 14, 2010 at 10:07 AM, Andrew Eisenberg <[hidden email]> wrote:

> Here is a new version of your project.  Inferencing and content assist
> is now extended.
>
> In any compilation unit inside of a project with the
> org.jspresso.contrib.sjsplugin.nature nature, you will see two new
> completion proposals, both of which are type string.
>
> "This is a method"()
> This_is_a_field
>
> I'll be adapting this plugin for a blog post soon because I think
> there quite a few people who'd find this useful.
>
> On Thu, May 13, 2010 at 2:48 PM, Maxime LaPoste <[hidden email]> wrote:
>>
>> I think its possible !
>>
>> In fact my plugin is for a Java framework named "Jspresso" which is
>> opensource.
>> You can take a look here : www.jspresso.org
>>
>> The next release, in few weeks, will use a groovy DSL. We're working on
>> documentation but i invite your to consult this preview here :
>> http://www.youtube.com/watch?v=NGSgDifPSW4
>>
>> Regards,
>> Maxime
>>
>> -----Message d'origine-----
>> De : [hidden email] [mailto:[hidden email]] De la
>> part de Andrew Eisenberg
>> Envoyé : jeudi 13 mai 2010 23:19
>> À : [hidden email]
>> Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
>> DSL
>>
>>
>> Maxime,
>>
>> If I continue to help you with this, then you have to promise to make
>> your project available for public use on the Groovy-Eclipse wiki.  Is
>> that reasonable?  :)
>>
>> On Thu, May 13, 2010 at 2:04 PM, Maxime LaPoste <[hidden email]>
>> wrote:
>>> Hi Andrew
>>> I hope you still have available time to assist me !
>>> Now i define a nature for my plugin, i delete the local extension
>>> definition... but its still not working !
>>> I send you my current project, please take a look again...
>>> Greetings from Paris,
>>> Maxime
>>>
>>> -----Message d'origine-----
>>> De : [hidden email] [mailto:[hidden email]] De la
>>> part de Andrew Eisenberg
>>> Envoyé : jeudi 13 mai 2010 19:33
>>> À : [hidden email]
>>> Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
>>> DSL
>>>
>>>
>>>> 1. I already set the "org.jspresso.sjsnature" to my target project. In
>>> fact
>>>> the project i send you is the plugin-project, not the SJS project that
>>> will
>>>> use my Groovy DSL... I think the nature is correct because the
>> highlinting
>>>> is working on my SJS Project.
>>>> I send you this time, the plugin project, and the Jspresso-SJS test
>>> project
>>>> also.
>>> OK...maybe that works, but it shouldn't.  You really should be
>>> defining your own nature, or use the predefined groovy nature.
>>>
>>>
>>>> 2. I delete the typeLookup extension point locally... but :
>>>> - my "plugin.xml" doesn't match any more what is explain at
>>>>
>>>
>> http://contraptionsforprogramming.blogspot.com/2009/12/extending-groovy-ecli
>>>> pse-for-use-with.html
>>>> - i didn't understand how to link the extension point to my
>>>> org.jspresso.contrib.sjsplugin.editor.SJSTypeLookup class And of course
>> my
>>>> breakpoint are'nt raised at runtime...
>>> You need to delete the extension point definition.  The line that
>>> looks like this:
>>> <extension-point id="typeLookup" name="Type Lookup"
>>> schema="schema/typeLookup.exsd"/>
>>>
>>> You must keep the extension itself, the line that starts with:
>>>
>>> <extension id="testLookup"
>>>       point="org.eclipse.jdt.groovy.core.typeLookup">
>>>
>>>
>>>
>>>>
>>>> 3. Ok i did what you told me.
>>>>
>>>> 4. I can't find the "target execution environment" that you're speaking
>>>> about??
>>>
>>> Don't worry about this.  It is a setting in your MANIFEST.MF, I think.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Groovy eclipse plugin for specific DSL

Maxime HAMM

Hi Andrew
Thank you very mutch for that.
At first sight, i think i was close to the solution ;)
I'm now working on code completion... i'm sure i will have some new
questions soon !
Have a nice week-end,
Maxime

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la
part de Andrew Eisenberg
Envoyé : vendredi 14 mai 2010 19:11
À : [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
DSL


Apparently, the attachment was too large to send, so you can get the
project here:

http://codehaus.org/~werdna/jspresso.zip

On Fri, May 14, 2010 at 10:07 AM, Andrew Eisenberg <[hidden email]>
wrote:

> Here is a new version of your project.  Inferencing and content assist
> is now extended.
>
> In any compilation unit inside of a project with the
> org.jspresso.contrib.sjsplugin.nature nature, you will see two new
> completion proposals, both of which are type string.
>
> "This is a method"()
> This_is_a_field
>
> I'll be adapting this plugin for a blog post soon because I think
> there quite a few people who'd find this useful.
>
> On Thu, May 13, 2010 at 2:48 PM, Maxime LaPoste <[hidden email]>
wrote:

>>
>> I think its possible !
>>
>> In fact my plugin is for a Java framework named "Jspresso" which is
>> opensource.
>> You can take a look here : www.jspresso.org
>>
>> The next release, in few weeks, will use a groovy DSL. We're working on
>> documentation but i invite your to consult this preview here :
>> http://www.youtube.com/watch?v=NGSgDifPSW4
>>
>> Regards,
>> Maxime
>>
>> -----Message d'origine-----
>> De : [hidden email] [mailto:[hidden email]] De la
>> part de Andrew Eisenberg
>> Envoyé : jeudi 13 mai 2010 23:19
>> À : [hidden email]
>> Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for
specific

>> DSL
>>
>>
>> Maxime,
>>
>> If I continue to help you with this, then you have to promise to make
>> your project available for public use on the Groovy-Eclipse wiki.  Is
>> that reasonable?  :)
>>
>> On Thu, May 13, 2010 at 2:04 PM, Maxime LaPoste <[hidden email]>
>> wrote:
>>> Hi Andrew
>>> I hope you still have available time to assist me !
>>> Now i define a nature for my plugin, i delete the local extension
>>> definition... but its still not working !
>>> I send you my current project, please take a look again...
>>> Greetings from Paris,
>>> Maxime
>>>
>>> -----Message d'origine-----
>>> De : [hidden email] [mailto:[hidden email]] De
la
>>> part de Andrew Eisenberg
>>> Envoyé : jeudi 13 mai 2010 19:33
>>> À : [hidden email]
>>> Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for
specific

>>> DSL
>>>
>>>
>>>> 1. I already set the "org.jspresso.sjsnature" to my target project. In
>>> fact
>>>> the project i send you is the plugin-project, not the SJS project that
>>> will
>>>> use my Groovy DSL... I think the nature is correct because the
>> highlinting
>>>> is working on my SJS Project.
>>>> I send you this time, the plugin project, and the Jspresso-SJS test
>>> project
>>>> also.
>>> OK...maybe that works, but it shouldn't.  You really should be
>>> defining your own nature, or use the predefined groovy nature.
>>>
>>>
>>>> 2. I delete the typeLookup extension point locally... but :
>>>> - my "plugin.xml" doesn't match any more what is explain at
>>>>
>>>
>>
http://contraptionsforprogramming.blogspot.com/2009/12/extending-groovy-ecli

>>>> pse-for-use-with.html
>>>> - i didn't understand how to link the extension point to my
>>>> org.jspresso.contrib.sjsplugin.editor.SJSTypeLookup class And of course
>> my
>>>> breakpoint are'nt raised at runtime...
>>> You need to delete the extension point definition.  The line that
>>> looks like this:
>>> <extension-point id="typeLookup" name="Type Lookup"
>>> schema="schema/typeLookup.exsd"/>
>>>
>>> You must keep the extension itself, the line that starts with:
>>>
>>> <extension id="testLookup"
>>>       point="org.eclipse.jdt.groovy.core.typeLookup">
>>>
>>>
>>>
>>>>
>>>> 3. Ok i did what you told me.
>>>>
>>>> 4. I can't find the "target execution environment" that you're speaking
>>>> about??
>>>
>>> Don't worry about this.  It is a setting in your MANIFEST.MF, I think.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>

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

    http://xircles.codehaus.org/manage_email






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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Groovy eclipse plugin for specific DSL

Maxime HAMM
In reply to this post by Andrew Eisenberg

Hi Andrew

Some questions about proposals :

1. Is it possible to exclude from proposals anything but the List returned
by the getStatementAndExpressionProposals method ?
   I mean all Java and Groovy proposal stuff wich are not allowed when using
my DSL...

2. How can i avoid arguments filling when using content assist on a method ?

   I was uncheking the "Fill method arguments " in eclipse parameters but it
doesn't work...

Regards,
Maxime


-----Message d'origine-----
De : Maxime LaPoste [mailto:[hidden email]]
Envoyé : vendredi 14 mai 2010 23:05
À : '[hidden email]'
Objet : RE: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
DSL

Hi Andrew
Thank you very mutch for that.
At first sight, i think i was close to the solution ;)
I'm now working on code completion... i'm sure i will have some new
questions soon !
Have a nice week-end,
Maxime

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la
part de Andrew Eisenberg
Envoyé : vendredi 14 mai 2010 19:11
À : [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
DSL


Apparently, the attachment was too large to send, so you can get the
project here:

http://codehaus.org/~werdna/jspresso.zip

On Fri, May 14, 2010 at 10:07 AM, Andrew Eisenberg <[hidden email]>
wrote:

> Here is a new version of your project.  Inferencing and content assist
> is now extended.
>
> In any compilation unit inside of a project with the
> org.jspresso.contrib.sjsplugin.nature nature, you will see two new
> completion proposals, both of which are type string.
>
> "This is a method"()
> This_is_a_field
>
> I'll be adapting this plugin for a blog post soon because I think
> there quite a few people who'd find this useful.
>
> On Thu, May 13, 2010 at 2:48 PM, Maxime LaPoste <[hidden email]>
wrote:

>>
>> I think its possible !
>>
>> In fact my plugin is for a Java framework named "Jspresso" which is
>> opensource.
>> You can take a look here : www.jspresso.org
>>
>> The next release, in few weeks, will use a groovy DSL. We're working on
>> documentation but i invite your to consult this preview here :
>> http://www.youtube.com/watch?v=NGSgDifPSW4
>>
>> Regards,
>> Maxime
>>
>> -----Message d'origine-----
>> De : [hidden email] [mailto:[hidden email]] De la
>> part de Andrew Eisenberg
>> Envoyé : jeudi 13 mai 2010 23:19
>> À : [hidden email]
>> Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for
specific

>> DSL
>>
>>
>> Maxime,
>>
>> If I continue to help you with this, then you have to promise to make
>> your project available for public use on the Groovy-Eclipse wiki.  Is
>> that reasonable?  :)
>>
>> On Thu, May 13, 2010 at 2:04 PM, Maxime LaPoste <[hidden email]>
>> wrote:
>>> Hi Andrew
>>> I hope you still have available time to assist me !
>>> Now i define a nature for my plugin, i delete the local extension
>>> definition... but its still not working !
>>> I send you my current project, please take a look again...
>>> Greetings from Paris,
>>> Maxime
>>>
>>> -----Message d'origine-----
>>> De : [hidden email] [mailto:[hidden email]] De
la
>>> part de Andrew Eisenberg
>>> Envoyé : jeudi 13 mai 2010 19:33
>>> À : [hidden email]
>>> Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for
specific

>>> DSL
>>>
>>>
>>>> 1. I already set the "org.jspresso.sjsnature" to my target project. In
>>> fact
>>>> the project i send you is the plugin-project, not the SJS project that
>>> will
>>>> use my Groovy DSL... I think the nature is correct because the
>> highlinting
>>>> is working on my SJS Project.
>>>> I send you this time, the plugin project, and the Jspresso-SJS test
>>> project
>>>> also.
>>> OK...maybe that works, but it shouldn't.  You really should be
>>> defining your own nature, or use the predefined groovy nature.
>>>
>>>
>>>> 2. I delete the typeLookup extension point locally... but :
>>>> - my "plugin.xml" doesn't match any more what is explain at
>>>>
>>>
>>
http://contraptionsforprogramming.blogspot.com/2009/12/extending-groovy-ecli

>>>> pse-for-use-with.html
>>>> - i didn't understand how to link the extension point to my
>>>> org.jspresso.contrib.sjsplugin.editor.SJSTypeLookup class And of course
>> my
>>>> breakpoint are'nt raised at runtime...
>>> You need to delete the extension point definition.  The line that
>>> looks like this:
>>> <extension-point id="typeLookup" name="Type Lookup"
>>> schema="schema/typeLookup.exsd"/>
>>>
>>> You must keep the extension itself, the line that starts with:
>>>
>>> <extension id="testLookup"
>>>       point="org.eclipse.jdt.groovy.core.typeLookup">
>>>
>>>
>>>
>>>>
>>>> 3. Ok i did what you told me.
>>>>
>>>> 4. I can't find the "target execution environment" that you're speaking
>>>> about??
>>>
>>> Don't worry about this.  It is a setting in your MANIFEST.MF, I think.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>

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

    http://xircles.codehaus.org/manage_email






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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Groovy eclipse plugin for specific DSL

Andrew Eisenberg
In reply to this post by Andrew Eisenberg
> 1. Is it possible to exclude from proposals anything but the List returned
> by the getStatementAndExpressionProposals method ?
>   I mean all Java and Groovy proposal stuff wich are not allowed when using
> my DSL...
There is a jira issue opened for this and it includes a patch, but the
patch was never completed.

http://jira.codehaus.org/browse/GRECLIPSE-595

If you are interested, feel free to re-submit a patch for this issue.

> 2. How can i avoid arguments filling when using content assist on a method ?
>
>   I was uncheking the "Fill method arguments " in eclipse parameters but it
> doesn't work...

There is currently no way to avoid this.  Please raise a jira issue
for this, and I can have the Groovy editor follow almost the same
preference as the Java editor (well, with some differences, the Groovy
editor will fill in the parameter names, not the best guessed
arguments).

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Context information while invoking proposal

Maxime HAMM

Hi Andrew

 

Thank you for the sample project !

 

I will work on the 2 issues issue later i have a bigger problem :

I'm working on the getStatementAndExpressionProposals method... I need some information that are not present inside the context or any other parameter :

ð  What is the Method name on wich I’m calling code completion ?

ð  I am inside parenthesis or inside the in-line statement ?

ð  What parameter are already set ? Which methods are define in the in-line statement ?

 

Here is a sample code of my "SJS" DSL :

 

split_horizontal('Project-comments.view',

      right: 'Comment-with-image.pane',

      icon: 'comment-32x32.png',

      cascadingModels: true)

      {

            left {

                  table (parent:'Project-comments.table', actionMap:'projectCommentsActionMap')

            }    

      }

 

Regards,

Maxime

 

 

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : dimanche 16 mai 2010 07:00
À : [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific DSL

 

 

> 1. Is it possible to exclude from proposals anything but the List returned

> by the getStatementAndExpressionProposals method ?

>   I mean all Java and Groovy proposal stuff wich are not allowed when using

> my DSL...

There is a jira issue opened for this and it includes a patch, but the

patch was never completed.

 

http://jira.codehaus.org/browse/GRECLIPSE-595

 

If you are interested, feel free to re-submit a patch for this issue.

 

> 2. How can i avoid arguments filling when using content assist on a method ?

> 

>   I was uncheking the "Fill method arguments " in eclipse parameters but it

> doesn't work...

 

There is currently no way to avoid this.  Please raise a jira issue

for this, and I can have the Groovy editor follow almost the same

preference as the Java editor (well, with some differences, the Groovy

editor will fill in the parameter names, not the best guessed

arguments).

 

---------------------------------------------------------------------

To unsubscribe from this list, please visit:

 

    http://xircles.codehaus.org/manage_email

 

 

 

Reply | Threaded
Open this post in threaded view
|

RE: Context information while invoking proposal

Maxime HAMM
In reply to this post by Andrew Eisenberg

Hello

 

I think I cannot go forward without help :

Can you give me some ideas to answer my questions ?

 

About the ongoing discussion on groovy file and classpath :

I also need to use groovy eclipse on file outside the project classpath… my groovy file are used at « build time » not at runtime…

 

Regards

Maxime

 

De : Maxime LaPoste [mailto:[hidden email]]
Envoyé : dimanche 16 mai 2010 23:18
À : '[hidden email]'
Objet : [groovy-eclipse-plugin-dev] Context information while invoking proposal

 

Hi Andrew

 

Thank you for the sample project !

 

I will work on the 2 issues issue later i have a bigger problem :

I'm working on the getStatementAndExpressionProposals method... I need some information that are not present inside the context or any other parameter :

ð  What is the Method name on wich I’m calling code completion ?

ð  I am inside parenthesis or inside the in-line statement ?

ð  What parameter are already set ? Which methods are define in the in-line statement ?

 

Here is a sample code of my "SJS" DSL :

 

split_horizontal('Project-comments.view',

      right: 'Comment-with-image.pane',

      icon: 'comment-32x32.png',

      cascadingModels: true)

      {

            left {

                  table (parent:'Project-comments.table', actionMap:'projectCommentsActionMap')

            }    

      }

 

Regards,

Maxime

 

 

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de Andrew Eisenberg
Envoyé : dimanche 16 mai 2010 07:00
À : [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific DSL

 

 

> 1. Is it possible to exclude from proposals anything but the List returned

> by the getStatementAndExpressionProposals method ?

>   I mean all Java and Groovy proposal stuff wich are not allowed when using

> my DSL...

There is a jira issue opened for this and it includes a patch, but the

patch was never completed.

 

http://jira.codehaus.org/browse/GRECLIPSE-595

 

If you are interested, feel free to re-submit a patch for this issue.

 

> 2. How can i avoid arguments filling when using content assist on a method ?

> 

>   I was uncheking the "Fill method arguments " in eclipse parameters but it

> doesn't work...

 

There is currently no way to avoid this.  Please raise a jira issue

for this, and I can have the Groovy editor follow almost the same

preference as the Java editor (well, with some differences, the Groovy

editor will fill in the parameter names, not the best guessed

arguments).

 

---------------------------------------------------------------------

To unsubscribe from this list, please visit:

 

    http://xircles.codehaus.org/manage_email

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Context information while invoking proposal

Andrew Eisenberg
In reply to this post by Andrew Eisenberg
Sorry, this dropped through my inbox...

None of this information is directly available, but you may be able to
calculate it from the context that you are in.  So, presumably, you
would like to see what arguments have already been filled in so that
you can propose the remaining arguments.  You need to find the method
call surrounding the content assist invocation that you are currently
int.

To do this, try the following:

1. Use a FindSurroundingNode to get the surrounding ASTNode.
2. If this is not a method call, then iterate until you find it (I
could imagine baking in this kind of logic into the visitor itself,
but I haven't done it...).
3. Now, you have the MethodCallExpression.  You can find the method
being called and the arguments that are sent to it.
4. And to find the methods called/declared inside of the closure,
you'd need to walk the closure to find them.


On Thu, May 20, 2010 at 1:56 PM, Maxime LaPoste <[hidden email]> wrote:

> Hello
>
>
>
> I think I cannot go forward without help :
>
> Can you give me some ideas to answer my questions ?
>
>
>
> About the ongoing discussion on groovy file and classpath :
>
> I also need to use groovy eclipse on file outside the project classpath… my
> groovy file are used at « build time » not at runtime…
>
>
>
> Regards
>
> Maxime
>
>
>
> De : Maxime LaPoste [mailto:[hidden email]]
> Envoyé : dimanche 16 mai 2010 23:18
>
> À : '[hidden email]'
> Objet : [groovy-eclipse-plugin-dev] Context information while invoking
> proposal
>
>
>
> Hi Andrew
>
>
>
> Thank you for the sample project !
>
>
>
> I will work on the 2 issues issue later i have a bigger problem :
>
> I'm working on the getStatementAndExpressionProposals method... I need some
> information that are not present inside the context or any other parameter :
>
> ð  What is the Method name on wich I’m calling code completion ?
>
> ð  I am inside parenthesis or inside the in-line statement ?
>
> ð  What parameter are already set ? Which methods are define in the in-line
> statement ?
>
>
>
> Here is a sample code of my "SJS" DSL :
>
>
>
> split_horizontal('Project-comments.view',
>
>       right: 'Comment-with-image.pane',
>
>       icon: 'comment-32x32.png',
>
>       cascadingModels: true)
>
>       {
>
>             left {
>
>                   table (parent:'Project-comments.table',
> actionMap:'projectCommentsActionMap')
>
>             }
>
>       }
>
>
>
> Regards,
>
> Maxime
>
>
>
>
>
> -----Message d'origine-----
> De : [hidden email] [mailto:[hidden email]] De la
> part de Andrew Eisenberg
> Envoyé : dimanche 16 mai 2010 07:00
> À : [hidden email]
> Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for specific
> DSL
>
>
>
>
>
>> 1. Is it possible to exclude from proposals anything but the List returned
>
>> by the getStatementAndExpressionProposals method ?
>
>>   I mean all Java and Groovy proposal stuff wich are not allowed when
>> using
>
>> my DSL...
>
> There is a jira issue opened for this and it includes a patch, but the
>
> patch was never completed.
>
>
>
> http://jira.codehaus.org/browse/GRECLIPSE-595
>
>
>
> If you are interested, feel free to re-submit a patch for this issue.
>
>
>
>> 2. How can i avoid arguments filling when using content assist on a method
>> ?
>
>>
>
>>   I was uncheking the "Fill method arguments " in eclipse parameters but
>> it
>
>> doesn't work...
>
>
>
> There is currently no way to avoid this.  Please raise a jira issue
>
> for this, and I can have the Groovy editor follow almost the same
>
> preference as the Java editor (well, with some differences, the Groovy
>
> editor will fill in the parameter names, not the best guessed
>
> arguments).
>
>
>
> ---------------------------------------------------------------------
>
> To unsubscribe from this list, please visit:
>
>
>
>     http://xircles.codehaus.org/manage_email
>
>
>
>
>
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Context information while invoking proposal

Maxime HAMM

Hello
Andrew, have you any proposition for my issues bellow ?
Regards,
Maxime

-----Message d'origine-----

Hi Andrew.

Thank you for your help, my complétion proposal now works pretty well.

The main issue for me now is that my Jspresso SJS proposals are hidden  
by Java and Groovy proposals...
- how is working the proposal ordering ? What should I do to be sure  
Jspresso SJS proposals will always be above?
- is it possible to add a new boolean method into the extension point  
class that Will return true if proposals should replace orher  
proposals ?

Regards,
Maxime


Envoyé de mon iPhone

Le 21 mai 2010 à 01:44, Andrew Eisenberg <[hidden email]> a  
écrit :

>
> Sorry, this dropped through my inbox...
>
> None of this information is directly available, but you may be able to
> calculate it from the context that you are in.  So, presumably, you
> would like to see what arguments have already been filled in so that
> you can propose the remaining arguments.  You need to find the method
> call surrounding the content assist invocation that you are currently
> int.
>
> To do this, try the following:
>
> 1. Use a FindSurroundingNode to get the surrounding ASTNode.
> 2. If this is not a method call, then iterate until you find it (I
> could imagine baking in this kind of logic into the visitor itself,
> but I haven't done it...).
> 3. Now, you have the MethodCallExpression.  You can find the method
> being called and the arguments that are sent to it.
> 4. And to find the methods called/declared inside of the closure,
> you'd need to walk the closure to find them.
>
>
> On Thu, May 20, 2010 at 1:56 PM, Maxime LaPoste <[hidden email]
> > wrote:
>> Hello
>>
>>
>>
>> I think I cannot go forward without help :
>>
>> Can you give me some ideas to answer my questions ?
>>
>>
>>
>> About the ongoing discussion on groovy file and classpath :
>>
>> I also need to use groovy eclipse on file outside the project  
>> classpath… my
>> groovy file are used at « build time » not at runtime…
>>
>>
>>
>> Regards
>>
>> Maxime
>>
>>
>>
>> De : Maxime LaPoste [mailto:[hidden email]]
>> Envoyé : dimanche 16 mai 2010 23:18
>>
>> À : '[hidden email]'
>> Objet : [groovy-eclipse-plugin-dev] Context information while  
>> invoking
>> proposal
>>
>>
>>
>> Hi Andrew
>>
>>
>>
>> Thank you for the sample project !
>>
>>
>>
>> I will work on the 2 issues issue later i have a bigger problem :
>>
>> I'm working on the getStatementAndExpressionProposals method... I  
>> need some
>> information that are not present inside the context or any other  
>> parameter :
>>
>> ð  What is the Method name on wich I’m calling code completion ?
>>
>> ð  I am inside parenthesis or inside the in-line statement ?
>>
>> ð  What parameter are already set ? Which methods are define in th
>> e in-line
>> statement ?
>>
>>
>>
>> Here is a sample code of my "SJS" DSL :
>>
>>
>>
>> split_horizontal('Project-comments.view',
>>
>>       right: 'Comment-with-image.pane',
>>
>>       icon: 'comment-32x32.png',
>>
>>       cascadingModels: true)
>>
>>       {
>>
>>             left {
>>
>>                   table (parent:'Project-comments.table',
>> actionMap:'projectCommentsActionMap')
>>
>>             }
>>
>>       }
>>
>>
>>
>> Regards,
>>
>> Maxime
>>
>>
>>
>>
>>
>> -----Message d'origine-----
>> De : [hidden email] [mailto:[hidden email]]  
>> De la
>> part de Andrew Eisenberg
>> Envoyé : dimanche 16 mai 2010 07:00
>> À : [hidden email]
>> Objet : Re: [groovy-eclipse-plugin-dev] Groovy eclipse plugin for  
>> specific
>> DSL
>>
>>
>>
>>
>>
>>> 1. Is it possible to exclude from proposals anything but the List  
>>> returned
>>
>>> by the getStatementAndExpressionProposals method ?
>>
>>>   I mean all Java and Groovy proposal stuff wich are not allowed  
>>> when
>>> using
>>
>>> my DSL...
>>
>> There is a jira issue opened for this and it includes a patch, but  
>> the
>>
>> patch was never completed.
>>
>>
>>
>> http://jira.codehaus.org/browse/GRECLIPSE-595
>>
>>
>>
>> If you are interested, feel free to re-submit a patch for this issue.
>>
>>
>>
>>> 2. How can i avoid arguments filling when using content assist on  
>>> a method
>>> ?
>>
>>>
>>
>>>   I was uncheking the "Fill method arguments " in eclipse  
>>> parameters but
>>> it
>>
>>> doesn't work...
>>
>>
>>
>> There is currently no way to avoid this.  Please raise a jira issue
>>
>> for this, and I can have the Groovy editor follow almost the same
>>
>> preference as the Java editor (well, with some differences, the  
>> Groovy
>>
>> editor will fill in the parameter names, not the best guessed
>>
>> arguments).
>>
>>
>>
>> ---------------------------------------------------------------------
>>
>> To unsubscribe from this list, please visit:
>>
>>
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Context information while invoking proposal

Andrew Eisenberg
In reply to this post by Andrew Eisenberg
> - how is working the proposal ordering ? What should I do to be sure
> Jspresso SJS proposals will always be above?

Be sure to set the relevance of your proposals to be high (> 5000) so
that they appear towards the top.  You may need to experiment a bit to
see what works best.

> - is it possible to add a new boolean method into the extension point
> class that Will return true if proposals should replace orher
> proposals ?

Perhaps.  I'd need to see a use case and a patch for this.  Can you
raise a jira and describe exactly what you'd like to see?

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Context information while invoking proposal

Maxime HAMM

Thank you.

- How to change relevance for GroovyMethodProposal like GroovyFieldProposal
? GroovyMethodProposal has no "relevance" argument...

- I'm trying to install all Groovy-eclipse project... i would like analyse
the code and try to implement my proposition (a boolean method for
extending/replacing proposals)...
I checked out all projects at
http://svn.codehaus.org/groovy/trunk/groovy/ide/groovy-eclipse ... Some
projects doesn't compile due to missing "bin-groovy" lib... can you help me
please ?

Regards,
Maxime

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la
part de Andrew Eisenberg
Envoyé : mercredi 26 mai 2010 21:56
À : [hidden email]
Objet : Re: [groovy-eclipse-plugin-dev] Context information while invoking
proposal


> - how is working the proposal ordering ? What should I do to be sure
> Jspresso SJS proposals will always be above?

Be sure to set the relevance of your proposals to be high (> 5000) so
that they appear towards the top.  You may need to experiment a bit to
see what works best.

> - is it possible to add a new boolean method into the extension point
> class that Will return true if proposals should replace orher
> proposals ?

Perhaps.  I'd need to see a use case and a patch for this.  Can you
raise a jira and describe exactly what you'd like to see?

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

    http://xircles.codehaus.org/manage_email






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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Context information while invoking proposal

Andrew Eisenberg
In reply to this post by Andrew Eisenberg
You should sub-class GroovyMethodProposal and GroovyFieldProposal and
override the getRelevance methods.

As for checking out Groovy-Eclipse, you are using the wrong svn
repository. That is v1 of the plugin.  The repo has moved.

See the tutorial here:

http://groovy.codehaus.org/Getting+Started+With+Greclipse+Source+Code

It is a bit rough, but it should be enough to get you started.  Let me
know if you have any problems with it.

On Wed, May 26, 2010 at 2:05 PM, Maxime LaPoste <[hidden email]> wrote:

>
> Thank you.
>
> - How to change relevance for GroovyMethodProposal like GroovyFieldProposal
> ? GroovyMethodProposal has no "relevance" argument...
>
> - I'm trying to install all Groovy-eclipse project... i would like analyse
> the code and try to implement my proposition (a boolean method for
> extending/replacing proposals)...
> I checked out all projects at
> http://svn.codehaus.org/groovy/trunk/groovy/ide/groovy-eclipse ... Some
> projects doesn't compile due to missing "bin-groovy" lib... can you help me
> please ?
>
> Regards,
> Maxime
>
> -----Message d'origine-----
> De : [hidden email] [mailto:[hidden email]] De la
> part de Andrew Eisenberg
> Envoyé : mercredi 26 mai 2010 21:56
> À : [hidden email]
> Objet : Re: [groovy-eclipse-plugin-dev] Context information while invoking
> proposal
>
>
>> - how is working the proposal ordering ? What should I do to be sure
>> Jspresso SJS proposals will always be above?
>
> Be sure to set the relevance of your proposals to be high (> 5000) so
> that they appear towards the top.  You may need to experiment a bit to
> see what works best.
>
>> - is it possible to add a new boolean method into the extension point
>> class that Will return true if proposals should replace orher
>> proposals ?
>
> Perhaps.  I'd need to see a use case and a patch for this.  Can you
> raise a jira and describe exactly what you'd like to see?
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

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

    http://xircles.codehaus.org/manage_email


12