Search code examples
javaeclipseeclipse-plugineclipse-pdt

How to configure behavior of the "assign parameter to new field" quickfix in eclipse?


I love Eclipse's quickfixes. I use the "assign parameter to new field" often, but I would very much like to tweak it to not include the final keyword. (GWT RPC doesn't serialize final fields, and I am doing lots of GWT RPC right now.)

I have not been able to find a setting that controls this quickfix. Is there a setting I am missing, or do I need to delve into the plugin development docs and make my own, "non final field" quickfix?

I am using Eclipse 3.4

UPDATE - marked the answer about the marker resolution extension point as accepted, as it looks like there is not a baked in config option.


Solution

  • A not so easy way is to extend the org.eclipse.ui.ide.markerResolution extension point.

    <extension point="org.eclipse.ui.ide.markerResolution">
          <markerResolutionGenerator
             markerType="org.eclipse.core.resources.problemmarker"
             class="org.eclipse.escript.quickfix.QuickFixer"/>
    </extension>
    

    More information is available in the Eclipse Wiki