mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
completion in interfaces: avoid default/static combination
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -477,12 +477,6 @@ public class JavaKeywordCompletion {
|
||||
for (String s : ModifierChooser.getKeywords(position)) {
|
||||
result.consume(new OverrideableSpace(createKeyword(position, s), TailType.HUMBLE_SPACE_BEFORE_WORD));
|
||||
}
|
||||
if (PsiUtil.isLanguageLevel8OrHigher(position)) {
|
||||
PsiClass containingClass = PsiTreeUtil.getParentOfType(position, PsiClass.class);
|
||||
if (containingClass != null && containingClass.isInterface()) {
|
||||
result.consume(new OverrideableSpace(createKeyword(position, PsiKeyword.DEFAULT), TailType.HUMBLE_SPACE_BEFORE_WORD));
|
||||
}
|
||||
}
|
||||
|
||||
result.consume(new OverrideableSpace(createKeyword(position, PsiKeyword.CLASS), TailType.HUMBLE_SPACE_BEFORE_WORD));
|
||||
if (PsiTreeUtil.getParentOfType(position, PsiCodeBlock.class, true, PsiMember.class) == null) {
|
||||
|
||||
@@ -51,13 +51,13 @@ public class ModifierChooser {
|
||||
|
||||
private static final String[][] INTERFACE_9_MEMBER_MODIFIERS = {
|
||||
{PsiKeyword.PUBLIC, PsiKeyword.PROTECTED, PsiKeyword.PRIVATE},
|
||||
{PsiKeyword.STATIC},
|
||||
{PsiKeyword.STATIC, PsiKeyword.DEFAULT},
|
||||
{PsiKeyword.FINAL, PsiKeyword.ABSTRACT}
|
||||
};
|
||||
|
||||
private static final String[][] INTERFACE_8_MEMBER_MODIFIERS = {
|
||||
{PsiKeyword.PUBLIC, PsiKeyword.PROTECTED},
|
||||
{PsiKeyword.STATIC},
|
||||
{PsiKeyword.STATIC, PsiKeyword.DEFAULT},
|
||||
{PsiKeyword.FINAL, PsiKeyword.ABSTRACT}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user