2

In the answers to How to implement a 'generate getter/setter' for a Java Class in emacs? there are several YASnippets that solve the problem of generating setters and getters as you create instance variables in Java. However, neither appropriately handles sorting of setter and getter methods as they are created. For instance, if you have two instance variables and add a third between the current declarations the setter and getter methods will end up directly after the second instance variable with the declaration of the third instance variable following the methods. Is there a way to write a YASnippet such that it will insert the setters and getters at the appropriate place, i.e. with the same sorting as the declarations of instance variables?

Community
  • 1
  • 1
N.N.
  • 8,336
  • 12
  • 54
  • 94
  • @wvxvw Indeed, that is why I am trying to come up with a reasonable minimal setup without JDEE. JDEE was even dropped by the Ubuntu repos after Oeinric. – N.N. Oct 15 '12 at 14:29

0 Answers0