I'd like to implement some automated method for creating getters and setters for private fields in Java classes, but I'm not having any luck figuring out how to do it.
My first thought was to set a bookmark where new getters and setters would be inserted in the file and then put the cursor on the line declaring the field to be got/set. (Typically, methods and fields are separated by at least a constructor, and usually the methods are declared after fields in the same order that the fields were.) I'm unable to do this because bookmarks aren't exposed as variables to commands/macros/etc. This also doesn't scale if there's more than one bookmark.
Does anyone have any suggestions on how to implement this?
Thanks, B