本文整理汇总了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());
}
}
示例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);
}
示例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);
}
};
}
示例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());
}
示例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();
}
示例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());
}
示例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());
}
示例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;
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}
示例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());
}
示例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;
}
示例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();
}