IDEA-132585 NPE when XSLT debug

This commit is contained in:
Dmitry Avdeev
2014-11-10 16:05:50 +03:00
parent 7186041119
commit c4835b7c73
2 changed files with 10 additions and 4 deletions
@@ -69,10 +69,14 @@ public class XsltCommandLineState extends CommandLineState {
super(environment);
myXsltRunConfiguration = xsltRunConfiguration;
myIsDebugger = "Debug".equals(environment.getRunner().getRunnerId());
myIsDebugger = "Debug".equals(environment.getExecutor().getId());
}
@Override
public boolean isDebugger() {
return myIsDebugger;
}
@Override
@NotNull
protected OSProcessHandler startProcess() throws ExecutionException {
final OSProcessHandler osProcessHandler = createJavaParameters().createOSProcessHandler();
@@ -144,8 +144,10 @@ public final class XsltRunConfiguration extends LocatableConfigurationBase imple
if (myOutputType == OutputType.CONSOLE) {
final HighlightingOutputConsole console = new HighlightingOutputConsole(getProject(), myFileType);
boolean consoleTabAdded = false;
for (XsltRunnerExtension extension : XsltRunnerExtension.getExtensions(this, false /* doesn't matter, xslt debugger uses own flag */)) {
XsltCommandLineState state = startedProcess.getUserData(XsltCommandLineState.STATE);
boolean debug = state != null && state.isDebugger();
boolean consoleTabAdded = false;
for (XsltRunnerExtension extension : XsltRunnerExtension.getExtensions(this, debug)) {
if (extension.createTabs(getProject(), manager, console, startedProcess)) {
consoleTabAdded = true;
}