Java Mailing List Archive

http://www.gg3721.com/

Home » eclipse-plugin-dev.groovy »

RE: [groovy-eclipse-plugin-dev] Context information while invoking proposal

Maxime HAMM

2010-05-26


Author LoginPost Reply

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 <andrew@(protected)
é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 <Maxime.Hamm@(protected)
> > 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:Maxime.Hamm@(protected)]
>> Envoyé : dimanche 16 mai 2010 23:18
>>
>> À : 'eclipse-plugin-dev@(protected)'
>> 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 : andrew.eisenberg@(protected)]
>> De la
>> part de Andrew Eisenberg
>> Envoyé : dimanche 16 mai 2010 07:00
>> À : eclipse-plugin-dev@(protected)
>> 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


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