Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 211528 - AT_BEGIN variables don't work properly
Summary: AT_BEGIN variables don't work properly
Status: VERIFIED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 3.0.3   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on: 125366
Blocks:
  Show dependency tree
 
Reported: 2007-11-29 18:06 EST by Amy Wu CLA
Modified: 2008-10-20 02:06 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amy Wu CLA 2007-11-29 18:06:19 EST
It looks like this bug works fine in WTP 1.5.x however, I was able to see the problem reported here in WTP 2.x & WTP 3.x so it looks like a later fix caused a regression with this bug.  Rather than open the old bug since it was fixed in WTP 1.5.x, I'm cloning the bug so that it's open in WTP 3.x.


+++ This bug was initially created as a clone of Bug #125366 +++

[Using Eclipse 3.1.1, build M20050929-0840, JST 1.0.0]

If a tag has a variable declared with <scope>AT_BEGIN</scope>, the variable should have a scope from the open tag to the end of the document. So if tag <foo> creates a variable called bar, this code should work:

<foo></foo>
<%= bar %>

But eclipse doesn't see variable "bar" after the closing tag.

The only way to make it work is to use the short form for the foo tag, like this:

<foo />
<%= bar %>

This works. But there is no workaround if the tag really needs a body to work properly, like this:

<foo>Required Body <%= bar %></foo>
<%= bar %>

In this case, the first "bar" usage is accepted, but the second usage is rejected.
Comment 1 Nitin Dahyabhai CLA 2007-11-29 19:22:50 EST
I can confirm that there is a problem with at_begin variables.  Nested and at_end variables appear to work fine.
Comment 2 Nitin Dahyabhai CLA 2008-10-08 11:06:52 EDT
Should be fixed, now.
Comment 3 Amy Wu CLA 2008-10-20 02:06:39 EDT
verified this works in a recent 303 build