Fixed script tag and removed unneeded content AST node

This commit is contained in:
Sergey
2017-02-14 15:49:54 -08:00
parent 9bf6c4d3cc
commit d7e89d2498
7 changed files with 101 additions and 133 deletions

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@ import net.sourceforge.pmd.lang.ast.JavaCharStream;
import net.sourceforge.pmd.lang.vf.ast.VfParserTokenManager;
/**
* JSP Token Manager implementation.
* VF Token Manager implementation.
*/
public class VfTokenManager implements TokenManager {
private final VfParserTokenManager tokenManager;

View File

@ -1,26 +0,0 @@
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
/* Generated By:JJTree: Do not edit this line. ASTContent.java */
package net.sourceforge.pmd.lang.vf.ast;
import net.sourceforge.pmd.lang.vf.ast.VfParser;
import net.sourceforge.pmd.lang.vf.ast.VfParserVisitor;
public class ASTContent extends AbstractVFNode {
public ASTContent(int id) {
super(id);
}
public ASTContent(VfParser p, int id) {
super(p, id);
}
/**
* Accept the visitor. *
*/
public Object jjtAccept(VfParserVisitor visitor, Object data) {
return visitor.visit(this, data);
}
}

View File

@ -17,10 +17,6 @@ public class VfParserVisitorAdapter implements VfParserVisitor {
return visit((VfNode) node, data);
}
public Object visit(ASTContent node, Object data) {
return visit((VfNode) node, data);
}
public Object visit(ASTText node, Object data) {
return visit((VfNode) node, data);
}

View File

@ -18,7 +18,6 @@ import net.sourceforge.pmd.lang.vf.ast.ASTAttributeValue;
import net.sourceforge.pmd.lang.vf.ast.ASTCData;
import net.sourceforge.pmd.lang.vf.ast.ASTCommentTag;
import net.sourceforge.pmd.lang.vf.ast.ASTCompilationUnit;
import net.sourceforge.pmd.lang.vf.ast.ASTContent;
import net.sourceforge.pmd.lang.vf.ast.ASTDeclaration;
import net.sourceforge.pmd.lang.vf.ast.ASTDoctypeDeclaration;
import net.sourceforge.pmd.lang.vf.ast.ASTDoctypeExternalId;
@ -60,10 +59,6 @@ public abstract class AbstractVFRule extends AbstractRule implements VfParserVis
return visit((VfNode) node, data);
}
public Object visit(ASTContent node, Object data) {
return visit((VfNode) node, data);
}
public Object visit(ASTText node, Object data) {
return visit((VfNode) node, data);
}

View File

@ -9,7 +9,6 @@ import net.sourceforge.pmd.lang.vf.ast.ASTAttributeValue;
import net.sourceforge.pmd.lang.vf.ast.ASTCData;
import net.sourceforge.pmd.lang.vf.ast.ASTCommentTag;
import net.sourceforge.pmd.lang.vf.ast.ASTCompilationUnit;
import net.sourceforge.pmd.lang.vf.ast.ASTContent;
import net.sourceforge.pmd.lang.vf.ast.ASTDeclaration;
import net.sourceforge.pmd.lang.vf.ast.ASTDoctypeDeclaration;
import net.sourceforge.pmd.lang.vf.ast.ASTDoctypeExternalId;
@ -28,12 +27,6 @@ public class BasicVFTestRule extends AbstractVFRule {
return super.visit(node, data);
}
@Override
public Object visit(ASTContent node, Object data) {
// TODO Auto-generated method stub
return super.visit(node, data);
}
@Override
public Object visit(ASTText node, Object data) {
// TODO Auto-generated method stub

View File

@ -6,15 +6,24 @@ Parse the code
]]></description>
<expected-problems>0</expected-problems>
<code><![CDATA[
<html>
{!jobInfo}
<apex:attribute required="true" assignTo="{!jobClassNameProp + 'text'}" />
<script>
var x = '{!someVar}';
</script>
</html>]]></code>
<apex:page action="{!init}">
<apex:includeScript value='{!before}'/>
{!outOfElement}
<div>{!inElement}</div>
<script type="text/javascript">
window.SalesEdge = {
record: {
id: '{!CASESAFEID($CurrentPage.parameters.id)}',
type: 'contact'
}
}
window.NamespacePrefix = '{!namespace}';
</script>
</apex:page>
]]></code>
<source-type>vf</source-type>
</test-code>
</test-data>