Examples of ErlangRunningState


Examples of org.intellij.erlang.runconfig.ErlangRunningState

    assert runConfig != null;
    return runConfig;
  }

  private ErlangRunningState createRunningState() throws ExecutionException {
    ErlangRunningState state = getRunConfiguration().getState(myExecutionEnvironment.getExecutor(), myExecutionEnvironment);
    if (state == null) {
      throw new ExecutionException("Failed to execute a run configuration.");
    }
    return state;
  }
View Full Code Here

Examples of org.intellij.erlang.runconfig.ErlangRunningState

    }
    return state;
  }

  private void runDebugTarget() throws ExecutionException {
    ErlangRunningState runningState = createRunningState();
    GeneralCommandLine commandLine = new GeneralCommandLine();
    runningState.setExePath(commandLine);
    runningState.setWorkDirectory(commandLine);
    setUpErlangDebuggerCodePath(commandLine);
    runningState.setCodePath(commandLine);
    commandLine.addParameters("-sname", "test_node" + System.currentTimeMillis());
    commandLine.addParameters("-run", "debugnode", "main", myDebuggerNode.getName(), myDebuggerNode.getMessageBoxName());
    runningState.setErlangFlags(commandLine);
    runningState.setNoShellMode(commandLine);
    runningState.setStopErlang(commandLine);
    Process process = commandLine.createProcess();
    myErlangProcessHandler = new OSProcessHandler(process, commandLine.getCommandLineString());
    getSession().getConsoleView().attachToProcess(myErlangProcessHandler);
    myErlangProcessHandler.startNotify();
    if (runningState instanceof ErlangRemoteDebugRunningState) {
      ErlangRemoteDebugRunConfiguration runConfiguration = (ErlangRemoteDebugRunConfiguration) getRunConfiguration();
      if (StringUtil.isEmptyOrSpaces(runConfiguration.getErlangNode())) {
        throw new ExecutionException("Bad run configuration: remote Erlang node is not specified.");
      }
      myDebuggerNode.debugRemoteNode(runConfiguration.getErlangNode(), runConfiguration.getCookie());
    }
    else {
      ErlangRunningState.ErlangEntryPoint entryPoint = runningState.getDebugEntryPoint();
      myDebuggerNode.runDebugger(entryPoint.getModuleName(), entryPoint.getFunctionName(), entryPoint.getArgsList());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.