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

I like Eclipse quick fixes. I often use the assignment parameter for a new field, but I would really like to configure it to not include the final keyword. (GWT RPC does not serialize leaf fields, and now I am doing a lot of GWT RPC.)

I could not find a parameter that controls this quickfix. Is there a parameter that I am missing, or do I need to delve into the plugin development docs and create my own β€œnon-final field” quickfix?

I am using Eclipse 3.4

UPDATE - put the answer to the extension point of the marker resolution as accepted, since it looks like there is no configuration in the setting.

+3
source share
5 answers

The easy way is to expand 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>

Further information is available on the Eclipse Wiki.

0
source

Use Eclipse Save Actions for the Java editor.

Go to the window β†’ Settings β†’ Java β†’ Editor β†’ Save Actions Check "Perform selected actions when saving" Check "Additional actions" Add the next action "Add final modifier to private fields"

See attached screenshot.

Eclipse save action

+2
source

, hokey, :

Quickfix , ; , . , ( ), quickfix . .

, hokey, , , .

0

Eclipse 3.4, "final".

Eclipse 3.4 , ( ) (, ...)

Perhaps you can turn it off ...

0
source

Source: https://habr.com/ru/post/1713303/


All Articles