Play with Java Files Method in "Groovy" (Auto Completion)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Play with Java Files Method in "Groovy" (Auto Completion)

Alex D. Fleming-2
Hello ,

Can we use the Auto Completion Feature on the Java Class Methods in Groovy
files ?
Suppose I want to call the "getPartyName" of PartyHelper.java class.

So If I import the package by  "import org.ofbiz.party.party.*;" in my
*.groovy file then
How can I enable auto completion feature that works(by Ctrl + Space) on Java
files that I imported previously in Eclipse IDE?
I already installed Groovy Plugin in Eclipse but as I found its not working
for me.

Please Help.

--
Alex D. Fleming
Reply | Threaded
Open this post in threaded view
|

Re: Play with Java Files Method in "Groovy" (Auto Completion)

David E Jones

You have to declare/cast types in order for the plugin to figure it out.

In other words if you do this:

GenericValue party = delegator.findOne(...);

then you'll get auto-completion on "party.", but if you do this:

party = delegator.findOne(...);

you won't. In other words, the plugin could be smarter but at the  
minute it seems not to be.

-David


On Jun 2, 2008, at 4:52 AM, Alex D. Fleming wrote:

> Hello ,
>
> Can we use the Auto Completion Feature on the Java Class Methods in  
> Groovy
> files ?
> Suppose I want to call the "getPartyName" of PartyHelper.java class.
>
> So If I import the package by  "import org.ofbiz.party.party.*;" in my
> *.groovy file then
> How can I enable auto completion feature that works(by Ctrl + Space)  
> on Java
> files that I imported previously in Eclipse IDE?
> I already installed Groovy Plugin in Eclipse but as I found its not  
> working
> for me.
>
> Please Help.
>
> --
> Alex D. Fleming

Reply | Threaded
Open this post in threaded view
|

Re: Play with Java Files Method in "Groovy" (Auto Completion)

Alex D. Fleming-2
David,

Thanks for the pointer.

The second option don't look feasible to have in real life.
Although If first feature is their then I think we are fine for now.


On Mon, Jun 2, 2008 at 12:24 PM, David E Jones <[hidden email]>
wrote:

>
> You have to declare/cast types in order for the plugin to figure it out.
>
> In other words if you do this:
>
> GenericValue party = delegator.findOne(...);
>
> then you'll get auto-completion on "party.", but if you do this:
>
> party = delegator.findOne(...);
>
> you won't. In other words, the plugin could be smarter but at the minute it
> seems not to be.
>
> -David
>
>
>
> On Jun 2, 2008, at 4:52 AM, Alex D. Fleming wrote:
>
>  Hello ,
>>
>> Can we use the Auto Completion Feature on the Java Class Methods in Groovy
>> files ?
>> Suppose I want to call the "getPartyName" of PartyHelper.java class.
>>
>> So If I import the package by  "import org.ofbiz.party.party.*;" in my
>> *.groovy file then
>> How can I enable auto completion feature that works(by Ctrl + Space) on
>> Java
>> files that I imported previously in Eclipse IDE?
>> I already installed Groovy Plugin in Eclipse but as I found its not
>> working
>> for me.
>>
>> Please Help.
>>
>> --
>> Alex D. Fleming
>>
>
>


--
Regards
Alex D. Fleming