Skip to content

Commit

Permalink
tweak so it compiles under latest intellij
Browse files Browse the repository at this point in the history
  • Loading branch information
parrt committed May 11, 2017
1 parent 2d588d9 commit 56ef5d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion intellij-plugin-v4.iml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<sourceFolder url="file://$MODULE_DIR$/resources/templates" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="jdk" jdkName="IntelliJ IDEA Community Edition IC-172.SNAPSHOT" jdkType="IDEA JDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
Expand Down
17 changes: 10 additions & 7 deletions src/java/org/antlr/intellij/plugin/psi/MyPsiUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,16 @@ public Iterator<PsiElement> iterator() {
};
}

static Predicate<PsiElement> includeElementTypes(final TokenSet tokenSet){
return new Predicate<PsiElement>() {

@Override
public boolean apply(@Nullable PsiElement input) {
if(input==null) return false;
ASTNode node = input.getNode();
static Predicate<PsiElement> includeElementTypes(final TokenSet tokenSet){
return new Predicate<PsiElement>() {
@Override
public boolean test(@javax.annotation.Nullable PsiElement input) {
return this.apply(input);
}
@Override
public boolean apply(@Nullable PsiElement input) {
if(input==null) return false;
ASTNode node = input.getNode();
if(node==null)return false;
return tokenSet.contains(node.getElementType());
}
Expand Down

0 comments on commit 56ef5d4

Please sign in to comment.