You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Ernie Rael <er...@raelity.com> on 2022/06/07 16:17:21 UTC

Detecting file changed externally

Hi all,

When NetBeans detects that a file has been changed externally, it 
updates the file. When this happens, my plugin usually /looses/ its 
javax.swing.text.Positions; they go to offset 0.

How can I get notified or detect that this is about to happen so I can 
try to preserve the marks. Notification that it just happened would be 
better than nothing.

Any hints on how to do this, or suggestions on where to look?

Thanks,
-ernie


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Detecting file changed externally

Posted by Laszlo Kishalmi <la...@gmail.com>.
Maybe this one:

https://github.com/apache/netbeans/blob/d4c991929ac33daf2c8733b0f700e00e0f70acb7/platform/openide.text/src/org/openide/text/CloneableEditorSupport.java#L1701 
?

On 6/9/22 16:48, Ernie Rael wrote:
> Thanks Laszlo,
>
> If I new where it was...
>
> Now that I'll pull my head out of my DataObject, and look at the 
> FileObject, I might have a better clue as to what to look for. I was 
> hoping someone could point to the editor files where the action is 
> happening.
>
> -ernie
>
> 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.
>>
>> On 6/7/22 18:17, Ernie Rael wrote:
>>> Hi all,
>>>
>>> When NetBeans detects that a file has been changed externally, it 
>>> updates the file. When this happens, my plugin usually /looses/ its 
>>> javax.swing.text.Positions; they go to offset 0.
>>>
>>> How can I get notified or detect that this is about to happen so I 
>>> can try to preserve the marks. Notification that it just happened 
>>> would be better than nothing.
>>>
>>> Any hints on how to do this, or suggestions on where to look?
>>>
>>> Thanks,
>>> -ernie
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
>>> For additional commands, e-mail: dev-help@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-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: dev-help@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-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Detecting file changed externally

Posted by Ernie Rael <er...@raelity.com>.
Thanks Laszlo,

If I new where it was...

Now that I'll pull my head out of my DataObject, and look at the 
FileObject, I might have a better clue as to what to look for. I was 
hoping someone could point to the editor files where the action is 
happening.

-ernie

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.
>
> On 6/7/22 18:17, Ernie Rael wrote:
>> Hi all,
>>
>> When NetBeans detects that a file has been changed externally, it 
>> updates the file. When this happens, my plugin usually /looses/ its 
>> javax.swing.text.Positions; they go to offset 0.
>>
>> How can I get notified or detect that this is about to happen so I 
>> can try to preserve the marks. Notification that it just happened 
>> would be better than nothing.
>>
>> Any hints on how to do this, or suggestions on where to look?
>>
>> Thanks,
>> -ernie
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: dev-help@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-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Detecting file changed externally

Posted by Ernie Rael <er...@raelity.com>.
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.
> [snip]
> In DocumentOpenClose around line 761 there is code to preserve caret 
> positions; this code uses positions from Document.createPosition, not 
> positions from CES. It also seems to be using offset. This may be 
> related to the problems with caret positions that you mention. I'm not 
> exactly sure what observed behavior you were referring to.

I just stepped through this code and the exact same offset is saved and 
restored. That code is broken. The only explanation is that the created 
Position is on the doc after reload.

-ernie


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Detecting file changed externally

Posted by Ernie Rael <er...@raelity.com>.
On 6/10/22 8:52 AM, Ernie Rael wrote:
> [snip]
>
> 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?
4. Add CES.RELOADED event and let the carets get fixed up somewhere 
else; maybe in the editor kit? If the event is fired syncrounously in 
the EDT just after the caret is set with the current algorithm.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Detecting file changed externally

Posted by Ernie Rael <er...@raelity.com>.
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-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: dev-help@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-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Detecting file changed externally

Posted by Laszlo Kishalmi <la...@gmail.com>.
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-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Detecting file changed externally

Posted by Ernie Rael <er...@raelity.com>.
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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Detecting file changed externally

