title: Any way to remove trailing whitespace *FOR EDITED* lines in Eclipse [for Java]?
body: <p>Removing trailing white space for <strong>all lines</strong> has already been answered:
  <a href="https://stackoverflow.com/questions/1043433/how-to-auto-remove-trailing-whitespace-in-eclipse">How to auto-remove trailing whitespace in Eclipse?</a></p>
  
  <p>However, I haven't been able to try to find a way to do so for <strong>only the lines that I edited</strong>. </p>
  
  <p>Please don't mark this as duplicate of the above because the answer is not in the above and the question is now 5 years old and kinda forgotten about.</p>
  
  <p>The reason is that I want to maintain my commits clean, so that you can see which lines I actually edited. Otherwise there is a big mess and you can't tell what I've done.
  I would then deal with remaining trailing whitespace in other commits.</p>
  
  <p>Has anyone been able to do this? </p>
  
  <p>Things tried:</p>
  
  <h3>AnyEdit</h3>
  
  <p>Only has option to remove all lines   </p>
  
  <h3>Eclipse -> Save actions > * > 'remove trailing white spaces on all lines'</h3>
  
  <p>Removes on all lines.</p>
  
  <h3>Eclipse ctrl+3 -> remove white space</h3>
  
  <p>Removes on all lines.</p>