*/
private void translateEmbeddedJSPInAttribute(ITextRegionCollection embeddedContainer) {
// THIS METHOD IS A FIX FOR
// jsp embedded in attribute regions
// loop all regions
ITextRegionList embeddedRegions = embeddedContainer.getRegions();
ITextRegion delim = null;
ITextRegion content = null;
String type = null;
String quotetype = null;
for (int i = 0; i < embeddedRegions.size(); i++) {
// possible delimiter, check later
delim = embeddedRegions.get(i);
type = delim.getType();
if (type == DOMRegionContext.XML_TAG_NAME ) {
String fullTagName = embeddedContainer.getText(delim);
if (fullTagName.indexOf(':') > -1 && !fullTagName.startsWith(JSP_PREFIX)) {
ITextRegion prevRegion =null;
if (i>0)
prevRegion = embeddedRegions.get(i-1);
addCustomTaglibVariables(fullTagName, embeddedContainer,prevRegion,i+1); // it may be a custom tag
}
}
if(type == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_DQUOTE || type == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_SQUOTE
|| type == DOMJSPRegionContexts.JSP_TAG_ATTRIBUTE_VALUE_DQUOTE || type == DOMJSPRegionContexts.JSP_TAG_ATTRIBUTE_VALUE_SQUOTE)
quotetype = type;
// check next region to see if it's content
if (i + 1 < embeddedRegions.size()) {
String regionType = embeddedRegions.get(i + 1).getType();
if (regionType == DOMJSPRegionContexts.JSP_CONTENT || regionType == DOMJSPRegionContexts.JSP_EL_CONTENT)
content = embeddedRegions.get(i + 1);
}
if (content != null) {
int contentStart = embeddedContainer.getStartOffset(content);
int rStart = fCurrentNode.getStartOffset() + contentStart;