mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 05:09:37 +07:00
highlight unresolved method call even with unresoolved arguments
This commit is contained in:
@@ -34,6 +34,7 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.fileTypes.StdFileTypes;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleUtil;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
@@ -59,14 +60,13 @@ public class HighlightClassUtil {
|
||||
/**
|
||||
* new ref(...) or new ref(..) { ... } where ref is abstract class
|
||||
*/
|
||||
static HighlightInfo checkAbstractInstantiation(PsiJavaCodeReferenceElement ref) {
|
||||
static HighlightInfo checkAbstractInstantiation(PsiJavaCodeReferenceElement ref, PsiElement resolved) {
|
||||
PsiElement parent = ref.getParent();
|
||||
HighlightInfo highlightInfo = null;
|
||||
if (parent instanceof PsiNewExpression && !PsiUtilBase.hasErrorElementChild(parent)) {
|
||||
if (((PsiNewExpression)parent).getType() instanceof PsiArrayType) return null;
|
||||
PsiElement refElement = ref.resolve();
|
||||
if (refElement instanceof PsiClass) {
|
||||
highlightInfo = checkInstantiationOfAbstractClass((PsiClass)refElement, ref);
|
||||
if (resolved instanceof PsiClass) {
|
||||
highlightInfo = checkInstantiationOfAbstractClass((PsiClass)resolved, ref);
|
||||
}
|
||||
}
|
||||
else if (parent instanceof PsiAnonymousClass
|
||||
@@ -113,12 +113,12 @@ public class HighlightClassUtil {
|
||||
}
|
||||
|
||||
|
||||
public static HighlightInfo checkInstantiationOfAbstractClass(PsiClass aClass, PsiElement highlighElement) {
|
||||
public static HighlightInfo checkInstantiationOfAbstractClass(PsiClass aClass, PsiElement highlightElement) {
|
||||
HighlightInfo errorResult = null;
|
||||
if (aClass.hasModifierProperty(PsiModifier.ABSTRACT)) {
|
||||
String baseClassName = aClass.getName();
|
||||
String message = JavaErrorMessages.message("abstract.cannot.be.instantiated", baseClassName);
|
||||
errorResult = HighlightInfo.createHighlightInfo(HighlightInfoType.ERROR, highlighElement, message);
|
||||
errorResult = HighlightInfo.createHighlightInfo(HighlightInfoType.ERROR, highlightElement, message);
|
||||
if (!aClass.isInterface() && ClassUtil.getAnyAbstractMethod(aClass) == null) {
|
||||
// suggest to make not abstract only if possible
|
||||
IntentionAction fix = QUICK_FIX_FACTORY.createModifierListFix(aClass, PsiModifier.ABSTRACT, false, false);
|
||||
@@ -819,7 +819,7 @@ public class HighlightClassUtil {
|
||||
return reportIllegalEnclosingUsage(placeToSearchEnclosingFrom, aClass, outerClass, expression);
|
||||
}
|
||||
|
||||
public static HighlightInfo checkSuperQualifierType(PsiMethodCallExpression superCall) {
|
||||
public static HighlightInfo checkSuperQualifierType(@NotNull Project project, @NotNull PsiMethodCallExpression superCall) {
|
||||
if (!HighlightUtil.isSuperMethodCall(superCall)) return null;
|
||||
PsiMethod ctr = PsiTreeUtil.getParentOfType(superCall, PsiMethod.class, true, PsiMember.class);
|
||||
if (ctr == null) return null;
|
||||
@@ -828,7 +828,7 @@ public class HighlightClassUtil {
|
||||
PsiExpression qualifier = superCall.getMethodExpression().getQualifierExpression();
|
||||
if (qualifier != null && PsiUtil.isInnerClass(targetClass)) {
|
||||
PsiClass outerClass = targetClass.getContainingClass();
|
||||
PsiClassType outerType = JavaPsiFacade.getInstance(superCall.getProject()).getElementFactory().createType(outerClass);
|
||||
PsiClassType outerType = JavaPsiFacade.getInstance(project).getElementFactory().createType(outerClass);
|
||||
return HighlightUtil.checkAssignability(outerType, null, qualifier, qualifier);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -302,24 +302,16 @@ public class HighlightMethodUtil {
|
||||
static HighlightInfo checkMethodCall(PsiMethodCallExpression methodCall, PsiResolveHelper resolveHelper) {
|
||||
PsiExpressionList list = methodCall.getArgumentList();
|
||||
PsiReferenceExpression referenceToMethod = methodCall.getMethodExpression();
|
||||
JavaResolveResult resolveResult = referenceToMethod.advancedResolve(true);
|
||||
PsiElement element = resolveResult.getElement();
|
||||
JavaResolveResult[] results = referenceToMethod.multiResolve(true);
|
||||
JavaResolveResult resolveResult = results.length == 1 ? results[0] : JavaResolveResult.EMPTY;
|
||||
PsiElement resolved = resolveResult.getElement();
|
||||
|
||||
boolean isDummy = false;
|
||||
boolean isThisOrSuper = referenceToMethod.getReferenceNameElement() instanceof PsiKeyword;
|
||||
if (isThisOrSuper) {
|
||||
// super(..) or this(..)
|
||||
if (list.getExpressions().length == 0) { // implicit ctr call
|
||||
CandidateInfo[] candidates = resolveHelper.getReferencedMethodCandidates(methodCall, true);
|
||||
if (candidates.length == 1 && !candidates[0].getElement().isPhysical()) {
|
||||
isDummy = true;// dummy constructor
|
||||
}
|
||||
}
|
||||
}
|
||||
boolean isDummy = isDummyConstructorCall(methodCall, resolveHelper, list, referenceToMethod);
|
||||
if (isDummy) return null;
|
||||
HighlightInfo highlightInfo;
|
||||
|
||||
if (element instanceof PsiMethod && resolveResult.isValidResult()) {
|
||||
PsiSubstitutor substitutor = resolveResult.getSubstitutor();
|
||||
if (resolved instanceof PsiMethod && resolveResult.isValidResult()) {
|
||||
TextRange fixRange = getFixRange(methodCall);
|
||||
highlightInfo = HighlightUtil.checkUnhandledExceptions(methodCall, fixRange);
|
||||
}
|
||||
@@ -332,13 +324,14 @@ public class HighlightMethodUtil {
|
||||
}
|
||||
|
||||
if (!resolveResult.isAccessible() || !resolveResult.isStaticsScopeCorrect()) {
|
||||
highlightInfo = checkAmbiguousMethodCall(referenceToMethod, list, element, resolveResult, methodCall, resolveHelper);
|
||||
//highlightInfo = checkAmbiguousMethodCall(referenceToMethod, results, list, element, resolveResult, methodCall, resolveHelper);
|
||||
highlightInfo = null;
|
||||
}
|
||||
else if (candidateInfo != null && !candidateInfo.isApplicable()) {
|
||||
if (candidateInfo.isTypeArgumentsApplicable()) {
|
||||
String methodName = HighlightMessageUtil.getSymbolName(element, resolveResult.getSubstitutor());
|
||||
PsiElement parent = element.getParent();
|
||||
String containerName = parent == null ? "" : HighlightMessageUtil.getSymbolName(parent, resolveResult.getSubstitutor());
|
||||
String methodName = HighlightMessageUtil.getSymbolName(resolved, substitutor);
|
||||
PsiElement parent = resolved.getParent();
|
||||
String containerName = parent == null ? "" : HighlightMessageUtil.getSymbolName(parent, substitutor);
|
||||
String argTypes = buildArgTypesList(list);
|
||||
String description = JavaErrorMessages.message("wrong.method.arguments", methodName, containerName, argTypes);
|
||||
String toolTip = parent instanceof PsiClass && !ApplicationManager.getApplication().isUnitTestMode() ?
|
||||
@@ -350,19 +343,18 @@ public class HighlightMethodUtil {
|
||||
else {
|
||||
PsiReferenceExpression methodExpression = methodCall.getMethodExpression();
|
||||
PsiReferenceParameterList typeArgumentList = methodCall.getTypeArgumentList();
|
||||
if (typeArgumentList.getTypeArguments().length == 0 && resolvedMethod.hasTypeParameters()) {
|
||||
highlightInfo = GenericsHighlightUtil.checkInferredTypeArguments(resolvedMethod, methodCall, resolveResult.getSubstitutor());
|
||||
if (typeArgumentList.getTypeArguments().length == 0 && resolvedMethod != null && resolvedMethod.hasTypeParameters()) {
|
||||
highlightInfo = GenericsHighlightUtil.checkInferredTypeArguments(resolvedMethod, methodCall, substitutor);
|
||||
}
|
||||
else {
|
||||
highlightInfo = GenericsHighlightUtil.checkParameterizedReferenceTypeArguments(element, methodExpression,
|
||||
resolveResult.getSubstitutor());
|
||||
highlightInfo = GenericsHighlightUtil.checkParameterizedReferenceTypeArguments(resolved, methodExpression, substitutor);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
highlightInfo = HighlightInfo.createHighlightInfo(HighlightInfoType.ERROR, methodCall, JavaErrorMessages.message("method.call.expected"));
|
||||
if (element instanceof PsiClass) {
|
||||
QuickFixAction.registerQuickFixAction(highlightInfo, new InsertNewFix(methodCall, (PsiClass)element));
|
||||
if (resolved instanceof PsiClass) {
|
||||
QuickFixAction.registerQuickFixAction(highlightInfo, new InsertNewFix(methodCall, (PsiClass)resolved));
|
||||
}
|
||||
else {
|
||||
TextRange range = getFixRange(methodCall);
|
||||
@@ -373,17 +365,35 @@ public class HighlightMethodUtil {
|
||||
}
|
||||
}
|
||||
if (highlightInfo == null) {
|
||||
highlightInfo = GenericsHighlightUtil.checkParameterizedReferenceTypeArguments(element, referenceToMethod, resolveResult.getSubstitutor());
|
||||
highlightInfo = GenericsHighlightUtil.checkParameterizedReferenceTypeArguments(resolved, referenceToMethod, substitutor);
|
||||
}
|
||||
return highlightInfo;
|
||||
}
|
||||
|
||||
private static HighlightInfo checkAmbiguousMethodCall(final PsiReferenceExpression referenceToMethod,
|
||||
static boolean isDummyConstructorCall(PsiMethodCallExpression methodCall,
|
||||
PsiResolveHelper resolveHelper,
|
||||
PsiExpressionList list,
|
||||
PsiReferenceExpression referenceToMethod) {
|
||||
boolean isDummy = false;
|
||||
boolean isThisOrSuper = referenceToMethod.getReferenceNameElement() instanceof PsiKeyword;
|
||||
if (isThisOrSuper) {
|
||||
// super(..) or this(..)
|
||||
if (list.getExpressions().length == 0) { // implicit ctr call
|
||||
CandidateInfo[] candidates = resolveHelper.getReferencedMethodCandidates(methodCall, true);
|
||||
if (candidates.length == 1 && !candidates[0].getElement().isPhysical()) {
|
||||
isDummy = true;// dummy constructor
|
||||
}
|
||||
}
|
||||
}
|
||||
return isDummy;
|
||||
}
|
||||
|
||||
static HighlightInfo checkAmbiguousMethodCall(final PsiReferenceExpression referenceToMethod,
|
||||
JavaResolveResult[] resolveResults,
|
||||
final PsiExpressionList list,
|
||||
final PsiElement element,
|
||||
final JavaResolveResult resolveResult,
|
||||
final PsiMethodCallExpression methodCall, final PsiResolveHelper resolveHelper) {
|
||||
JavaResolveResult[] resolveResults = referenceToMethod.multiResolve(true);
|
||||
MethodCandidateInfo methodCandidate1 = null;
|
||||
MethodCandidateInfo methodCandidate2 = null;
|
||||
for (JavaResolveResult result : resolveResults) {
|
||||
|
||||
@@ -1308,9 +1308,9 @@ public class HighlightUtil {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static HighlightInfo checkExpressionRequired(PsiReferenceExpression expression) {
|
||||
public static HighlightInfo checkExpressionRequired(PsiReferenceExpression expression, JavaResolveResult resultForIncompleteCode) {
|
||||
if (expression.getNextSibling() instanceof PsiErrorElement) return null;
|
||||
PsiElement resolved = expression.advancedResolve(true).getElement();
|
||||
PsiElement resolved = resultForIncompleteCode.getElement();
|
||||
if (resolved == null) return null;
|
||||
PsiElement parent = expression.getParent();
|
||||
// String.class or String() are both correct
|
||||
@@ -2088,10 +2088,11 @@ public class HighlightUtil {
|
||||
|
||||
|
||||
@Nullable
|
||||
public static HighlightInfo checkReference(PsiJavaCodeReferenceElement ref, JavaResolveResult result, PsiElement resolved) {
|
||||
public static HighlightInfo checkReference(PsiJavaCodeReferenceElement ref, JavaResolveResult result) {
|
||||
PsiElement refName = ref.getReferenceNameElement();
|
||||
|
||||
if (!(refName instanceof PsiIdentifier) && !(refName instanceof PsiKeyword)) return null;
|
||||
PsiElement resolved = result.getElement();
|
||||
HighlightInfo highlightInfo = checkMemberReferencedBeforeConstructorCalled(ref, resolved);
|
||||
if (highlightInfo != null) return highlightInfo;
|
||||
|
||||
|
||||
@@ -436,8 +436,7 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
catch (IndexNotReadyException e) {
|
||||
return;
|
||||
}
|
||||
PsiElement resolved = result.getElement();
|
||||
myHolder.add(HighlightUtil.checkReference(ref, result, resolved));
|
||||
myHolder.add(HighlightUtil.checkReference(ref, result));
|
||||
if (myRefCountHolder != null) {
|
||||
myRefCountHolder.registerReference(ref, result);
|
||||
}
|
||||
@@ -564,7 +563,7 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
}
|
||||
}
|
||||
|
||||
private void highlightReferencedMethodOrClassName(PsiJavaCodeReferenceElement element) {
|
||||
private void highlightReferencedMethodOrClassName(PsiJavaCodeReferenceElement element, PsiElement resolved) {
|
||||
PsiElement parent = element.getParent();
|
||||
if (parent instanceof PsiReferenceExpression || parent instanceof PsiJavaCodeReferenceElement) {
|
||||
return;
|
||||
@@ -582,7 +581,6 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
try {
|
||||
PsiMethod method = ((PsiConstructorCall)parent).resolveConstructor();
|
||||
if (method == null) {
|
||||
PsiElement resolved = element.resolve();
|
||||
if (resolved instanceof PsiClass) {
|
||||
myHolder.add(HighlightNamesUtil.highlightClassName((PsiClass)resolved, element, colorsScheme));
|
||||
}
|
||||
@@ -598,17 +596,14 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
// highlight on demand import as class
|
||||
myHolder.add(HighlightNamesUtil.highlightClassName(null, element, colorsScheme));
|
||||
}
|
||||
else {
|
||||
PsiElement resolved = element.resolve();
|
||||
if (resolved instanceof PsiClass) {
|
||||
myHolder.add(HighlightNamesUtil.highlightClassName((PsiClass)resolved, element, colorsScheme));
|
||||
}
|
||||
else if (resolved instanceof PsiClass) {
|
||||
myHolder.add(HighlightNamesUtil.highlightClassName((PsiClass)resolved, element, colorsScheme));
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void visitMethodCallExpression(PsiMethodCallExpression expression) {
|
||||
if (!myHolder.hasErrorResults()) myHolder.add(GenericsHighlightUtil.checkEnumSuperConstructorCall(expression));
|
||||
if (!myHolder.hasErrorResults()) myHolder.add(HighlightClassUtil.checkSuperQualifierType(expression));
|
||||
if (!myHolder.hasErrorResults()) myHolder.add(HighlightClassUtil.checkSuperQualifierType(myFile.getProject(), expression));
|
||||
// in case of JSP synthetic method call, do not check
|
||||
if (expression.getMethodExpression().isPhysical() && !myHolder.hasErrorResults()) {
|
||||
try {
|
||||
@@ -747,12 +742,16 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
|
||||
@Override
|
||||
public void visitReferenceElement(PsiJavaCodeReferenceElement ref) {
|
||||
doVisitReferenceElement(ref);
|
||||
}
|
||||
|
||||
private JavaResolveResult doVisitReferenceElement(PsiJavaCodeReferenceElement ref) {
|
||||
JavaResolveResult result;
|
||||
try {
|
||||
result = ref.advancedResolve(true);
|
||||
}
|
||||
catch (IndexNotReadyException e) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
PsiElement resolved = result.getElement();
|
||||
PsiElement parent = ref.getParent();
|
||||
@@ -761,9 +760,9 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
if (myRefCountHolder != null) {
|
||||
myRefCountHolder.registerReference(ref, result);
|
||||
}
|
||||
myHolder.add(HighlightUtil.checkReference(ref, result, resolved));
|
||||
myHolder.add(HighlightUtil.checkReference(ref, result));
|
||||
}
|
||||
if (!myHolder.hasErrorResults()) myHolder.add(HighlightClassUtil.checkAbstractInstantiation(ref));
|
||||
if (!myHolder.hasErrorResults()) myHolder.add(HighlightClassUtil.checkAbstractInstantiation(ref, resolved));
|
||||
if (!myHolder.hasErrorResults()) myHolder.add(HighlightClassUtil.checkExtendsDuplicate(ref, resolved));
|
||||
if (!myHolder.hasErrorResults()) myHolder.add(HighlightClassUtil.checkClassExtendsForeignInnerClass(ref, resolved));
|
||||
if (!myHolder.hasErrorResults()) myHolder.add(GenericsHighlightUtil.checkSelectStaticClassFromParameterizedType(resolved, ref));
|
||||
@@ -798,19 +797,23 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
myHolder.add(HighlightNamesUtil.highlightClassNameInQualifier(ref, colorsScheme));
|
||||
}
|
||||
else {
|
||||
highlightReferencedMethodOrClassName(ref);
|
||||
highlightReferencedMethodOrClassName(ref, resolved);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override public void visitReferenceExpression(PsiReferenceExpression expression) {
|
||||
visitReferenceElement(expression);
|
||||
JavaResolveResult resultForIncompleteCode = doVisitReferenceElement(expression);
|
||||
if (!myHolder.hasErrorResults()) {
|
||||
visitExpression(expression);
|
||||
if (myHolder.hasErrorResults()) return;
|
||||
}
|
||||
JavaResolveResult result;
|
||||
JavaResolveResult[] results;
|
||||
try {
|
||||
result = expression.advancedResolve(false);
|
||||
results = expression.multiResolve(true);
|
||||
result = results.length == 1 ? results[0] : JavaResolveResult.EMPTY;
|
||||
}
|
||||
catch (IndexNotReadyException e) {
|
||||
return;
|
||||
@@ -834,7 +837,16 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
}
|
||||
}
|
||||
|
||||
if (!myHolder.hasErrorResults()) myHolder.add(HighlightUtil.checkExpressionRequired(expression));
|
||||
PsiElement parent = expression.getParent();
|
||||
if (parent instanceof PsiMethodCallExpression && ((PsiMethodCallExpression)parent).getMethodExpression() == expression && (!result.isAccessible() || !result.isStaticsScopeCorrect())) {
|
||||
PsiMethodCallExpression methodCallExpression = (PsiMethodCallExpression)parent;
|
||||
PsiExpressionList list = methodCallExpression.getArgumentList();
|
||||
if (!HighlightMethodUtil.isDummyConstructorCall(methodCallExpression, myResolveHelper, list, expression)) {
|
||||
HighlightInfo info = HighlightMethodUtil.checkAmbiguousMethodCall(expression, results, list, resolved, result, methodCallExpression, myResolveHelper);
|
||||
myHolder.add(info);
|
||||
}
|
||||
}
|
||||
if (!myHolder.hasErrorResults()) myHolder.add(HighlightUtil.checkExpressionRequired(expression, resultForIncompleteCode));
|
||||
if (!myHolder.hasErrorResults() && resolved instanceof PsiField) {
|
||||
try {
|
||||
myHolder.add(HighlightUtil.checkIllegalForwardReferenceToField(expression, (PsiField)resolved));
|
||||
|
||||
@@ -48,8 +48,10 @@ public class a12 {
|
||||
++<error descr="Variable expected">5</error>;
|
||||
<error descr="Variable expected">5</error> += 5;
|
||||
|
||||
foo123Unresolved(<error descr="Expression expected">String</error>);
|
||||
foo123Unresolved(<error descr="Cannot resolve symbol 'xxxx'">xxxx</error>);
|
||||
<error descr="Cannot resolve method 'foo123Unresolved(?)'">foo123Unresolved</error>(<error descr="Expression expected">String</error>);
|
||||
<error descr="Cannot resolve method 'foo123Unresolved(?)'">foo123Unresolved</error>(<error descr="Cannot resolve symbol 'xxxx'">xxxx</error>);
|
||||
|
||||
<error descr="Cannot resolve method 'xxxxxx(?)'">xxxxxx</error>(<error descr="Cannot resolve symbol 'xxxxxx'">xxxxxx</error>);
|
||||
|
||||
// incomplete code should not cause 'expr expected'
|
||||
Object<error descr="';' expected"> </error>
|
||||
|
||||
@@ -24,6 +24,6 @@ class Usage {
|
||||
m(Base1.F); //Base1.m(int)
|
||||
m(F); //Base2.m(float), float Base2.F
|
||||
F.class.getName(); // class Base2.F
|
||||
m(<error descr="Reference to 'IF' is ambiguous, both 'I1.IF' and 'I2.IF' match">IF</error>);
|
||||
m<error descr="Cannot resolve method 'm(?)'">(<error descr="Reference to 'IF' is ambiguous, both 'I1.IF' and 'I2.IF' match">IF</error>)</error>;
|
||||
}
|
||||
}
|
||||
@@ -91,14 +91,14 @@ public class LightAdvHighlightingPerformanceTest extends LightDaemonAnalyzerTest
|
||||
List<HighlightInfo> h = doHighlighting();
|
||||
infos.addAll(h);
|
||||
}
|
||||
}).cpuBound().assertTiming();
|
||||
}).cpuBound().usesAllCPUCores().assertTiming();
|
||||
return DaemonAnalyzerTestCase.filter(infos, HighlightSeverity.ERROR);
|
||||
}
|
||||
|
||||
public void testaThinlet() throws Exception {
|
||||
List<HighlightInfo> errors = doTest(24000 - JobSchedulerImpl.CORES_COUNT * 1000);
|
||||
dump("thinlet", errors);
|
||||
assertEquals(1157, errors.size());
|
||||
assertEquals(1230, errors.size());
|
||||
}
|
||||
|
||||
private static void dump(String msg, List<HighlightInfo> errors) {
|
||||
@@ -118,6 +118,6 @@ public class LightAdvHighlightingPerformanceTest extends LightDaemonAnalyzerTest
|
||||
public void testaClassLoader() throws Exception {
|
||||
List<HighlightInfo> errors = doTest(10000 - JobSchedulerImpl.CORES_COUNT * 1000);
|
||||
dump("classloader", errors);
|
||||
assertEquals(176, errors.size());
|
||||
assertEquals(178, errors.size());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public class LightAdvHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testInstantiateAbstract() throws Exception { doTest(false, false); }
|
||||
public void testDuplicateClassMethod() throws Exception { doTest(false, false); }
|
||||
public void testStringLiterals() throws Exception { doTest(false, false); }
|
||||
public void testa11() throws Exception { doTest(false, false); }
|
||||
public void testStaticInInner() throws Exception { doTest(false, false); }
|
||||
public void testInvalidExpressions() throws Exception { doTest(false, false); }
|
||||
public void testIllegalVoidType() throws Exception { doTest(false, false); }
|
||||
public void testIllegalType() throws Exception { doTest(false, false); }
|
||||
@@ -90,64 +90,64 @@ public class LightAdvHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIncompatibleTypes() throws Exception { doTest(false, false); }
|
||||
public void testCtrCallIsFirst() throws Exception { doTest(false, false); }
|
||||
public void testAccessLevelClash() throws Exception { doTest(false, false); }
|
||||
public void testa16() throws Exception { doTest(false, false); }
|
||||
public void testCasts() throws Exception { doTest(false, false); }
|
||||
public void testOverrideConflicts() throws Exception { doTest(false, false); }
|
||||
public void testOverriddenMethodIsFinal() throws Exception { doTest(false, false); }
|
||||
public void testa18() throws Exception { doTest(false, false); }
|
||||
public void testMissingReturn() throws Exception { doTest(false, false); }
|
||||
public void testUnreachable() throws Exception { doTest(false, false); }
|
||||
public void testFinalFieldInit() throws Exception { doTest(false, false); }
|
||||
public void testLocalVariableInitialization() throws Exception { doTest(false, false); }
|
||||
public void testa22() throws Exception { doTest(false, false); }
|
||||
public void testa22_1() throws Exception { doTest(false, false); }
|
||||
public void testVarDoubleInitialization() throws Exception { doTest(false, false); }
|
||||
public void testFieldDoubleInitialization() throws Exception { doTest(false, false); }
|
||||
public void testAssignToFinal() throws Exception { doTest(false, false); }
|
||||
public void testa24() throws Exception { doTest(false, false); }
|
||||
public void testa25() throws Exception { doTest(false, false); }
|
||||
public void testUnhandledExceptionsInSuperclass() throws Exception { doTest(false, false); }
|
||||
public void testAssignmentCompatible () throws Exception { doTest(false, false); }
|
||||
public void testMustBeBoolean() throws Exception { doTest(false, false); }
|
||||
|
||||
public void testNumericLiterals() throws Exception { doTest(false, false); }
|
||||
public void testInitializerCompletion() throws Exception { doTest(false, false); }
|
||||
|
||||
public void testa28() throws Exception { doTest(false, false); }
|
||||
public void testUndefinedLabel() throws Exception { doTest(false, false); }
|
||||
public void testDuplicateSwitchLabels() throws Exception { doTest(false, false); }
|
||||
public void testStringSwitchLabels() throws Exception { doTest(false, false); }
|
||||
public void testa30() throws Exception { doTest(false, false); }
|
||||
public void testIllegalForwardReference() throws Exception { doTest(false, false); }
|
||||
public void testStaticOverride() throws Exception { doTest(false, false); }
|
||||
public void testa32() throws Exception { doTest(false, false); }
|
||||
public void testCyclicInheritance() throws Exception { doTest(false, false); }
|
||||
public void testReferenceMemberBeforeCtrCalled() throws Exception { doTest(false, false); }
|
||||
public void testa34() throws Exception { doTest(false, false); }
|
||||
public void testa35() throws Exception { doTest(false, false); }
|
||||
public void testa35_1() throws Exception { doTest(false, false); }
|
||||
public void testa35_2() throws Exception { doTest(false, false); }
|
||||
public void testLabels() throws Exception { doTest(false, false); }
|
||||
public void testUnclosedBlockComment() throws Exception { doTest(false, false); }
|
||||
public void testUnclosedComment() throws Exception { doTest(false, false); }
|
||||
public void testUnclosedDecl() throws Exception { doTest(false, false); }
|
||||
public void testSillyAssignment() throws Exception { doTest(true, false); }
|
||||
public void testa37() throws Exception { doTest(false, false); }
|
||||
public void testa38() throws Exception { doTest(false, false); }
|
||||
public void testa39() throws Exception { doTest(false, false); }
|
||||
public void testTernary() throws Exception { doTest(false, false); }
|
||||
public void testDuplicateClass() throws Exception { doTest(false, false); }
|
||||
public void testCatchType() throws Exception { doTest(false, false); }
|
||||
public void testMustBeThrowable() throws Exception { doTest(false, false); }
|
||||
public void testUnhandledMessingWithFinally() throws Exception { doTest(false, false); }
|
||||
public void testSerializableStuff() throws Exception { doTest(true, false); }
|
||||
public void testDeprecated() throws Exception { doTest(true, false); }
|
||||
public void testJavadoc() throws Exception { enableInspectionTool(new JavaDocLocalInspection()); doTest(true, false); }
|
||||
public void testa44() throws Exception { doTest(false, false); }
|
||||
public void testa45() throws Exception { doTest(false, false); }
|
||||
public void testExpressionsInSwitch () throws Exception { doTest(false, false); }
|
||||
public void testAccessInner () throws Exception { doTest(false, false); }
|
||||
|
||||
public void testExceptionNeverThrown() throws Exception { doTest(true, false); }
|
||||
public void testExceptionNeverThrownInTry() throws Exception { doTest(false, false); }
|
||||
|
||||
public void testa47() throws Exception { doTest(false, false); }
|
||||
public void testa48() throws Exception { doTest(false, false); }
|
||||
public void testSwitchStatement() throws Exception { doTest(false, false); }
|
||||
public void testAssertExpression() throws Exception { doTest(false, false); }
|
||||
|
||||
public void testa49() throws Exception { doTest(false, false); }
|
||||
public void testa50() throws Exception { doTest(false, false); }
|
||||
public void testa52() throws Exception { doTest(false, false); }
|
||||
public void testSynchronizedExpression() throws Exception { doTest(false, false); }
|
||||
public void testExtendMultipleClasses() throws Exception { doTest(false, false); }
|
||||
public void testRecursiveConstructorInvocation() throws Exception { doTest(false, false); }
|
||||
public void testMethodCalls() throws Exception { doTest(false, false); }
|
||||
public void testa54() throws Exception { doTest(false, false); }
|
||||
public void testa54_1() throws Exception { doTest(true, false); } //duplicate imports
|
||||
public void testa55() throws Exception { doTest(false, false); }
|
||||
public void testSingleTypeImportConflicts() throws Exception { doTest(false, false); }
|
||||
public void testMultipleSingleTypeImports() throws Exception { doTest(true, false); } //duplicate imports
|
||||
public void testNotAllowedInInterface() throws Exception { doTest(false, false); }
|
||||
public void testQualifiedNew() throws Exception { doTest(false, false); }
|
||||
public void testEnclosingInstance() throws Exception { doTest(false, false); }
|
||||
|
||||
public void testa59() throws Exception { doTest(true, false); } // static via instabnce
|
||||
public void testa60() throws Exception { doTest(true, false); } //illegal qualified this or super
|
||||
public void testStaticViaInstance() throws Exception { doTest(true, false); } // static via instabnce
|
||||
public void testQualifiedThisSuper() throws Exception { doTest(true, false); } //illegal qualified this or super
|
||||
|
||||
public void testAmbiguousMethodCall() throws Exception { doTest(false, false); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user