Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322045

Summary: [SSE] Syntax error refresh problem
Product: z_Archived Reporter: Gabriel Petrovay <gabipetrovay>
Component: WTP IncubatorAssignee: Lionel Villard <villard>
Status: CLOSED FIXED QA Contact: Gabriel Petrovay <gabipetrovay>
Severity: normal    
Priority: P2 CC: villard
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 322044    

Description Gabriel Petrovay CLA 2010-08-07 05:09:15 EDT
Make sure this is done before bug 322044 such that you can reproduce it.

Steps to reproduce:
1. Write the following query:
let $(: :)x := 123
return 1

2. Delete the XQuery comment and DON'T save the editor
let $x := 123
return 1

An underlining is still shown between '=' and '1'. This disappears when the editor is saved.
Comment 1 Lionel Villard CLA 2010-08-09 11:25:41 EDT
Oops didn't see this bug before fixing 322044. There is indeed a refresh problem, which is I think related to whitespace. I now need another scenario to reproduce this bug.
Comment 2 Gabriel Petrovay CLA 2010-08-10 11:56:35 EDT
I found another one although not as relevant as the previous one. (It might be easier to revert to that version before the commit of the dependent bug and solve this problem as well.)

So the new example:
-----------------------
declare function foo($s as empty-sequence()) {
	1
};

2
-----------------------

a wrong error is shown at the end of the first line (because of Bug 322043).

To make this query correct one has to write "local:" in front of the function name. This shifts the previous error with 6 positions instead of refreshing it properly.
Comment 3 Lionel Villard CLA 2010-08-18 09:28:38 EDT
This is a SSE bug. Temporarily fixed it by copying private methods into XQDTLineStyleProvider.
Comment 4 Lionel Villard CLA 2010-08-18 09:57:16 EDT
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=323024
Comment 5 Gabriel Petrovay CLA 2010-08-25 12:52:16 EDT
Makes it to the 0.8M1 release.