diff options
author | nsandonato | 2011-01-05 20:52:51 +0000 |
---|---|---|
committer | nsandonato | 2011-01-05 20:52:51 +0000 |
commit | 1edff4d65810ab3d717619c5b4ddc4ae8e70ba2c (patch) | |
tree | 332751da95be28a32271a4f65eea57d4e4bfe984 /bundles/org.eclipse.jst.jsp.core/src | |
parent | 8798c67428c933bf3b9016621da1c99b2327d25f (diff) | |
download | webtools.sourceediting-1edff4d65810ab3d717619c5b4ddc4ae8e70ba2c.tar.gz webtools.sourceediting-1edff4d65810ab3d717619c5b4ddc4ae8e70ba2c.tar.xz webtools.sourceediting-1edff4d65810ab3d717619c5b4ddc4ae8e70ba2c.zip |
undo check-in for [332295]
Diffstat (limited to 'bundles/org.eclipse.jst.jsp.core/src')
2 files changed, 15 insertions, 46 deletions
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java index bf31f9f697..f79f43e28c 100644 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java +++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java @@ -1577,7 +1577,7 @@ public class JSPTranslator implements Externalizable { } } else { - checkAllAttributeValueContainers(container,regions); + checkAllAttributeValueContainers(regions); } } } @@ -1588,23 +1588,15 @@ public class JSPTranslator implements Externalizable { * * @param regions */ - private void checkAllAttributeValueContainers(ITextRegionCollection container, Iterator regions) { + private void checkAllAttributeValueContainers(Iterator regions) { // tag name is not jsp // handle embedded jsp attributes... ITextRegion embedded = null; // Iterator attrRegions = null; // ITextRegion attrChunk = null; - ITextRegion prevRegion = null; while (regions.hasNext()) { embedded = (ITextRegion) regions.next(); - if (embedded.getType() == DOMRegionContext.XML_TAG_NAME || embedded.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) { - String fullTagName = container.getText(embedded); - if (fullTagName.indexOf(':') > -1 && !fullTagName.startsWith(JSP_PREFIX)) { - if (prevRegion != null) - addCustomTaglibVariables(fullTagName, container,prevRegion,-1); // it may be a custom tag - } - } - else if (embedded instanceof ITextRegionContainer) { + if (embedded instanceof ITextRegionContainer) { // parse out container // https://bugs.eclipse.org/bugs/show_bug.cgi?id=130606 @@ -1632,7 +1624,6 @@ public class JSPTranslator implements Externalizable { // } // } } - prevRegion = embedded; } } diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java index b2b4952f28..ca663e2b75 100644 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java +++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java @@ -1,4 +1,4 @@ -/* The following code was generated by JFlex 1.2.2 on 12/16/10 12:41 PM */ +/* The following code was generated by JFlex 1.2.2 on 10/29/10 4:24 PM */ /******************************************************************************* * Copyright (c) 2004, 2010 IBM Corporation and others. @@ -36,7 +36,7 @@ import org.eclipse.wst.xml.core.internal.parser.IntStack; /** * This class is a scanner generated by * <a href="http://www.informatik.tu-muenchen.de/~kleing/jflex/">JFlex</a> 1.2.2 - * on 12/16/10 12:41 PM from the specification file + * on 10/29/10 4:24 PM from the specification file * <tt>file:/C:/dev/workspaces/indigo/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/JSPTokenizer.jflex</tt> */ public class JSPTokenizer implements BlockTokenizer, DOMJSPRegionContexts { @@ -1165,9 +1165,6 @@ public class JSPTokenizer implements BlockTokenizer, DOMJSPRegionContexts { // determine if a block tag scan is necessary if (internalContext == XML_TAG_NAME) { internalTagName = yytext(); - if (endTagName != null && endTagName.length() == 0){ - endTagName = internalTagName; - } if(!isNestable(internalTagName)) { internalTagName = null; // snagged a tag name we shouldn't have @@ -1456,27 +1453,16 @@ private final String doScan(String searchString, boolean requireTailSeparator, b return searchContext; } // 4) XML tag - else if(allowTag && checkJSPs && yy_currentPos > searchStringLength && yy_buffer[yy_currentPos - searchStringLength] == '<') { - String buffer = String.copyValueOf(yy_buffer); - int jspSepIndex = buffer.indexOf(':',yy_currentPos ); - if (jspSepIndex >= 0 ){ - int endTagIndex = buffer.indexOf('>', jspSepIndex +1); - if (endTagIndex != -1 && (buffer.indexOf(searchString, jspSepIndex) != (endTagIndex -searchStringLength+1) )){ - fLastInternalBlockStart = yy_markedPos = yy_currentPos - searchStringLength; - yy_currentPos = yy_markedPos + 1; - if(yy_markedPos == yy_startRead) { - int resumeState = yystate(); - yybegin(ST_XML_TAG_NAME); - fStateStack.push(resumeState); - String jspContext = primGetNextToken(); - yybegin(resumeState); - return jspContext; - } - - return searchContext; - } - - + else if(allowTag && checkJSPs && yy_currentPos > searchStringLength && yy_currentPos - searchStringLength != fLastInternalBlockStart && + yy_buffer[yy_currentPos - searchStringLength] == '<') { + fLastInternalBlockStart = yy_markedPos = yy_currentPos - searchStringLength; + yy_currentPos = yy_markedPos + 1; + int resumeState = yystate(); + yybegin(ST_XML_TAG_NAME); + if(yy_markedPos == yy_startRead) { + String jspContext = primGetNextToken(); + yybegin(resumeState); + return jspContext; } return searchContext; } @@ -3488,14 +3474,6 @@ protected final boolean containsTagName(String markerTagName) { { if(Debug.debugTokenizer) dump("\nstart tag open");//$NON-NLS-1$ - if (!fStateStack.empty() && fStateStack.peek()== ST_XML_COMMENT){ - fStateStack.pop(); - fEmbeddedHint = XML_COMMENT_TEXT; - yybegin(ST_XML_TAG_NAME); - String tagName = ""; - assembleEmbeddedTagSequence(XML_TAG_OPEN, tagName); // ? - return PROXY_CONTEXT; - } fEmbeddedHint = XML_TAG_NAME; fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME; yybegin(ST_XML_TAG_NAME); |