Posted by Ernie Rael <er...@raelity.com>.
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.

Laszlo, your pointer into CloneableEditorSupport saved lots of time, 
thanks. The key discovery is that during reload, 
"getPositionManager().documentOpened(openClose.docRef)" is used to 
adjust/fixup "org.openide.text.PositionRef"; PositionRef is an 
implementation of swing.text.Position that come from 
CES.createPositionRef. The positionManager handles adjusting 
PositionRef's from the old document to the new document. There is 
support for persisting PositionRef's.

jVi is swing based, runs standalone, and produces a jar which includes 
handling the persistence of regular swing posistions; the jar is used by 
the NetBeans layer. I'd never heard of a PositionRef, overriding jVi to 
use CES.createPositionRef fixed the jVi problem with reload.

Also, I can now confirm by observation that the CES.PositionRef 
maintains line/column, not offset, between old and new. If the number of 
lines is changed, then the positionRef is wrong by that number of lines; 
if the length of lines is changed, then the positionRef is correct.

In DocumentOpenClose around line 761 there is code to preserve caret 
positions; this code uses positions from Document.createPosition, not 
positions from CES. It also seems to be using offset. This may be 
related to the problems with caret positions that you mention. I'm not 
exactly sure what observed behavior you were referring to.

All these classes are in platform/openide.text/src/org/openide/text

Assuming there is a CES.RELOADED event; this is a way to save/restore 
line/col with caret
1)  FILE CHANGE EVENT
     create PositionRef for each caret's position
2)  CES.RELOADED EVENT
     restore caret position from PositionRef saved in 1).

Note that there is usually many saves in a row from 1). Restore is only 
done rarely with 2).

In any event, it sure seems like a CES.RELOADED EVENT is missing. Could 
it be that the reload code was a later addition and didn't get event 
representation. Or maybe thought that things could be handled 
transparently (famous last words).

Changing how caret is restored would be a behavioral change, but maybe 
that would be OK.

Below are all the events from FileObject, DataObject, 
CloneableEditorSupport. In the 2nd, changing with the editor, the first 
events are when a character is added to the file, the last events are 
when the file is written. The sequence of events ends with a FILE OBJECT 
EVENT.

In the 1st, external change, the only event is a FILE OBJECT EVENT. The 
stack trace shows that it is from a Watcher thread. Events starts with 
the FILE OBJECT EVENT.

======================= external change

FILE OBJECT EVENT: BaseFileObj$FileEventImpl[... ,expected=false]

"Pending refresh :: FILE_CHANGED 
/src/nb/NetBeansProjects/JavaLibrary1/src/play/NewClass.java"
         at 
org.netbeans.modules.jvi.impl.NbBuffer$FoListen.fileChanged(NbBuffer.java:170)
         ...
 >>>     at org.openide.filesystems.FileObject.refresh(FileObject.java:1233)
         at 
org.netbeans.modules.masterfs.watcher.Watcher$1.run(Watcher.java:415)
         at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
         at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
         at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
         at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)


======================= modify/write with editor


CES EVENT: java.beans.PropertyChangeEvent[propertyName=modified;
                 oldValue=false; newValue=true; ]
DATA OBJECT EVENT: java.beans.PropertyChangeEvent[propertyName=modified;
                 oldValue=false; newValue=true; ]
DATA OBJECT EVENT: java.beans.PropertyChangeEvent[propertyName=cookie ]
DATA OBJECT EVENT: java.beans.PropertyChangeEvent[propertyName=cookie ]
CES EVENT: java.beans.PropertyChangeEvent[propertyName=modified;
                 oldValue=true; newValue=false; ]
DATA OBJECT EVENT: java.beans.PropertyChangeEvent[propertyName=modified;
                 oldValue=true; newValue=false ]
FILE OBJECT EVENT: BaseFileObj$FileEventImpl[... ,expected=false]

