java sanity tests: skip some activities

This commit is contained in:
peter
2018-08-17 15:14:47 +02:00
parent 8db06b1907
commit 1339f214bf
2 changed files with 7 additions and 2 deletions
@@ -65,7 +65,12 @@ class JavaCompletionPolicy extends CompletionPolicy {
@Override
protected boolean shouldSuggestReferenceText(@NotNull PsiReference ref, @NotNull PsiElement target) {
PsiElement refElement = ref.getElement();
if (refElement instanceof PsiJavaCodeReferenceElement &&
if (refElement.getContainingFile().getLanguage().getID().equals("GWT JavaScript")) {
// for GWT class members refs like "MyClass::mmm(I)(1)", lookup items are only a subset of possible reference texts
return false;
}
if (refElement instanceof PsiJavaCodeReferenceElement &&
!shouldSuggestJavaTarget((PsiJavaCodeReferenceElement)refElement, target)) {
return false;
}
@@ -143,7 +143,7 @@ class JavaParenthesesPolicy extends JavaIntentionPolicy {
actionText.matches("Simplify '\\(+(true|false)\\)+' to \\1") ||
// Parenthesizing sub-expression causes cutting the action name at different position, so name changes significantly
actionText.matches("Compute constant value of '.+'") ||
actionText.matches("Replace '-\\(+(.+)\\)' with constant value '-\\1'") ||
actionText.matches("Replace '-\\(+(.+)\\)+' with constant value '-\\1'") ||
// TODO: Remove when IDEA-195235 is fixed
actionText.matches("Suppress .+ in injection") ||
super.shouldSkipIntention(actionText);