My use case is fine right now. Using positionRef solved the lost
position problem.
@Laszlo, I'm curious about your statement:
You might also check how the editor handles the reload, and try to
improve the caret persistence situation.
What needs to be improved? Is there a multiple caret problem? In my
mind, the open questions are about what should happen, that's a UI issue
with possible compatibility considerations. Is there an open issue :-)
I posted this info to save what I learned.
I do think adding the CES.RELOADED event adds something that's missing
and allows things to be handled outside of the core.
Anyway, I've offered what I can at this point. Marking it as done in my
mind.
About the "reload it" message, I'd forgotten about it. Guess I stopped
modifying dirty files externally.
-ernie
On 6/10/22 9:00 AM, Laszlo Kishalmi wrote:
Well Ernie,
I wish someone would have the knowledge to answer your questions,
though I fear, that you need to rediscover what is happening, and if
that does not satisfy your use cases, try to come up with a PR to fix it.
As a tip, how I came up with the location of the code: I've searched
for "Reload it?" string in the ide cluster in java files and in
property files, to find the bundle key for the reload message. Then I
just searched for the bundle key in the java code.
On 6/10/22 17:52, Ernie Rael wrote:
On 6/9/22 7:56 PM, Ernie Rael wrote:
On 6/9/22 6:52 AM, Laszlo Kishalmi wrote:
You might also check how the editor handles the reload, and try to
improve the caret persistence situation.
Took another look this morning. Currently looks something like this
1. In DocumentOpenClose preReloadInEDT() is captures the carets from
all the open editor panes into reloadCaretOffsets.
2. After the reload, in AtomicLockedRun() thread, it creates java
Positions in new document using the saved caret offsets.
3. Then in EDT set the caret in any editors that hold that document
with the saved Positions.
The offset of caret is preserved from old to new doc. I'd guess
that's not what's wanted. But what are the desired semantics?
IMO, at step 1, create PositionRef of the caret offset, eliminate
step 2, step 3 restore from the saved positionRefs.
Questions/issues
1. Would this change in behavior be OK?
2. Don't think there's any locking issues
3. Hasn't multiple carets/editor been introduced? What has to happen
around this?
-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
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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