Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320861 - JSP EL can not be parsed correctly during editing in JSP editor
Summary: JSP EL can not be parsed correctly during editing in JSP editor
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.4   Edit
Assignee: Rakesh CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-26 01:07 EDT by Jack Liu CLA
Modified: 2011-04-13 14:53 EDT (History)
3 users (show)

See Also:
nsand.dev: review+


Attachments
patch (1.10 KB, patch)
2010-07-27 05:24 EDT, Rakesh CLA
nsand.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Liu CLA 2010-07-26 01:07:39 EDT
Build Identifier: 20100617-1415

Code like:
<button>
${<cursor position>} //EL region
</button>
When removing '}' and adding '}' again, the EL region can not be recognized correctly.

In this way, the region type is JSP EL

Then follow this way:
1. Remove the "}"
It is not a valid EL region.
the type would be xml_content

2. Add the "}" again
It is a valid EL region.
but the type would still be xml_content, instead of JSP EL

It will cause the different proposals for same jsp content.

The reason is that parser will only update the xml Content region's start and length, instead of creating a new JSP EL region.

Reproducible: Always

Steps to Reproduce:
1. Code like:
<button>
${<cursor position>} //EL region
</button>

2.Remove the "}"
It is not a valid EL region.
the type would be xml_content

3.Add the "}" again
It is a valid EL region.
but the type would still be xml_content, instead of JSP EL


It will cause the different proposals for same jsp content.

The reason is that parser will only update the xml Content region's start and length, instead of creating a new JSP EL region.
Comment 1 Rakesh CLA 2010-07-27 05:24:21 EDT
Created attachment 175297 [details]
patch

This is a more general problem.As soon as EL region is destroyed either by deleting '}' or '${', it is will not be reparsed correctly even if we correct EL region.I have done changes which will reparse whole document if EL region is destroyed or corrected.It will cause more-than-needed reparsing in some of the cases.
Comment 2 Nick Sandonato CLA 2011-04-13 14:53:48 EDT
Code checked in. Thanks, Rakesh.