本文整理汇总了Java中com.intellij.execution.configurations.RemoteConnection类的典型用法代码示例。如果您正苦于以下问题:Java RemoteConnection类的具体用法?Java RemoteConnection怎么用?Java RemoteConnection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RemoteConnection类属于com.intellij.execution.configurations包,在下文中一共展示了RemoteConnection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStateDescription
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
public String getStateDescription() {
if (myState.myDescription != null) {
return myState.myDescription;
}
switch (myState.myState) {
case STOPPED:
return DebuggerBundle.message("status.debug.stopped");
case RUNNING:
return DebuggerBundle.message("status.app.running");
case WAITING_ATTACH:
RemoteConnection connection = getProcess().getConnection();
final String addressDisplayName = DebuggerBundle.getAddressDisplayName(connection);
final String transportName = DebuggerBundle.getTransportName(connection);
return connection.isServerMode() ? DebuggerBundle.message("status.listening", addressDisplayName, transportName) : DebuggerBundle.message("status.connecting", addressDisplayName, transportName);
case PAUSED:
return DebuggerBundle.message("status.paused");
case WAIT_EVALUATION:
return DebuggerBundle.message("status.waiting.evaluation.result");
case DISPOSED:
return DebuggerBundle.message("status.debug.stopped");
}
return null;
}
示例2: updateHelpText
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
private void updateHelpText() {
boolean useSockets = !myRbShmem.isSelected();
final RemoteConnection connection = new RemoteConnection(
useSockets,
myHostName,
useSockets ? myPortField.getText().trim() : myAddressField.getText().trim(),
myRbListen.isSelected()
);
final String cmdLine = connection.getLaunchCommandLine();
// -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7007
final String jvmtiCmdLine = cmdLine.replace("-Xdebug", "").replace("-Xrunjdwp:", "-agentlib:jdwp=").trim();
myHelpArea.updateText(jvmtiCmdLine);
myJDK14HelpArea.updateText(cmdLine);
myJDK13HelpArea.updateText("-Xnoagent -Djava.compiler=NONE " + cmdLine);
}
示例3: createContentDescriptor
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
@Nullable
@Override
protected RunContentDescriptor createContentDescriptor(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment) throws ExecutionException {
if (state instanceof ExternalSystemRunConfiguration.MyRunnableState) {
int port = ((ExternalSystemRunConfiguration.MyRunnableState)state).getDebugPort();
if (port > 0) {
RemoteConnection connection = new RemoteConnection(true, "127.0.0.1", String.valueOf(port), true);
return attachVirtualMachine(state, environment, connection, true);
}
else {
LOG.warn("Can't attach debugger to external system task execution. Reason: target debug port is unknown");
}
}
else {
LOG.warn(String.format(
"Can't attach debugger to external system task execution. Reason: invalid run profile state is provided"
+ "- expected '%s' but got '%s'",
ExternalSystemRunConfiguration.MyRunnableState.class.getName(), state.getClass().getName()
));
}
return null;
}
示例4: doExecute
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的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());
}
}
示例5: getEventText
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
public String getEventText(Pair<Breakpoint, Event> descriptor) {
String text = "";
final Event event = descriptor.getSecond();
final Breakpoint breakpoint = descriptor.getFirst();
if (event instanceof LocatableEvent) {
if (breakpoint instanceof LineBreakpoint && !((LineBreakpoint)breakpoint).isVisible()) {
text = DebuggerBundle.message("status.stopped.at.cursor");
}
else {
try {
text = breakpoint != null? breakpoint.getEventMessage(((LocatableEvent)event)) : DebuggerBundle.message("status.generic.breakpoint.reached");
}
catch (InternalException e) {
text = DebuggerBundle.message("status.generic.breakpoint.reached");
}
}
}
else if (event instanceof VMStartEvent) {
text = DebuggerBundle.message("status.process.started");
}
else if (event instanceof VMDeathEvent) {
text = DebuggerBundle.message("status.process.terminated");
}
else if (event instanceof VMDisconnectEvent) {
final RemoteConnection connection = getConnection();
final String addressDisplayName = DebuggerBundle.getAddressDisplayName(connection);
final String transportName = DebuggerBundle.getTransportName(connection);
text = DebuggerBundle.message("status.disconnected", addressDisplayName, transportName);
}
return text;
}
示例6: attachVirtualMachine
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
@Nullable
public RunContentDescriptor attachVirtualMachine(Executor executor,
ProgramRunner runner,
ExecutionEnvironment environment,
RunProfileState state,
RunContentDescriptor reuseContent,
RemoteConnection remoteConnection,
boolean pollConnection) throws ExecutionException {
return attachVirtualMachine(new DefaultDebugUIEnvironment(myProject,
executor,
runner,
environment,
state,
reuseContent,
remoteConnection,
pollConnection));
}
示例7: getStateDescription
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
public String getStateDescription() {
if (myState.myDescription != null) {
return myState.myDescription;
}
switch (myState.myState) {
case STATE_STOPPED:
return DebuggerBundle.message("status.debug.stopped");
case STATE_RUNNING:
return DebuggerBundle.message("status.app.running");
case STATE_WAITING_ATTACH:
RemoteConnection connection = getProcess().getConnection();
final String addressDisplayName = DebuggerBundle.getAddressDisplayName(connection);
final String transportName = DebuggerBundle.getTransportName(connection);
return connection.isServerMode() ? DebuggerBundle.message("status.listening", addressDisplayName, transportName) : DebuggerBundle.message("status.connecting", addressDisplayName, transportName);
case STATE_PAUSED:
return DebuggerBundle.message("status.paused");
case STATE_WAIT_EVALUATION:
return DebuggerBundle.message("status.waiting.evaluation.result");
case STATE_DISPOSED:
return DebuggerBundle.message("status.debug.stopped");
}
return myState.myDescription;
}
示例8: createContentDescriptor
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
@Nullable
@Override
protected RunContentDescriptor createContentDescriptor(Project project,
RunProfileState state,
RunContentDescriptor contentToReuse,
ExecutionEnvironment env) throws ExecutionException
{
if (state instanceof ExternalSystemRunConfiguration.MyRunnableState) {
int port = ((ExternalSystemRunConfiguration.MyRunnableState)state).getDebugPort();
if (port > 0) {
RemoteConnection connection = new RemoteConnection(true, "127.0.0.1", String.valueOf(port), false);
return attachVirtualMachine(project, state, contentToReuse, env, connection, true);
}
else {
LOG.warn("Can't attach debugger to external system task execution. Reason: target debug port is unknown");
}
}
else {
LOG.warn(String.format(
"Can't attach debugger to external system task execution. Reason: invalid run profile state is provided"
+ "- expected '%s' but got '%s'",
ExternalSystemRunConfiguration.MyRunnableState.class.getName(), state.getClass().getName()
));
}
return null;
}
示例9: createContentDescriptor
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
@Nullable
@Override
protected RunContentDescriptor createContentDescriptor(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment) throws
ExecutionException
{
final PlayJavaModuleBasedConfiguration runProfile = (PlayJavaModuleBasedConfiguration) environment.getRunProfile();
final PropertiesFile applicationConf = PlayJavaUtil.getApplicationConf(runProfile.getConfigurationModule().getModule());
if(applicationConf == null)
{
throw new ExecutionException(PlayJavaConstants.CONF__APPLICATION_CONF + " not found");
}
final IProperty propertyByKey = applicationConf.findPropertyByKey(PlayJavaConstants.JPDA_PORT);
if(propertyByKey == null)
{
throw new ExecutionException(PlayJavaConstants.JPDA_PORT + " key not found");
}
RemoteConnection connection = new RemoteConnection(true, "127.0.0.1", propertyByKey.getValue(), false);
return attachVirtualMachine(state, environment, connection, true);
}
示例10: createContentDescriptor
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
@Nullable
@Override
protected RunContentDescriptor createContentDescriptor(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment) throws
ExecutionException
{
if(state instanceof ExternalSystemRunConfiguration.MyRunnableState)
{
int port = ((ExternalSystemRunConfiguration.MyRunnableState) state).getDebugPort();
if(port > 0)
{
RemoteConnection connection = new RemoteConnection(true, "127.0.0.1", String.valueOf(port), true);
return attachVirtualMachine(state, environment, connection, true);
}
else
{
LOG.warn("Can't attach debugger to external system task execution. Reason: target debug port is unknown");
}
}
else
{
LOG.warn(String.format("Can't attach debugger to external system task execution. Reason: invalid run profile state is provided" + "- " +
"expected '%s' but got '%s'", ExternalSystemRunConfiguration.MyRunnableState.class.getName(), state.getClass().getName()));
}
return null;
}
示例11: DefaultDebugEnvironment
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
public DefaultDebugEnvironment(@NotNull ExecutionEnvironment environment, @NotNull RunProfileState state, RemoteConnection remoteConnection, boolean pollConnection) {
this.environment = environment;
this.state = state;
myRemoteConnection = remoteConnection;
myPollConnection = pollConnection;
mySearchScope = SearchScopeProvider.createSearchScope(environment.getProject(), environment.getRunProfile());
}
示例12: attachVirtualMachine
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
@Nullable
public RunContentDescriptor attachVirtualMachine(@NotNull ExecutionEnvironment environment,
RunProfileState state,
RemoteConnection remoteConnection,
boolean pollConnection) throws ExecutionException {
return attachVirtualMachine(new DefaultDebugUIEnvironment(environment, state, remoteConnection, pollConnection));
}
示例13: DefaultDebugUIEnvironment
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
public DefaultDebugUIEnvironment(@NotNull ExecutionEnvironment environment,
RunProfileState state,
RemoteConnection remoteConnection,
boolean pollConnection) {
myExecutionEnvironment = environment;
myModelEnvironment = new DefaultDebugEnvironment(environment, state, remoteConnection, pollConnection);
}
示例14: attach
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
@Nullable
private ExecutionResult attach(DebugEnvironment environment) throws ExecutionException {
RemoteConnection remoteConnection = environment.getRemoteConnection();
final String addressDisplayName = DebuggerBundle.getAddressDisplayName(remoteConnection);
final String transportName = DebuggerBundle.getTransportName(remoteConnection);
final ExecutionResult executionResult = myDebugProcess.attachVirtualMachine(environment, this);
getContextManager().setState(SESSION_EMPTY_CONTEXT, State.WAITING_ATTACH,
Event.START_WAIT_ATTACH,
DebuggerBundle.message("status.waiting.attach", addressDisplayName, transportName));
return executionResult;
}
示例15: connectorIsReady
import com.intellij.execution.configurations.RemoteConnection; //导入依赖的package包/类
@Override
public void connectorIsReady() {
DebuggerInvocationUtil.invokeLater(getProject(), new Runnable() {
@Override
public void run() {
RemoteConnection connection = myDebugProcess.getConnection();
final String addressDisplayName = DebuggerBundle.getAddressDisplayName(connection);
final String transportName = DebuggerBundle.getTransportName(connection);
final String connectionStatusMessage = connection.isServerMode() ? DebuggerBundle.message("status.listening", addressDisplayName, transportName) : DebuggerBundle.message("status.connecting", addressDisplayName, transportName);
getContextManager().setState(SESSION_EMPTY_CONTEXT, State.WAITING_ATTACH,
Event.START_WAIT_ATTACH, connectionStatusMessage);
}
});
}