mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-51798
This commit is contained in:
+3
-2
@@ -11,6 +11,7 @@ import com.intellij.codeInsight.lookup.impl.LookupImpl;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.ArrayList;
|
||||
@@ -45,12 +46,12 @@ public abstract class CompletionSortingTestCase extends LightCompletionTestCase
|
||||
|
||||
protected abstract String getBasePath();
|
||||
|
||||
protected void checkPreferredItems(final int selected, final String... expected) throws Exception {
|
||||
protected void checkPreferredItems(final int selected, @NonNls final String... expected) throws Exception {
|
||||
invokeCompletion(getBasePath() + "/" + getTestName(false) + ".java");
|
||||
assertPreferredItems(selected, expected);
|
||||
}
|
||||
|
||||
protected static void assertPreferredItems(final int selected, final String... expected) {
|
||||
protected static void assertPreferredItems(final int selected, @NonNls final String... expected) {
|
||||
final LookupImpl lookup = getLookup();
|
||||
final JList list = lookup.getList();
|
||||
final List<LookupElement> model = lookup.getItems();
|
||||
|
||||
+1
-8
@@ -5,13 +5,10 @@
|
||||
package com.intellij.codeInsight.completion;
|
||||
|
||||
import com.intellij.codeInsight.lookup.impl.LookupImpl;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;
|
||||
import com.intellij.psi.statistics.StatisticsManager;
|
||||
|
||||
@SuppressWarnings({"ALL"})
|
||||
public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
private static final String BASE_PATH = "/codeInsight/completion/smartTypeSorting";
|
||||
private static final String BASE_PATH = "/codeInsight/completion/smartTypeSorting";
|
||||
|
||||
public SmartTypeCompletionOrderingTest() {
|
||||
super(CompletionType.SMART);
|
||||
@@ -236,8 +233,4 @@ public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
protected String getBasePath() {
|
||||
return BASE_PATH;
|
||||
}
|
||||
|
||||
protected Sdk getTestProjectJdk() {
|
||||
return JavaSdkImpl.getMockJdk15("java 1.5");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user