https://github.com/apache/netbeans/pull/4249
This PR introduces a property "PROP_RELOADING" with property change events. The PR has been reviewed and polished; a problem is that the event is not currently used in the codebase. I've been using it for weeks with an editor plugin for caret position preservation. I'd like to use it permanently, and experiment with using text context to improve post modifiction accuracy for Postions and Carets; but until it becomes part of NetBeans I can't invest time in it.
The events could be used internally by NetBeans, for example editor lib 2 EditorCaret handling repositioning multiple carets; or it that doesn't seem appropriate, then by EditorKit's; or even as a specific plugin.
I was wondering about marking the property as "devel" to start with, but I haven't seen properties for property change events documented in arch.xml.
Background. When tracking down an issue with a plugin, I discovered CloneableEditorSupport.createPositionRef (which solved my problem); I saw how CES worked to make an effort to preserve swing.textPosition when there is a document reload (it preserves line/col rather than document offset). For carets, it preserves document offset; which doesn't feel as good. In addition, Multiple cursors were introduced and that is not considered; it can't since platform can not depend on ide.
-ernie --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists