Skip to content

Commit

Permalink
Merge branch 'pr-489'
Browse files Browse the repository at this point in the history
  • Loading branch information
jsotuyod committed Aug 12, 2017
2 parents 8fc1cc5 + df0eba6 commit 39250fc
Show file tree
Hide file tree
Showing 54 changed files with 1,188 additions and 199 deletions.
51 changes: 40 additions & 11 deletions pmd-apex/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,47 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>apex</groupId>
<artifactId>apex-jorje-ide</artifactId>
<version>1.0-sfdc-187-SNAPSHOT-55042bfc2e</version>
</dependency>
<dependency>
<groupId>apex</groupId>
<artifactId>apex-jorje-data</artifactId>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
</dependency>

<dependency>
<groupId>apex</groupId>
<artifactId>apex-jorje-semantic</artifactId>
<version>1.0-sfdc-187-SNAPSHOT-55042bfc2e</version>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>apex</groupId>
<artifactId>apex-jorje-ide</artifactId>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
</dependency>

<dependency>
<groupId>apex</groupId>
<artifactId>apex-jorje-parser</artifactId>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
</dependency>

<dependency>
<groupId>apex</groupId>
<artifactId>apex-jorje-semantic</artifactId>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
</dependency>

<dependency>
<groupId>apex</groupId>
<artifactId>apex-jorje-services</artifactId>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
</dependency>

<dependency>
<groupId>apex</groupId>
<artifactId>apex-jorje-tools</artifactId>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>22.0</version>
</dependency>

<dependency>
<groupId>org.antlr</groupId>
Expand Down
42 changes: 35 additions & 7 deletions pmd-apex/repo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,49 @@ Apex Reference:

In order to add a the jar files to the local repo, use the following commands:

mvn install:install-file -Dfile=path/to/apex-jorje-ide-1.0-sfdc-187-SNAPSHOT.jar \
mvn install:install-file -Dfile=apex-jorje-data-1.0-sfdc-224-SNAPSHOT.jar \
-DgroupId=apex \
-DartifactId=apex-jorje-data \
-Dversion=1.0-sfdc-224-SNAPSHOT \
-Dpackaging=jar \
-DlocalRepositoryPath=./repo

mvn install:install-file -Dfile=apex-jorje-ide-1.0-sfdc-224-SNAPSHOT.jar \
-DgroupId=apex \
-DartifactId=apex-jorje-ide \
-Dversion=1.0-sfdc-187-SNAPSHOT \
-Dversion=1.0-sfdc-224-SNAPSHOT-3083815933 \
-Dpackaging=jar \
-DlocalRepositoryPath=./repo

mvn install:install-file -Dfile=path/to/apex-jorje-semantic-1.0-sfdc-187-SNAPSHOT-tests.jar \
mvn install:install-file -Dfile=apex-jorje-parser-1.0-sfdc-224-SNAPSHOT.jar \
-DgroupId=apex \
-DartifactId=apex-jorje-parser \
-Dversion=1.0-sfdc-224-SNAPSHOT-3083815933 \
-Dpackaging=jar \
-DlocalRepositoryPath=./repo

mvn install:install-file -Dfile=apex-jorje-semantic-1.0-sfdc-224-SNAPSHOT.jar \
-DgroupId=apex \
-DartifactId=apex-jorje-semantic \
-Dversion=1.0-sfdc-187-SNAPSHOT \
-Dclassifier=tests \
-Dversion=1.0-sfdc-224-SNAPSHOT-3083815933 \
-Dpackaging=jar \
-DlocalRepositoryPath=./repo

mvn install:install-file -Dfile=apex-jorje-services-1.0-sfdc-224-SNAPSHOT.jar \
-DgroupId=apex \
-DartifactId=apex-jorje-services \
-Dversion=1.0-sfdc-224-SNAPSHOT-3083815933 \
-Dpackaging=jar \
-DlocalRepositoryPath=./repo

mvn install:install-file -Dfile=apex-jorje-tools-1.0-sfdc-224-SNAPSHOT.jar \
-DgroupId=apex \
-DartifactId=apex-jorje-tools \
-Dversion=1.0-sfdc-224-SNAPSHOT-3083815933 \
-Dpackaging=jar \
-DlocalRepositoryPath=./repo


For the PMD 5.5.0 Release, the versions from
<https://github.com/forcedotcom/idecore/tree/55042bfc2ebeb4c9f38c445b577c3bdd6a18fc5a/com.salesforce.ide.apex.core/lib>
For the PMD 6.0.0 Release, the versions from
<https://github.com/forcedotcom/idecore/tree/3083815933c2d015d03417986f57bd25786d58ce/com.salesforce.ide.apex.core/lib>
have been taken.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>apex</groupId>
<artifactId>apex-jorje-data</artifactId>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
<description>POM was created from install:install-file</description>
</project>
12 changes: 12 additions & 0 deletions pmd-apex/repo/apex/apex-jorje-data/maven-metadata-local.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>apex</groupId>
<artifactId>apex-jorje-data</artifactId>
<versioning>
<release>1.0-sfdc-224-SNAPSHOT-3083815933</release>
<versions>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
</versions>
<lastUpdated>20170629193627</lastUpdated>
</versioning>
</metadata>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>apex</groupId>
<artifactId>apex-jorje-ide</artifactId>
<version>1.0-sfdc-187-SNAPSHOT-55042bfc2e</version>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
<description>POM was created from install:install-file</description>
</project>
6 changes: 3 additions & 3 deletions pmd-apex/repo/apex/apex-jorje-ide/maven-metadata-local.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<groupId>apex</groupId>
<artifactId>apex-jorje-ide</artifactId>
<versioning>
<release>1.0-sfdc-187-SNAPSHOT-55042bfc2e</release>
<release>1.0-sfdc-224-SNAPSHOT-3083815933</release>
<versions>
<version>1.0-sfdc-187-SNAPSHOT-55042bfc2e</version>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
</versions>
<lastUpdated>20160625150218</lastUpdated>
<lastUpdated>20170629193403</lastUpdated>
</versioning>
</metadata>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>apex</groupId>
<artifactId>apex-jorje-parser</artifactId>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
<description>POM was created from install:install-file</description>
</project>
12 changes: 12 additions & 0 deletions pmd-apex/repo/apex/apex-jorje-parser/maven-metadata-local.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>apex</groupId>
<artifactId>apex-jorje-parser</artifactId>
<versioning>
<release>1.0-sfdc-224-SNAPSHOT-3083815933</release>
<versions>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
</versions>
<lastUpdated>20170629193645</lastUpdated>
</versioning>
</metadata>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>apex</groupId>
<artifactId>apex-jorje-semantic</artifactId>
<version>1.0-sfdc-187-SNAPSHOT-55042bfc2e</version>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
<description>POM was created from install:install-file</description>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<groupId>apex</groupId>
<artifactId>apex-jorje-semantic</artifactId>
<versioning>
<release>1.0-sfdc-187-SNAPSHOT-55042bfc2e</release>
<release>1.0-sfdc-224-SNAPSHOT-3083815933</release>
<versions>
<version>1.0-sfdc-187-SNAPSHOT-55042bfc2e</version>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
</versions>
<lastUpdated>20160625150226</lastUpdated>
<lastUpdated>20170629193659</lastUpdated>
</versioning>
</metadata>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>apex</groupId>
<artifactId>apex-jorje-services</artifactId>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
<description>POM was created from install:install-file</description>
</project>
12 changes: 12 additions & 0 deletions pmd-apex/repo/apex/apex-jorje-services/maven-metadata-local.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>apex</groupId>
<artifactId>apex-jorje-services</artifactId>
<versioning>
<release>1.0-sfdc-224-SNAPSHOT-3083815933</release>
<versions>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
</versions>
<lastUpdated>20170629193717</lastUpdated>
</versioning>
</metadata>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>apex</groupId>
<artifactId>apex-jorje-tools</artifactId>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
<description>POM was created from install:install-file</description>
</project>
12 changes: 12 additions & 0 deletions pmd-apex/repo/apex/apex-jorje-tools/maven-metadata-local.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>apex</groupId>
<artifactId>apex-jorje-tools</artifactId>
<versioning>
<release>1.0-sfdc-224-SNAPSHOT-3083815933</release>
<versions>
<version>1.0-sfdc-224-SNAPSHOT-3083815933</version>
</versions>
<lastUpdated>20170629193730</lastUpdated>
</versioning>
</metadata>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import apex.jorje.semantic.ast.statement.BlockStatement;

