Syntax highlighting for hash keys

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

Syntax highlighting for hash keys

René Scheibe
I was wondering if the string literals when initializing a map should be
of the same color as other strings.

Example:

def key1 = 'blah'
def key2 = 'blub'
def map1 = [(key1): '1', key2: '2']

Highlight 'key2' the same color as the string '1' and '2'.

I am asking because I see confused people again and again in my teams.
They think that when using key2, the value 'blub' is used as map key
instead of the string literal 'key2'.

Any comments?

Regards,
René Scheibe

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Syntax highlighting for hash keys

Andrew Eisenberg
Good question.  I think this is something that the broader community
would have a better perspective on than just us groovy-eclipse
developers.

On Wed, Nov 3, 2010 at 6:47 AM, René Scheibe
<[hidden email]> wrote:

> I was wondering if the string literals when initializing a map should be
> of the same color as other strings.
>
> Example:
>
> def key1 = 'blah'
> def key2 = 'blub'
> def map1 = [(key1): '1', key2: '2']
>
> Highlight 'key2' the same color as the string '1' and '2'.
>
> I am asking because I see confused people again and again in my teams.
> They think that when using key2, the value 'blub' is used as map key
> instead of the string literal 'key2'.
>
> Any comments?
>
> Regards,
> René Scheibe
>
> ---------------------------------------------------------------------
> 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