mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
don't suggest 'this' keyword in java comments
This commit is contained in:
@@ -551,6 +551,10 @@ public class JavaCompletionData extends JavaAwareCompletionData{
|
||||
@Override
|
||||
public void fillCompletions(CompletionParameters parameters, CompletionResultSet result) {
|
||||
final PsiElement position = parameters.getPosition();
|
||||
if (PsiTreeUtil.getParentOfType(position, PsiComment.class, false) != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SUPER_OR_THIS_PATTERN.accepts(position)) {
|
||||
if (AFTER_DOT.accepts(position) && !isInsideQualifierClass(position)) return;
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
class Foo {
|
||||
{
|
||||
int[] x = new int[]{ // th<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -355,6 +355,8 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNoThisInComment() throws Throwable { doAntiTest() }
|
||||
|
||||
public void testLastExpressionInFor() throws Throwable { doTest(); }
|
||||
|
||||
public void testUndoCommonPrefixOnHide() throws Throwable {//actually don't undo
|
||||
|
||||
Reference in New Issue
Block a user