当前位置: 首页>>代码示例>>Java>>正文


Java RunProfileState.execute方法代码示例

本文整理汇总了Java中com.intellij.execution.configurations.RunProfileState.execute方法的典型用法代码示例。如果您正苦于以下问题:Java RunProfileState.execute方法的具体用法?Java RunProfileState.execute怎么用?Java RunProfileState.execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.execution.configurations.RunProfileState的用法示例。


在下文中一共展示了RunProfileState.execute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doExecute

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
@Nullable
@Override
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment) throws ExecutionException {
    if(DEBUG_EXECUTOR.equals(environment.getExecutor().getId())) {
        RoboVmRunConfiguration runConfig = (RoboVmRunConfiguration)environment.getRunProfile();
        RemoteConnection connection = new RemoteConnection(true, "127.0.0.1", "" + runConfig.getDebugPort(), false);
        connection.setServerMode(true);
        return attachVirtualMachine(state, environment, connection, false);
    } else {
        ExecutionResult executionResult = state.execute(environment.getExecutor(), this);
        if (executionResult == null) {
            return null;
        }
        return new RunContentBuilder(executionResult, environment).showRunContent(environment.getContentToReuse());
    }
}
 
开发者ID:robovm,项目名称:robovm-idea,代码行数:17,代码来源:RoboVmRunner.java

示例2: doExecute

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
@Override
@RequiredDispatchThread
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env) throws ExecutionException
{
	UnityProcess editorProcess = UnityEditorCommunication.findEditorProcess();
	if(editorProcess == null)
	{
		throw new ExecutionException("Editor is not responding");
	}
	FileDocumentManager.getInstance().saveAllDocuments();

	ExecutionResult executionResult = state.execute(env.getExecutor(), this);
	if(executionResult == null)
	{
		return null;
	}
	return Unity3dAttachRunner.runContentDescriptor(executionResult, env, editorProcess, (ConsoleView) executionResult.getExecutionConsole(), true);
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:19,代码来源:Unity3dTestDebuggerRunner.java

示例3: getProcessStarter

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
private XDebugProcessStarter getProcessStarter(final RunProfileState runProfileState, final ExecutionEnvironment
        executionEnvironment) throws ExecutionException {
    int port = getAvailablePort();
    ((XQueryRunProfileState) runProfileState).setPort(port);
    return new XDebugProcessStarter() {
        @NotNull
        public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
            final ExecutionResult result = runProfileState.execute(executionEnvironment.getExecutor(), XQueryDebuggerRunner.this);
            XQueryDebugProcess.XQueryDebuggerIde debuggerIde = new XQueryDebugProcess.XQueryDebuggerIde(session, result.getProcessHandler());
            final DBGpIde dbgpIde = ide().withPort(port).withDebuggerIde(debuggerIde).build();
            dbgpIde.startListening();
            result.getProcessHandler().addProcessListener(new ProcessAdapter() {
                @Override
                public void processTerminated(ProcessEvent event) {
                    dbgpIde.stopListening();
                }
            });
            return new XQueryDebugProcess(session, result, dbgpIde);
        }
    };
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:22,代码来源:XQueryDebuggerRunner.java

示例4: doExecute

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
@Override
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env) throws ExecutionException {
    FileDocumentManager.getInstance().saveAllDocuments();
    ExecutionResult executionResult = state.execute(env.getExecutor(), this);
    if (executionResult == null) return null;

    final RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, env);
    return contentBuilder.showRunContent(env.getContentToReuse());
}
 
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:10,代码来源:LuaRunner.java

