Skip to content

Commit e037037

Browse files
authored
Merge pull request #319 from Haehnchen/feature/phpdoctag
use direct interface for "com.jetbrains.php.lang.psi.stubs.PhpStubElementType phpDocTag" access to fix member field issue (EAP)
2 parents 175e578 + 0de81e2 commit e037037

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/main/java/de/espend/idea/php/annotation/completion/PhpAnnotationCompletionConfidence.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.intellij.psi.PsiWhiteSpace;
77
import com.intellij.util.ThreeState;
88
import com.jetbrains.php.lang.documentation.phpdoc.lexer.PhpDocTokenTypes;
9+
import com.jetbrains.php.lang.documentation.phpdoc.parser.BasicPhpDocStubElementTypes;
910
import com.jetbrains.php.lang.documentation.phpdoc.parser.PhpDocElementTypes;
1011
import com.jetbrains.php.lang.documentation.phpdoc.psi.PhpDocComment;
1112
import com.jetbrains.php.lang.patterns.PhpPatterns;
@@ -52,7 +53,7 @@ public ThreeState shouldSkipAutopopup(@NotNull PsiElement contextElement, @NotNu
5253
}
5354

5455
// @<|>
55-
if(PhpPatterns.psiElement(PhpDocElementTypes.phpDocTag).accepts(context)) {
56+
if(PhpPatterns.psiElement(BasicPhpDocStubElementTypes.phpDocTag).accepts(context)) {
5657
return ThreeState.NO;
5758
}
5859

src/main/java/de/espend/idea/php/annotation/pattern/AnnotationPattern.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.intellij.util.ProcessingContext;
1010
import com.jetbrains.php.lang.PhpLanguage;
1111
import com.jetbrains.php.lang.documentation.phpdoc.lexer.PhpDocTokenTypes;
12+
import com.jetbrains.php.lang.documentation.phpdoc.parser.BasicPhpDocStubElementTypes;
1213
import com.jetbrains.php.lang.documentation.phpdoc.parser.PhpDocElementTypes;
1314
import com.jetbrains.php.lang.documentation.phpdoc.psi.PhpDocComment;
1415
import com.jetbrains.php.lang.documentation.phpdoc.psi.PhpDocPsiElement;
@@ -75,7 +76,7 @@ public boolean accepts(@NotNull PsiElement psiElement, ProcessingContext process
7576

7677
)
7778
.inside(PlatformPatterns
78-
.psiElement(PhpDocElementTypes.phpDocTag)
79+
.psiElement(BasicPhpDocStubElementTypes.phpDocTag)
7980
)
8081
.withLanguage(PhpLanguage.INSTANCE);
8182
}
@@ -103,7 +104,7 @@ public static ElementPattern<PsiElement> getTextIdentifier() {
103104
.withParent(PlatformPatterns
104105
.psiElement(PhpDocElementTypes.phpDocAttributeList)
105106
.withParent(PlatformPatterns
106-
.psiElement(PhpDocElementTypes.phpDocTag)
107+
.psiElement(BasicPhpDocStubElementTypes.phpDocTag)
107108
)
108109
)
109110
);
@@ -145,7 +146,7 @@ public static PsiElementPattern.Capture<PsiElement> getDefaultPropertyValue() {
145146
.withParent(PlatformPatterns.psiElement(StringLiteralExpression.class).withParent(PlatformPatterns
146147
.psiElement(PhpDocElementTypes.phpDocAttributeList)
147148
.withParent(PlatformPatterns
148-
.psiElement(PhpDocElementTypes.phpDocTag)
149+
.psiElement(BasicPhpDocStubElementTypes.phpDocTag)
149150
)
150151
))
151152
.withLanguage(PhpLanguage.INSTANCE);
@@ -163,7 +164,7 @@ public static ElementPattern<StringLiteralExpression> getDefaultPropertyValueStr
163164
.withParent(PlatformPatterns
164165
.psiElement(PhpDocElementTypes.phpDocAttributeList)
165166
.withParent(PlatformPatterns
166-
.psiElement(PhpDocElementTypes.phpDocTag)
167+
.psiElement(BasicPhpDocStubElementTypes.phpDocTag)
167168
)
168169
)
169170
.withLanguage(PhpLanguage.INSTANCE);
@@ -181,7 +182,7 @@ public static ElementPattern<StringLiteralExpression> getPropertyValueString() {
181182
.withParent(PlatformPatterns
182183
.psiElement(PhpDocElementTypes.phpDocAttributeList)
183184
.withParent(PlatformPatterns
184-
.psiElement(PhpDocElementTypes.phpDocTag)
185+
.psiElement(BasicPhpDocStubElementTypes.phpDocTag)
185186
)
186187
)
187188
.withLanguage(PhpLanguage.INSTANCE);

0 commit comments

Comments
 (0)