From b3fd1e77935cc0f49999c34500f57cd807101753 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Tue, 9 Jun 2015 19:29:47 +0300 Subject: [PATCH] smTestProxy: optimize presentation name calc --- .../testframework/sm/runner/SMTestProxy.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java index 7cc069cd485c..6b3535ca89fe 100644 --- a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java +++ b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java @@ -75,6 +75,7 @@ public class SMTestProxy extends AbstractTestProxy { private boolean myIsEmpty = true; private SMTestLocator myLocator = null; private Printer myPreferredPrinter = null; + private String myPresentableName; public SMTestProxy(String testName, boolean isSuite, @Nullable String locationUrl) { this(testName, isSuite, locationUrl, false); @@ -587,10 +588,14 @@ public class SMTestProxy extends AbstractTestProxy { @NotNull public String getPresentableName() { - if (myPreservePresentableName) { - return TestsPresentationUtil.getPresentableNameTrimmedOnly(this); + if (myPresentableName == null) { + if (myPreservePresentableName) { + myPresentableName = TestsPresentationUtil.getPresentableNameTrimmedOnly(this); + } else { + myPresentableName = TestsPresentationUtil.getPresentableName(this); + } } - return TestsPresentationUtil.getPresentableName(this); + return myPresentableName; } @Override