This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
It must be possible to adjust caret position from within IndentTask. Currently caret positioning is performed by the infrastructure and there is no way to influence it.
Could you please describe your usecases?
I sometimes need to insert some extra whitespaces/new line characters in the IndentTask and then place the caret in a certain position between them. Now whenever I insert spaces to the document (before or after caret pos) the caret will be positioned at the end. Refer to issue 118616 for a specific example, please give me a call if additional explanation is needed.
for example to to implement the "smart enter" functionality (issue 118616), which looks like this: <tag>|</tag> -> <tag> | </tag> I need to: - detect situation when enter was pressed while caret was directly between opening and closing tag - insert extra new line character - *position the caret just before the extra new line character* - call formatter for the three lines centered in the line where the caret will positioned
This is a P2 since it is blocking 2 high priority indentation issues.
Interestingly this blocks P3 issues.
Should already be fixed by issue 116022.