"AWT-EventQueue-0 :: FILE_CHANGED 
/src/nb/NetBeansProjects/JavaLibrary1/src/play/NewClass.java"
     at 
org.netbeans.modules.jvi.impl.NbBuffer$FoListen.fileChanged(NbBuffer.java:170)
     ...
     at 
org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:568)
     at 
org.netbeans.modules.openide.loaders.SimpleES$SaveCookieImpl.save(SimpleES.java:202)



>
> On 6/7/22 18:17, Ernie Rael wrote:
>> Hi all,
>>
>> When NetBeans detects that a file has been changed externally, it 
>> updates the file. When this happens, my plugin usually /looses/ its 
>> javax.swing.text.Positions; they go to offset 0.
>>
>> How can I get notified or detect that this is about to happen so I 
>> can try to preserve the marks. Notification that it just happened 
>> would be better than nothing.
>>
>> Any hints on how to do this, or suggestions on where to look?
>>
>> Thanks,
>> -ernie
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: dev-help@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-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Detecting file changed externally

Posted by Laszlo Kishalmi <la...@gmail.com>.
You might also check how the editor handles the reload, and try to 
improve the caret persistence situation.

On 6/7/22 18:17, Ernie Rael wrote:
> Hi all,
>
> When NetBeans detects that a file has been changed externally, it 
> updates the file. When this happens, my plugin usually /looses/ its 
> javax.swing.text.Positions; they go to offset 0.
>
> How can I get notified or detect that this is about to happen so I can 
> try to preserve the marks. Notification that it just happened would be 
> better than nothing.
>
> Any hints on how to do this, or suggestions on where to look?
>
> Thanks,
> -ernie
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Detecting file changed externally

Posted by Ernie Rael <er...@raelity.com>.
Thanks John,

I was listening to the DataObject, there is no "PROP_MODIFIED" when this 
happens.

I'll check the FileObject and see what's happening with that. I just 
started browsing the filesystem api docs this morning.

-ernie

On 6/9/22 6:49 AM, John Kostaras wrote:
> Hallo Ernie. Are you aware of the FileObject
> <https://bits.netbeans.org/dev/javadoc/org-openide-filesystems/org/openide/filesystems/FileObject.html>
> class and its FileChageListener
> <https://bits.netbeans.org/dev/javadoc/org-openide-filesystems/org/openide/filesystems/FileChangeListener.html>
> s?
>
> On Tue, Jun 7, 2022 at 7:17 PM Ernie Rael <er...@raelity.com> wrote:
>
>> Hi all,
>>
>> When NetBeans detects that a file has been changed externally, it
>> updates the file. When this happens, my plugin usually /looses/ its
>> javax.swing.text.Positions; they go to offset 0.
>>
>> How can I get notified or detect that this is about to happen so I can
>> try to preserve the marks. Notification that it just happened would be
>> better than nothing.
>>
>> Any hints on how to do this, or suggestions on where to look?
>>
>> Thanks,
>> -ernie
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: dev-help@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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Detecting file changed externally

Posted by John Kostaras <jk...@gmail.com>.
Hallo Ernie. Are you aware of the FileObject
<https://bits.netbeans.org/dev/javadoc/org-openide-filesystems/org/openide/filesystems/FileObject.html>
class and its FileChageListener
<https://bits.netbeans.org/dev/javadoc/org-openide-filesystems/org/openide/filesystems/FileChangeListener.html>
s?

On Tue, Jun 7, 2022 at 7:17 PM Ernie Rael <er...@raelity.com> wrote:

> Hi all,
>
> When NetBeans detects that a file has been changed externally, it
> updates the file. When this happens, my plugin usually /looses/ its
> javax.swing.text.Positions; they go to offset 0.
>
> How can I get notified or detect that this is about to happen so I can
> try to preserve the marks. Notification that it just happened would be
> better than nothing.
>
> Any hints on how to do this, or suggestions on where to look?
>
> Thanks,
> -ernie
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>