mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
check for method type params inclusive (IDEA-56192)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class C {
|
||||
private static <T> List<T> getTopLevelItems() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class C {
|
||||
private <T> List<T> ge<caret>tTopLevelItems() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -164,6 +164,12 @@ public class MakeMethodStaticTest extends LightCodeInsightTestCase {
|
||||
checkResultByFile("/refactoring/makeMethodStatic/after22.java");
|
||||
}
|
||||
|
||||
public void testPreserveTypeParams() throws Exception {
|
||||
configureByFile("/refactoring/makeMethodStatic/beforePreserveTypeParams.java");
|
||||
performWithFields();
|
||||
checkResultByFile("/refactoring/makeMethodStatic/afterPreserveTypeParams.java");
|
||||
}
|
||||
|
||||
private void perform(boolean addClassParameter) {
|
||||
PsiElement element = TargetElementUtilBase.findTargetElement(myEditor, TargetElementUtilBase.ELEMENT_NAME_ACCEPTED);
|
||||
assertTrue(element instanceof PsiMethod);
|
||||
|
||||
Reference in New Issue
Block a user