mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
follow IDEA-CR-21157
This commit is contained in:
-4
@@ -249,10 +249,6 @@ public class CreateMethodFromUsageFix extends CreateFromUsageBaseFix {
|
||||
final Editor newEditor = positionCursor(project, targetFile, method);
|
||||
if (newEditor == null) return;
|
||||
Template template = builder.buildTemplate();
|
||||
if (arguments.size() > 20) {
|
||||
template.setToShortenLongNames(false);
|
||||
template.setToReformat(false);
|
||||
}
|
||||
newEditor.getCaretModel().moveToOffset(rangeMarker.getStartOffset());
|
||||
newEditor.getDocument().deleteString(rangeMarker.getStartOffset(), rangeMarker.getEndOffset());
|
||||
rangeMarker.dispose();
|
||||
|
||||
+3
-2
@@ -23,11 +23,12 @@ import com.intellij.testFramework.SkipSlowTestLocally;
|
||||
public class CreateMethodFromUsagePerformanceTest extends LightQuickFixTestCase {
|
||||
|
||||
public void testWithHugeNumberOfParameters() {
|
||||
PlatformTestUtil.startPerformanceTest("100 args for a new method", 200000, () -> {
|
||||
PlatformTestUtil.startPerformanceTest("5000 args for a new method", 2000000, () -> {
|
||||
configureFromFileText("Foo.java", "class Foo {{ f<caret>oo(" + StringUtil.repeat("\"a\", ", 5000) + " \"a\");}}");
|
||||
doAction("Create method 'foo'");
|
||||
})
|
||||
.useLegacyScaling()
|
||||
.cpuBound()
|
||||
.usesAllCPUCores()
|
||||
.assertTiming();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user