eclipseeclipse-indigo

Eclipse Indigo "Save Actions" are not being applied


I'm new to Eclipse and downloaded the following version: Eclipse Java EE IDE for Web Developers. Version: Indigo Release Build id: 20110615-0604

[edit] Eclipse Platform Version 3.7

I have edited Java > Editor > Save Actions to do the following: Remove trailing white spaces on all lines, Correct indentation

When I save the .java file, those actions are not applied... is this a bug? Found this that might be related: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350475


Solution

  • Well for those of you who have found this topic... I did find 2 solutions, no thanks to Eclipse, other than the fact that it is open source and people can write plugins.

    Eclipse Platform Version 3.7

    1. AnyEdit - plugin that does it for you when you Save file (I believe this is what eclipse SHOULD be doing)
    2. Go to: Window > Preferences. Then under General > Keys. Make sure drop down for Scheme: is Default and enter 'remove trailing' in the filter. You should then see "Remove Trailing Whitespace" under the command column. Bind it to your own key command.

    The only drawback to #2 is that you have to actually press the key binding while editing the file, kindof like a cleanup action.

    Too bad Eclipse hasn't taken the approach that ALL file types should be configurable in this way... sometimes I miss TextPad.