There are two places in Eclipse where you can define code templates:
- Settings → Java → Code Style → Code Templates
- Settings → Java → Editor → Templates
The latter takes a variable ${cursor}to place the cursor somewhere useful. The first does not support this variable. I guess the code style has nothing to do with cursor placement. But I'm not so sure about that.
The problem is that it is not possible to determine the position of the cursor when e. d. adding Javadoc. I use fancy keyboard shortcuts like Alt+ J(with capital J) to generate a Javadoc eclipse. But after that, I always need to move the cursor before I start typing. Is it possible to automate this? If not, I don't get the Alt+ advantage Jover /**(which also generates the correct Javadoc and places (or leaves?) The cursor where it should be).
source
share