Unexpected completion using 2.8.0

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

Unexpected completion using 2.8.0

Maxime HAMM
Hello

I'm testing the GRECLIPSE milestone (2.8 version to check if the JSPRESSO plugin still works well.

There is one little issue : new completions appeared since version 2.8... and I'm unable to filter them using the "org.codehaus.groovy.eclipse.codeassist.completion.completionProposalFilter" extension point.
Here they are :
  - surround with closure, 
  - for..in loop
  - if statement,
  ...

Do I have something new to do or is it a GRECLIPSE issue ?

Thank you,
Kind regards,
Maxime 


Reply | Threaded
Open this post in threaded view
|

Re: Unexpected completion using 2.8.0

Andrew Eisenberg
Those are editor templates and they are new to groovy-eclipse 2.8.0.  They are created using a different mechanism than regular proposals.  I should probably add an option to disable templates in the editor, but that's not available right now.  I may also be able to extend the completionProposalFilter extension point to give you some control over that. 

For now, though, I'm not sure of the best workaround.  Are you using a custom editor?  If so, you can edit the editor configuration so that it also filters out these proposals.  I think this would work for a temporary fix:

https://github.com/groovy/groovy-eclipse/blob/master/ide/org.codehaus.groovy.eclipse.ui/src/org/codehaus/groovy/eclipse/editor/GroovyConfiguration.java#L141

Add an extra clause to the if test to filter out the "org.eclipse.jdt.ui.defaultProposalCategory" category.  This would only work if you are providing your own sub-class of GroovyConfiguration to the editor. There may be other things you can do, though.


On Thu, Jul 4, 2013 at 2:31 PM, Maxime HAMM <[hidden email]> wrote:
Hello

I'm testing the GRECLIPSE milestone (2.8 version to check if the JSPRESSO plugin still works well.

There is one little issue : new completions appeared since version 2.8... and I'm unable to filter them using the "org.codehaus.groovy.eclipse.codeassist.completion.completionProposalFilter" extension point.
Here they are :
  - surround with closure, 
  - for..in loop
  - if statement,
  ...

Do I have something new to do or is it a GRECLIPSE issue ?

Thank you,
Kind regards,
Maxime 



Reply | Threaded
Open this post in threaded view
|

Re: Unexpected completion using 2.8.0

Andrew Eisenberg


On Thu, Jul 4, 2013 at 3:25 PM, Andrew Eisenberg <[hidden email]> wrote:
Those are editor templates and they are new to groovy-eclipse 2.8.0.  They are created using a different mechanism than regular proposals.  I should probably add an option to disable templates in the editor, but that's not available right now.  I may also be able to extend the completionProposalFilter extension point to give you some control over that. 

For now, though, I'm not sure of the best workaround.  Are you using a custom editor?  If so, you can edit the editor configuration so that it also filters out these proposals.  I think this would work for a temporary fix:

https://github.com/groovy/groovy-eclipse/blob/master/ide/org.codehaus.groovy.eclipse.ui/src/org/codehaus/groovy/eclipse/editor/GroovyConfiguration.java#L141

Add an extra clause to the if test to filter out the "org.eclipse.jdt.ui.defaultProposalCategory" category.  This would only work if you are providing your own sub-class of GroovyConfiguration to the editor. There may be other things you can do, though.


On Thu, Jul 4, 2013 at 2:31 PM, Maxime HAMM <[hidden email]> wrote:
Hello

I'm testing the GRECLIPSE milestone (2.8 version to check if the JSPRESSO plugin still works well.

There is one little issue : new completions appeared since version 2.8... and I'm unable to filter them using the "org.codehaus.groovy.eclipse.codeassist.completion.completionProposalFilter" extension point.
Here they are :
  - surround with closure, 
  - for..in loop
  - if statement,
  ...

Do I have something new to do or is it a GRECLIPSE issue ?

Thank you,
Kind regards,
Maxime 




Reply | Threaded
Open this post in threaded view
|

Re: Unexpected completion using 2.8.0

Maxime HAMM
Hello Andrew
No I'm not using a custom Editor, it is the groovy one... extending the "completionProposalFilter" extension point seams fine for me. Will you please plan to do that ?
Kind regards
Maxime

Le 5 juil. 2013 à 00:37, Andrew Eisenberg <[hidden email]> a écrit :



On Thu, Jul 4, 2013 at 3:25 PM, Andrew Eisenberg <[hidden email]> wrote:
Those are editor templates and they are new to groovy-eclipse 2.8.0.  They are created using a different mechanism than regular proposals.  I should probably add an option to disable templates in the editor, but that's not available right now.  I may also be able to extend the completionProposalFilter extension point to give you some control over that. 

For now, though, I'm not sure of the best workaround.  Are you using a custom editor?  If so, you can edit the editor configuration so that it also filters out these proposals.  I think this would work for a temporary fix:

https://github.com/groovy/groovy-eclipse/blob/master/ide/org.codehaus.groovy.eclipse.ui/src/org/codehaus/groovy/eclipse/editor/GroovyConfiguration.java#L141

Add an extra clause to the if test to filter out the "org.eclipse.jdt.ui.defaultProposalCategory" category.  This would only work if you are providing your own sub-class of GroovyConfiguration to the editor. There may be other things you can do, though.


On Thu, Jul 4, 2013 at 2:31 PM, Maxime HAMM <[hidden email]> wrote:
Hello

I'm testing the GRECLIPSE milestone (2.8 version to check if the JSPRESSO plugin still works well.

There is one little issue : new completions appeared since version 2.8... and I'm unable to filter them using the "org.codehaus.groovy.eclipse.codeassist.completion.completionProposalFilter" extension point.
Here they are :
  - surround with closure, 
  - for..in loop
  - if statement,
  ...

Do I have something new to do or is it a GRECLIPSE issue ?

Thank you,
Kind regards,
Maxime 


<PastedGraphic-4.png>