expected type is sometimes more important than prefix-variant case mismatch

This commit is contained in:
peter
2012-06-18 12:31:17 +02:00
parent 8d8309c532
commit b7edeb92b5
6 changed files with 28 additions and 19 deletions
@@ -62,7 +62,9 @@ public class JavaCompletionSorting {
if (!smart) {
ContainerUtil.addIfNotNull(afterNegativeStats, preferStatics(position, expectedTypes));
}
afterNegativeStats.add(new PreferLocalVariablesLiteralsAndAnnoMethodsWeigher(type, position));
if (!JavaCompletionData.START_FOR.accepts(position)) {
afterNegativeStats.add(new PreferLocalVariablesLiteralsAndAnnoMethodsWeigher(type, position));
}
ContainerUtil.addIfNotNull(afterNegativeStats, recursion(parameters, expectedTypes));
if (!smart && !afterNew) {
afterNegativeStats.add(new PreferExpected(false, expectedTypes));