public class ASTBlockStatement extends AbstractApexNode<BlockStatement> {
private boolean curlyBrace;

public ASTBlockStatement(BlockStatement blockStatement) {
super(blockStatement);
Expand All @@ -15,4 +16,21 @@ public ASTBlockStatement(BlockStatement blockStatement) {
public Object jjtAccept(ApexParserVisitor visitor, Object data) {
return visitor.visit(this, data);
}

public boolean hasCurlyBrace() {
return curlyBrace;
}

@Override
protected void handleSourceCode(final String source) {
if (!hasRealLoc()) {
return;
}

// check, whether the this block statement really begins with a curly brace
// unfortunately, for-loop and if-statements always contain a block statement,
// regardless whether curly braces where present or not.
char firstChar = source.charAt(node.getLoc().startIndex);
curlyBrace = firstChar == '{';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/

package net.sourceforge.pmd.lang.apex.ast;

import apex.jorje.semantic.ast.expression.CastExpression;

public class ASTCastExpression extends AbstractApexNode<CastExpression> {

public ASTCastExpression(CastExpression node) {
super(node);
}

public Object jjtAccept(ApexParserVisitor visitor, Object data) {
return visitor.visit(this, data);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/

package net.sourceforge.pmd.lang.apex.ast;

import apex.jorje.semantic.ast.compilation.ConstructorPreamble;

public class ASTConstructorPreamble extends AbstractApexNode<ConstructorPreamble> {

public ASTConstructorPreamble(ConstructorPreamble node) {
super(node);
}

public Object jjtAccept(ApexParserVisitor visitor, Object data) {
return visitor.visit(this, data);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/

package net.sourceforge.pmd.lang.apex.ast;

import apex.jorje.semantic.ast.expression.IllegalStoreExpression;

public class ASTIllegalStoreExpression extends AbstractApexNode<IllegalStoreExpression> {

public ASTIllegalStoreExpression(IllegalStoreExpression node) {
super(node);
}

public Object jjtAccept(ApexParserVisitor visitor, Object data) {
return visitor.visit(this, data);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/

package net.sourceforge.pmd.lang.apex.ast;

import apex.jorje.semantic.ast.statement.MethodBlockStatement;

public class ASTMethodBlockStatement extends AbstractApexNode<MethodBlockStatement> {

public ASTMethodBlockStatement(MethodBlockStatement node) {
super(node);
}

public Object jjtAccept(ApexParserVisitor visitor, Object data) {
return visitor.visit(this, data);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

package net.sourceforge.pmd.lang.apex.ast;

import apex.jorje.semantic.tester.TestNode;
import apex.jorje.semantic.ast.modifier.Modifier;

public class ASTTestNode extends AbstractApexNode<TestNode> {
public class ASTModifier extends AbstractApexNode<Modifier> {

public ASTTestNode(TestNode testNode) {
super(testNode);
public ASTModifier(Modifier node) {
super(node);
}

public Object jjtAccept(ApexParserVisitor visitor, Object data) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/

package net.sourceforge.pmd.lang.apex.ast;

import apex.jorje.semantic.ast.statement.MultiStatement;

public class ASTMultiStatement extends AbstractApexNode<MultiStatement> {

public ASTMultiStatement(MultiStatement node) {
super(node);
}

public Object jjtAccept(ApexParserVisitor visitor, Object data) {
return visitor.visit(this, data);
}
}
Loading

0 comments on commit 39250fc

Please sign in to comment.