Map parameter name completion for DSLD

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

Map parameter name completion for DSLD

Kohsuke Kawaguchi

Oftentimes in Groovy DSL one defines a Java signature like
foo(Map,Closure) and invoke this like "foo(abc:1,def:2) {...}".

Markup builders use this extensively, and DSLD scripts themselves use
this in defining methods and properties, like these:

>             method isStatic: true, name: prop.name, params: [blank:Boolean], useNamedArgs:true
>             method isStatic: true, name: prop.name, params: [creditCard:Boolean], useNamedArgs:true
>             method isStatic: true, name: prop.name, params: [email:Boolean], useNamedArgs:true

Now, I'd like to be able to provide auto-completion for those map
parameter names ("isStatic", "name", and "params" in above example.) I
know the expected types of these, which parameters are mandatory, etc.

As I understand it, currently there's no mechanism to do this. Would it
be hard to add this?

--
Kohsuke Kawaguchi                          http://kohsuke.org/

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Map parameter name completion for DSLD

Andrew Eisenberg
Hi,

So, my understanding is that you would like content assist for named
parameters inside of method calls.  Like this:

foo(blar, /*here*/)

You would like to see all possible parameters at /*here*/.  As you
mentioned, this is not yet possible, but it is something that we could
add.  Could you please raise a jira issue for this?
http://jira.codehaus.org/browse/GRECLIPSE



On Fri, Jun 17, 2011 at 4:44 PM, Kohsuke Kawaguchi <[hidden email]> wrote:

>
> Oftentimes in Groovy DSL one defines a Java signature like foo(Map,Closure)
> and invoke this like "foo(abc:1,def:2) {...}".
>
> Markup builders use this extensively, and DSLD scripts themselves use this
> in defining methods and properties, like these:
>
>>            method isStatic: true, name: prop.name, params:
>> [blank:Boolean], useNamedArgs:true
>>            method isStatic: true, name: prop.name, params:
>> [creditCard:Boolean], useNamedArgs:true
>>            method isStatic: true, name: prop.name, params:
>> [email:Boolean], useNamedArgs:true
>
> Now, I'd like to be able to provide auto-completion for those map parameter
> names ("isStatic", "name", and "params" in above example.) I know the
> expected types of these, which parameters are mandatory, etc.
>
> As I understand it, currently there's no mechanism to do this. Would it be
> hard to add this?
>
> --
> Kohsuke Kawaguchi                          http://kohsuke.org/
>
> ---------------------------------------------------------------------
> 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: Map parameter name completion for DSLD

Skeptic .

+1 for adding that feature, without it I'm not yet convinced to put the efforts needed to create a DSLD.

> Date: Mon, 20 Jun 2011 09:21:45 -0700

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [groovy-eclipse-plugin-dev] Map parameter name completion for DSLD
>
> Hi,
>
> So, my understanding is that you would like content assist for named
> parameters inside of method calls. Like this:
>
> foo(blar, /*here*/)
>
> You would like to see all possible parameters at /*here*/. As you
> mentioned, this is not yet possible, but it is something that we could
> add. Could you please raise a jira issue for this?
> http://jira.codehaus.org/browse/GRECLIPSE
>
>
>
> On Fri, Jun 17, 2011 at 4:44 PM, Kohsuke Kawaguchi <[hidden email]> wrote:
> >
> > Oftentimes in Groovy DSL one defines a Java signature like foo(Map,Closure)
> > and invoke this like "foo(abc:1,def:2) {...}".
> >
> > Markup builders use this extensively, and DSLD scripts themselves use this
> > in defining methods and properties, like these:
> >
> >>            method isStatic: true, name: prop.name, params:
> >> [blank:Boolean], useNamedArgs:true
> >>            method isStatic: true, name: prop.name, params:
> >> [creditCard:Boolean], useNamedArgs:true
> >>            method isStatic: true, name: prop.name, params:
> >> [email:Boolean], useNamedArgs:true
> >
> > Now, I'd like to be able to provide auto-completion for those map parameter
> > names ("isStatic", "name", and "params" in above example.) I know the
> > expected types of these, which parameters are mandatory, etc.
> >
> > As I understand it, currently there's no mechanism to do this. Would it be
> > hard to add this?
> >
> > --
> > Kohsuke Kawaguchi                          http://kohsuke.org/
> >
> > ---------------------------------------------------------------------
> > 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: Map parameter name completion for DSLD

Andrew Eisenberg
In reply to this post by Andrew Eisenberg
Thanks.  After the 2.5.1 release (which is coming up at the end of
this month) we will be planning for the 2.5.2 release  (which may be
renamed to 2.6.0).

On Tue, Jun 21, 2011 at 9:47 AM, Kohsuke Kawaguchi
<[hidden email]> wrote:

>
> Filed http://jira.codehaus.org/browse/GRECLIPSE-1092
>
> On 06/20/2011 09:21 AM, Andrew Eisenberg wrote:
>>
>> Hi,
>>
>> So, my understanding is that you would like content assist for named
>> parameters inside of method calls.  Like this:
>>
>> foo(blar, /*here*/)
>>
>> You would like to see all possible parameters at /*here*/.  As you
>> mentioned, this is not yet possible, but it is something that we could
>> add.  Could you please raise a jira issue for this?
>> http://jira.codehaus.org/browse/GRECLIPSE
>>
>>
>>
>> On Fri, Jun 17, 2011 at 4:44 PM, Kohsuke Kawaguchi<[hidden email]>  wrote:
>>>
>>>  Oftentimes in Groovy DSL one defines a Java signature like
>>> foo(Map,Closure)
>>>  and invoke this like "foo(abc:1,def:2) {...}".
>>>
>>>  Markup builders use this extensively, and DSLD scripts themselves use
>>> this
>>>  in defining methods and properties, like these:
>>>
>>>>             method isStatic: true, name: prop.name, params:
>>>>  [blank:Boolean], useNamedArgs:true
>>>>             method isStatic: true, name: prop.name, params:
>>>>  [creditCard:Boolean], useNamedArgs:true
>>>>             method isStatic: true, name: prop.name, params:
>>>>  [email:Boolean], useNamedArgs:true
>>>
>>>  Now, I'd like to be able to provide auto-completion for those map
>>> parameter
>>>  names ("isStatic", "name", and "params" in above example.) I know the
>>>  expected types of these, which parameters are mandatory, etc.
>>>
>>>  As I understand it, currently there's no mechanism to do this. Would it
>>> be
>>>  hard to add this?
>>>
>>>  --
>>>  Kohsuke Kawaguchi                          http://kohsuke.org/
>>>
>>>  ---------------------------------------------------------------------
>>>  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
>>
>>
>>
>
>
> --
> Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/
>

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

    http://xircles.codehaus.org/manage_email