Do not pass runConfigurationName through processHandler since it's already there

This commit is contained in:
Yaroslav Lepenkin
2016-06-03 16:49:04 +03:00
parent 93db030313
commit 8c35bfd8ce
3 changed files with 1 additions and 14 deletions
@@ -44,7 +44,6 @@ import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.roots.ProjectRootManager;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.Getter;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
@@ -136,7 +135,6 @@ public abstract class JavaTestFrameworkRunnableState<T extends
Disposer.register(getConfiguration().getProject(), consoleView);
final OSProcessHandler handler = createHandler(executor);
handler.putUserData(TestStateStorage.RUN_CONFIGURATION_NAME_KEY, getConfiguration().getName());
consoleView.attachToProcess(handler);
final AbstractTestProxy root = viewer.getRoot();
@@ -20,7 +20,6 @@ import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.ThrowableComputable;
import com.intellij.openapi.util.io.FileUtilRt;
import com.intellij.openapi.vfs.newvfs.persistent.FlushingDaemon;
@@ -44,8 +43,6 @@ import java.util.concurrent.ScheduledFuture;
* @author Dmitry Avdeev
*/
public class TestStateStorage implements Disposable {
public static Key<String> RUN_CONFIGURATION_NAME_KEY = Key.create("run.configuration.name");
private static final File TEST_HISTORY_PATH = new File(PathManager.getSystemPath(), "testHistory");
@@ -19,7 +19,6 @@ import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
import com.intellij.execution.TestStateStorage;
import com.intellij.execution.configurations.RunConfiguration;
import com.intellij.execution.configurations.RunProfile;
import com.intellij.execution.process.ProcessHandler;
import com.intellij.execution.testframework.*;
import com.intellij.execution.testframework.actions.ScrollToTestSourceAction;
import com.intellij.execution.testframework.export.TestResultsXmlFormatter;
@@ -46,7 +45,6 @@ import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.Pass;
import com.intellij.openapi.util.io.FileUtilRt;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.wm.IdeFocusManager;
import com.intellij.pom.Navigatable;
@@ -70,8 +68,6 @@ import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamResult;
import java.awt.*;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.FileWriter;
import java.text.SimpleDateFormat;
@@ -801,11 +797,7 @@ public class SMTestRunnerResultsForm extends TestResultsPanel
for (SMTestProxy proxy : tests) {
String url = proxy instanceof SMTestProxy.SMRootTestProxy ? ((SMTestProxy.SMRootTestProxy)proxy).getRootLocation() : proxy.getLocationUrl();
if (url != null) {
ProcessHandler handler = myRoot.getHandler();
String configurationName = null;
if (handler != null) {
configurationName = handler.getUserData(TestStateStorage.RUN_CONFIGURATION_NAME_KEY);
}
String configurationName = myConfiguration != null ? myConfiguration.getName() : null;
storage.writeState(url, new TestStateStorage.Record(proxy.getMagnitude(), new Date(),
configurationName == null ? 0 : configurationName.hashCode()));
}