1. Open two text editors.
2. Open a file in the 1st and add 3 lines with very valuable text, but don't save
3. Open the same file in the 2nd editor and watch your valuable data in the 1st editor disappear.
4. Close the 2nd editor and then watch all the content in the 1st window disappear.
> 3. Open the same file in the 2nd editor and watch your valuable data in the 1st editor disappear.
This happens because all the editors for the same (file, mimetype) pair share the same Document.
My guess is that when you open the 2nd editor you do a setText() with the contents on the file on disk. This gets propagated to the 1st editor via the shared Document.
> 4. Close the 2nd editor and then watch all the content in the 1st window disappear.
This probably happens because, upon close, you had a setText("") which clears the text? I thought that was removed.
If you do setText("") on the 2nd editor, since they share the Document it will also propagate.
Can you remove the concept of a shared FileObject per mimetype? This is different then 11.0 and it is causing problems. I don't know how big of an impact this will be.
Can you remove the concept of a shared FileObject per mimetype? This is different then 11.0 and it is causing problems. I don't know how big of an impact this will be.
This is the same as Case 1 in issue# 7631. Fixed in 12.0.0-rc-16.
This is the same as Case 1 in issue# 7631. Fixed in 12.0.0-rc-16.
Issue #7667 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build Vincaed 3.0.4.8 |
No time estimate |
2 issue links |
relates to #7668
Issue #7668Closing ADS with a single aquascript file and ADS restart, restores 2 files with same name |
relates to #7631
Issue #7631Issues with Editor with a file under version control: Contents are deleted, Syntax Coloring, Inline Diff Sidebar |
> 3. Open the same file in the 2nd editor and watch your valuable data in the 1st editor disappear.
This happens because all the editors for the same (file, mimetype) pair share the same Document.
My guess is that when you open the 2nd editor you do a setText() with the contents on the file on disk. This gets propagated to the 1st editor via the shared Document.
> 4. Close the 2nd editor and then watch all the content in the 1st window disappear.
This probably happens because, upon close, you had a setText("") which clears the text? I thought that was removed.
If you do setText("") on the 2nd editor, since they share the Document it will also propagate.