示例5: startProcess

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
private void startProcess(Target target, Parameters configuration, @NotNull Pair<Target, Parameters> key) {
  ProgramRunner runner = new DefaultProgramRunner() {
    @Override
    @NotNull
    public String getRunnerId() {
      return "MyRunner";
    }

    @Override
    public boolean canRun(@NotNull String executorId, @NotNull RunProfile profile) {
      return true;
    }
  };
  Executor executor = DefaultRunExecutor.getRunExecutorInstance();
  ProcessHandler processHandler;
  try {
    RunProfileState state = getRunProfileState(target, configuration, executor);
    ExecutionResult result = state.execute(executor, runner);
    //noinspection ConstantConditions
    processHandler = result.getProcessHandler();
  }
  catch (Exception e) {
    dropProcessInfo(key, e instanceof ExecutionException? e.getMessage() : ExceptionUtil.getUserStackTrace(e, LOG), null);
    return;
  }
  processHandler.addProcessListener(getProcessListener(key));
  processHandler.startNotify();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:RemoteProcessSupport.java

示例6: doExecute

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
@Override
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env) throws ExecutionException {
  FileDocumentManager.getInstance().saveAllDocuments();
  ExecutionResult executionResult = state.execute(env.getExecutor(), this);
  if (executionResult == null) {
    return null;
  }
  return new RunContentBuilder(executionResult, env).showRunContent(env.getContentToReuse());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:DefaultProgramRunner.java

示例7: doExecute

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
@Override
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env) throws ExecutionException {
  FileDocumentManager.getInstance().saveAllDocuments();

  ExecutionResult executionResult;
  RunProfile profile = env.getRunProfile();
  if (state instanceof PythonCommandLineState && profile instanceof CommandLinePatcher) {
    executionResult = ((PythonCommandLineState)state).execute(env.getExecutor(), (CommandLinePatcher)profile);
  }
  else {
    executionResult = state.execute(env.getExecutor(), this);
  }
  return executionResult == null ? null : new RunContentBuilder(executionResult, env).showRunContent(env.getContentToReuse());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:PythonRunner.java

示例8: doExecute

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
@Nullable
@Override
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment) throws ExecutionException {
  FileDocumentManager.getInstance().saveAllDocuments();
  state.execute(environment.getExecutor(), this);
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:AntRunner.java

示例9: doExecute

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
@Override
protected RunContentDescriptor doExecute(
    @NotNull RunProfileState state, @NotNull ExecutionEnvironment env) throws ExecutionException {

  ensureSingleDebugSession(env.getProject());

  CloudDebugProcessState cloudState = null;
  if (state instanceof CloudDebugProcessState) {
    cloudState = (CloudDebugProcessState) state;
  }
  FileDocumentManager.getInstance().saveAllDocuments();
  state.execute(env.getExecutor(), this);

  return createContentDescriptor(cloudState, env);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:16,代码来源:CloudDebuggerRunner.java

示例10: doExecute

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
@Nullable
@Override
protected RunContentDescriptor doExecute(Project project,
                                         RunProfileState state,
                                         RunContentDescriptor contentToReuse,
                                         ExecutionEnvironment env) throws ExecutionException
{
  ExecutionResult executionResult = state.execute(env.getExecutor(), this);
  if (executionResult == null) return null;

  final RunContentBuilder contentBuilder = new RunContentBuilder(this, executionResult, env);
  return contentBuilder.showRunContent(contentToReuse);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:14,代码来源:ExternalSystemTaskRunner.java

示例11: startProcess

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
private void startProcess(Target target, Parameters configuration, Pair<Target, Parameters> key) {
  ProgramRunner runner = new DefaultProgramRunner() {
    @Override
    @NotNull
    public String getRunnerId() {
      return "MyRunner";
    }

    @Override
    public boolean canRun(@NotNull String executorId, @NotNull RunProfile profile) {
      return true;
    }
  };
  Executor executor = DefaultRunExecutor.getRunExecutorInstance();
  ProcessHandler processHandler = null;
  try {
    RunProfileState state = getRunProfileState(target, configuration, executor);
    ExecutionResult result = state.execute(executor, runner);
    //noinspection ConstantConditions
    processHandler = result.getProcessHandler();
  }
  catch (Exception e) {
    dropProcessInfo(key, e instanceof ExecutionException? e.getMessage() : ExceptionUtil.getUserStackTrace(e, LOG), processHandler);
    return;
  }
  processHandler.addProcessListener(getProcessListener(key));
  processHandler.startNotify();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:29,代码来源:RemoteProcessSupport.java

示例12: doExecute

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
@Override
protected RunContentDescriptor doExecute(final Project project,
                                         final RunProfileState state,
                                         final RunContentDescriptor contentToReuse,
                                         final ExecutionEnvironment env) throws ExecutionException {
  FileDocumentManager.getInstance().saveAllDocuments();
  ExecutionResult executionResult = state.execute(env.getExecutor(), this);
  if (executionResult == null) return null;

  final RunContentBuilder contentBuilder = new RunContentBuilder(this, executionResult, env);
  return contentBuilder.showRunContent(contentToReuse);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:13,代码来源:DefaultProgramRunner.java

示例13: doExecute

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
@Override
protected RunContentDescriptor doExecute(RunProfileState state, ExecutionEnvironment env) throws ExecutionException {
  FileDocumentManager.getInstance().saveAllDocuments();
  ExecutionResult executionResult = state.execute(env.getExecutor(), this);
  // if (executionResult == null) return null;

  final RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, env);

  return contentBuilder.showRunContent(env.getContentToReuse());
}
 
开发者ID:consulo,项目名称:consulo-lua,代码行数:11,代码来源:LuaRunner.java

示例14: doExecute

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
@Nullable
@Override
protected RunContentDescriptor doExecute(@NotNull RunProfileState state,
        @NotNull ExecutionEnvironment environment) throws ExecutionException {
    ExecutionResult executionResult = state.execute(environment.getExecutor(), environment.getRunner());
    if (executionResult == null) {
        return null;
    }

    return null;
}
 
开发者ID:konsoletyper,项目名称:teavm,代码行数:12,代码来源:TeaVMDebugRunner.java

示例15: startProcess

import com.intellij.execution.configurations.RunProfileState; //导入方法依赖的package包/类
private void startProcess(Target target, Parameters configuration, Pair<Target, Parameters> key) {
  ProgramRunner runner = new DefaultProgramRunner() {
    @Override
    @Nonnull
    public String getRunnerId() {
      return "MyRunner";
    }

    @Override
    public boolean canRun(@Nonnull String executorId, @Nonnull RunProfile profile) {
      return true;
    }
  };
  Executor executor = DefaultRunExecutor.getRunExecutorInstance();
  ProcessHandler processHandler = null;
  try {
    RunProfileState state = getRunProfileState(target, configuration, executor);
    ExecutionResult result = state.execute(executor, runner);
    //noinspection ConstantConditions
    processHandler = result.getProcessHandler();
  }
  catch (Exception e) {
    dropProcessInfo(key, e instanceof ExecutionException? e.getMessage() : ExceptionUtil.getUserStackTrace(e, LOG), processHandler);
    return;
  }
  processHandler.addProcessListener(getProcessListener(key));
  processHandler.startNotify();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:29,代码来源:RemoteProcessSupport.java


注:本文中的com.intellij.execution.configurations.RunProfileState.execute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。