Eclipse - sort participants when saving

I like the eclipse function to save actions , but I can not get rid of one slightly annoying thing. I use sorting elements and methods to save.

It is good that the eclipse moves the element / method to the correct position in alphabetical order.

It's bad when I write a method and save it, eclipse moves the method , but not the current carriage position . So basically, I press CTRL + S and end up in a completely different place than before, so I need to scroll up / down to find the new location of my method.

Is there any workaround?

I am using Eclipse 3.6 Helios atm.

+4
source share
1 answer

It sounds like an error, try sending it on eclipse to this site .
As a workaround - but not the best, you can use Ctrl-O to find the method.
2 additional options:

  • Set //TODO return here on the line you want to return to, then you can filter the task view by a specific todo.
  • Set a breakpoint before saving.

Usually I prefer not to use parameters like this, since when working with another poeple in a large-scale project, this can cause a lot of noise. I mean, if you make changes to an existing file, save it, and then the format. The next step is to transfer this file to the repository. when someone or even you try to study the difference of changes, he will clutter up all formatting and sorting. Therefore, I prefer to do this as an independent change.

+4
source

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


All Articles