inconsistency between document and displayed text in JavaScript editor [message #531522] |
Wed, 05 May 2010 10:03 |
Harald Finster Messages: 37 Registered: July 2009 |
Member |
|
|
Hello,
can anybody please give me a hint how to track the following problem?
I have a RCP application with a MultiPageEditor which consists of
a GEF based graphical editor and a JavaScript editor.
The graphical editor manipulates the JavaScript code via
document.replace(...)
In some cases I observe that the code displayed in the JavaScript
editor does not reflect the manipulation performed via "replace".
However, it seems that the underlying document has been modified because
1) if the code in the document is correct but the code displayed
is incorrect, no error marker is set in the editor
2) if I open the same document with "open with JavaScript Editor"
simultaneously, the "stand alone" JavaScript editor displays the
correct code.
Example:
Original code: var x = "Hello";
Execute a
replace( <location at the end of Hello> , 0 , "x" )
from the GEF based editor
should result in: var x = "Hellox";
The "stand alone" JavaScript editor displays this correct result.
The JavaScript editor which is part of the MultiPage editor displays
var x = "Hellox (missing closing double-quotes)
It does not indicate the missing quotes as an error.
If I type in the missing quotes manually, the editor complains
that the string is not properly closed by double-quotes.
(It certainly talks about the second string opened by the 3rd quot,
because internally it seems to "see" the code var x = "Hellox"" ;
Any ideas?
I am working with WTP 3.1, Eclipse 3.5.0, JSDT 1.1.1
Thanks for any hint.
With kind regards
Harald Finster
|
|
|
Powered by
FUDForum. Page generated in 0.02395 seconds