本文整理汇总了Java中com.intellij.execution.remote.RemoteConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java RemoteConfiguration类的具体用法?Java RemoteConfiguration怎么用?Java RemoteConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RemoteConfiguration类属于com.intellij.execution.remote包,在下文中一共展示了RemoteConfiguration类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createRemoteDebug
import com.intellij.execution.remote.RemoteConfiguration; //导入依赖的package包/类
private void createRemoteDebug(
final RunManagerImpl runManager,
final HybrisProjectDescriptor hybrisProjectDescriptor
) {
final RemoteConfigurationType remoteConfigurationType = ConfigurationTypeUtil.findConfigurationType(
RemoteConfigurationType.class);
final ConfigurationFactory configurationFactory = remoteConfigurationType.getConfigurationFactories()[0];
final String debugName = HybrisI18NBundleUtils.message("hybris.project.import.run.configuration.remote.debug");
final RunnerAndConfigurationSettings runner = runManager.createRunConfiguration(
debugName,
configurationFactory
);
final RemoteConfiguration remoteConfiguration = (RemoteConfiguration) runner.getConfiguration();
remoteConfiguration.PORT = getDebugPort(hybrisProjectDescriptor);
ApplicationManager.getApplication().invokeLater(() -> ApplicationManager.getApplication().runWriteAction(() -> {
runner.setSingleton(true);
runner.setActivateToolWindowBeforeRun(true);
runManager.addConfiguration(runner, true);
runManager.setSelectedConfiguration(runner);
}));
}
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:23,代码来源:DebugRunConfigurationConfigurator.java
示例2: createRunConfiguration
import com.intellij.execution.remote.RemoteConfiguration; //导入依赖的package包/类
/**
* Creates debugging settings for server
*
* @param project
* @param debugPort
* @param hostname
* @return
*/
private RunnerAndConfigurationSettings createRunConfiguration(Project project, String debugPort, String hostname) {
final RemoteConfigurationType remoteConfigurationType = RemoteConfigurationType.getInstance();
final ConfigurationFactory factory = remoteConfigurationType.getFactory();
final RunnerAndConfigurationSettings runSettings =
RunManager.getInstance(project).createRunConfiguration(getRunConfigurationName(debugPort), factory);
final RemoteConfiguration configuration = (RemoteConfiguration) runSettings.getConfiguration();
configuration.HOST = hostname;
configuration.PORT = debugPort;
configuration.USE_SOCKET_TRANSPORT = true;
configuration.SERVER_MODE = false;
return runSettings;
}
示例3: createRunConfiguration
import com.intellij.execution.remote.RemoteConfiguration; //导入依赖的package包/类
private static RunnerAndConfigurationSettings createRunConfiguration(
Project project, String debugPort) {
final RemoteConfigurationType remoteConfigurationType = RemoteConfigurationType.getInstance();
final ConfigurationFactory factory = remoteConfigurationType.getFactory();
final RunnerAndConfigurationSettings runSettings =
RunManager.getInstance(project)
.createRunConfiguration(getRunConfigurationName(debugPort), factory);
final RemoteConfiguration configuration = (RemoteConfiguration) runSettings.getConfiguration();
configuration.HOST = "localhost";
configuration.PORT = debugPort;
configuration.USE_SOCKET_TRANSPORT = true;
configuration.SERVER_MODE = false;
return runSettings;
}
示例4: createRunConfiguration
import com.intellij.execution.remote.RemoteConfiguration; //导入依赖的package包/类
private static RunnerAndConfigurationSettings createRunConfiguration(Project project, String debugPort) {
final RemoteConfigurationType remoteConfigurationType = RemoteConfigurationType.getInstance();
final ConfigurationFactory factory = remoteConfigurationType.getFactory();
final RunnerAndConfigurationSettings runSettings =
RunManager.getInstance(project).createRunConfiguration(getRunConfigurationName(debugPort), factory);
final RemoteConfiguration configuration = (RemoteConfiguration)runSettings.getConfiguration();
configuration.HOST = "localhost";
configuration.PORT = debugPort;
configuration.USE_SOCKET_TRANSPORT = true;
configuration.SERVER_MODE = false;
return runSettings;
}
示例5: connectInDebugMode
import com.intellij.execution.remote.RemoteConfiguration; //导入依赖的package包/类
public void connectInDebugMode(RunManagerEx runManager) {
ServerConfiguration serverConfiguration = selectionHandler.getCurrentConfiguration();
// Create Remote Connection to Server using the IntelliJ Run / Debug Connection
//AS TODO: It is working but the configuration is listed and made persistent. That is not too bad because
//AS TODO: after changes a reconnect will update the configuration.
RemoteConfigurationType remoteConfigurationType = new RemoteConfigurationType();
RunConfiguration runConfiguration = remoteConfigurationType.getFactory().createTemplateConfiguration(myProject);
RemoteConfiguration remoteConfiguration = (RemoteConfiguration) runConfiguration;
// Server means if you are listening. If not you are attaching.
remoteConfiguration.SERVER_MODE = false;
remoteConfiguration.USE_SOCKET_TRANSPORT = true;
remoteConfiguration.HOST = serverConfiguration.getHost();
remoteConfiguration.PORT = serverConfiguration.getConnectionDebugPort() + "";
// Set a Name of the Configuration so that it is properly listed.
remoteConfiguration.setName(serverConfiguration.getName());
RunnerAndConfigurationSettings configuration = new RunnerAndConfigurationSettingsImpl(
(RunManagerImpl) runManager,
runConfiguration,
false
);
runManager.setTemporaryConfiguration(configuration);
//AS TODO: Make sure that this is the proper way to obtain the DEBUG Executor
Executor executor = ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG);
ExecutionUtil.runConfiguration(configuration, executor);
// Update the Modules with the Remote Sling Server
OsgiClient osgiClient = obtainOSGiClient();
if(osgiClient != null) {
BundleStatus status = checkAndUpdateSupportBundle(false);
if(status != BundleStatus.failed) {
checkModules(osgiClient);
}
}
}
示例6: launchDebugger
import com.intellij.execution.remote.RemoteConfiguration; //导入依赖的package包/类
private static void launchDebugger(final Project project, final GaugeDebugInfo debugInfo) {
Runnable runnable = () -> {
final long startTime = System.currentTimeMillis();
GenericDebuggerRunner basicProgramRunner = new GenericDebuggerRunner();
RunManagerImpl manager = new RunManagerImpl(project);
ConfigurationFactory configFactory = RemoteConfigurationType.getInstance().getConfigurationFactories()[0];
RemoteConfiguration remoteConfig = new RemoteConfiguration(project, configFactory);
remoteConfig.PORT = debugInfo.getPort();
remoteConfig.HOST = debugInfo.getHost();
remoteConfig.USE_SOCKET_TRANSPORT = true;
remoteConfig.SERVER_MODE = false;
RunnerAndConfigurationSettingsImpl configuration = new RunnerAndConfigurationSettingsImpl(manager, remoteConfig, false);
ExecutionEnvironment environment = new ExecutionEnvironment(new DefaultDebugExecutor(), basicProgramRunner, configuration, project);
boolean debuggerConnected = false;
// Trying to connect to gauge java for 25 secs. The sleep is because it may take a few seconds for gauge to launch the java process and the jvm to load after that
while (!debuggerConnected && ((System.currentTimeMillis() - startTime) < 25000)) {
try {
Thread.sleep(5000);
basicProgramRunner.execute(environment);
debuggerConnected = true;
} catch (Exception e) {
System.err.println("Failed to connect debugger. Retrying... : " + e.getMessage());
}
}
};
ApplicationManager.getApplication().invokeAndWait(runnable, ModalityState.any());
}
示例7: shouldCreateTask
import com.intellij.execution.remote.RemoteConfiguration; //导入依赖的package包/类
static boolean shouldCreateTask(RunConfiguration configuration) {
return !(configuration instanceof RemoteConfiguration) && configuration instanceof RunProfileWithCompileBeforeLaunchOption;
}
示例8: createTask
import com.intellij.execution.remote.RemoteConfiguration; //导入依赖的package包/类
public MakeProjectBeforeRunTask createTask(RunConfiguration runConfiguration) {
return !(runConfiguration instanceof RemoteConfiguration) && runConfiguration instanceof RunProfileWithCompileBeforeLaunchOption
? new MakeProjectBeforeRunTask()
: null;
}
示例9: createTask
import com.intellij.execution.remote.RemoteConfiguration; //导入依赖的package包/类
public MakeBeforeRunTask createTask(RunConfiguration runConfiguration) {
return !(runConfiguration instanceof RemoteConfiguration) && runConfiguration instanceof RunProfileWithCompileBeforeLaunchOption
? new MakeBeforeRunTask()
: null;
}
示例10: createTask
import com.intellij.execution.remote.RemoteConfiguration; //导入依赖的package包/类
@Override
public MakeBeforeRunTaskNoErrorCheck createTask(RunConfiguration runConfiguration) {
return !(runConfiguration instanceof RemoteConfiguration) && runConfiguration instanceof RunProfileWithCompileBeforeLaunchOption
? new MakeBeforeRunTaskNoErrorCheck()
: null;
}