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


Java ConnectionStatus类代码示例

本文整理汇总了Java中com.intellij.remoteServer.runtime.ConnectionStatus的典型用法代码示例。如果您正苦于以下问题:Java ConnectionStatus类的具体用法?Java ConnectionStatus怎么用?Java ConnectionStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: doDisconnect

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
private void doDisconnect() {
  if (myStatus == ConnectionStatus.CONNECTED) {
    if (myRuntimeInstance != null) {
      myRuntimeInstance.disconnect();
      myRuntimeInstance = null;
    }
    setStatus(ConnectionStatus.DISCONNECTED);
    for (DeploymentLogManagerImpl logManager : myLogManagers.values()) {
      logManager.disposeLogs();
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ServerConnectionImpl.java

示例2: getStatusIcon

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
@Nullable
private Icon getStatusIcon(final ConnectionStatus status) {
  switch (status) {
    case CONNECTED: return RemoteServersIcons.ResumeScaled;
    case DISCONNECTED: return RemoteServersIcons.SuspendScaled;
    default: return null;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ServersTreeStructure.java

示例3: testConnection

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
private void testConnection() {
  final ServerConnection connection = ServerConnectionManager.getInstance().getOrCreateConnection(myServer);
  final AtomicReference<Runnable> showResultRef = new AtomicReference<Runnable>(null);
  new Task.Modal(null, "Connecting...", true) {
    @Override
    public void run(@NotNull ProgressIndicator indicator) {
      indicator.setIndeterminate(true);
      final Semaphore semaphore = new Semaphore();
      semaphore.down();
      connection.connect(new Runnable() {
        @Override
        public void run() {
          showResultRef.set(new Runnable() {
            @Override
            public void run() {
              if (connection.getStatus() == ConnectionStatus.CONNECTED) {
                Messages.showInfoMessage(myMainPanel, "Connection successful", "Test Connection");
              }
              else if (connection.getStatus() == ConnectionStatus.DISCONNECTED) {
                Messages.showErrorDialog(myMainPanel, "Cannot connect: " + connection.getStatusText(), "Test Connection");
              }
            }
          });
          semaphore.up();
        }
      });
      while (!indicator.isCanceled()) {
        semaphore.waitFor(500);
      }
      Runnable showResult = showResultRef.get();
      if (showResult != null) {
        ApplicationManager.getApplication().invokeLater(showResult);
      }
    }
  }.queue();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:37,代码来源:RemoteServerConfigurable.java

示例4: disconnect

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
private void disconnect() {
  if (myStatus == ConnectionStatus.CONNECTED) {
    myRuntimeInstance = null;
    myConnector.disconnect();
    myStatus = ConnectionStatus.DISCONNECTED;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:ServerConnectionImpl.java

示例5: testConnection

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
private void testConnection() {
  final ServerConnection connection = ServerConnectionManager.getInstance().getOrCreateConnection(myServer);
  final AtomicReference<Runnable> showResultRef = new AtomicReference<Runnable>(null);
  new Task.Modal(null, "Connecting...", true) {
    @Override
    public void run(@Nonnull ProgressIndicator indicator) {
      indicator.setIndeterminate(true);
      final Semaphore semaphore = new Semaphore();
      semaphore.down();
      connection.connect(new Runnable() {
        @Override
        public void run() {
          showResultRef.set(new Runnable() {
            @Override
            public void run() {
              if (connection.getStatus() == ConnectionStatus.CONNECTED) {
                Messages.showInfoMessage(myMainPanel, "Connection successful", "Test Connection");
              }
              else if (connection.getStatus() == ConnectionStatus.DISCONNECTED) {
                Messages.showErrorDialog(myMainPanel, "Cannot connect: " + connection.getStatusText(), "Test Connection");
              }
            }
          });
          semaphore.up();
        }
      });
      while (!indicator.isCanceled()) {
        if (semaphore.waitFor(500)) {
          break;
        }
      }
      Runnable showResult = showResultRef.get();
      if (showResult != null) {
        ApplicationManager.getApplication().invokeLater(showResult);
      }
    }
  }.queue();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:39,代码来源:RemoteServerConfigurable.java

示例6: doDisconnect

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
private void doDisconnect() {
  if (myStatus == ConnectionStatus.CONNECTED) {
    if (myRuntimeInstance != null) {
      myRuntimeInstance.disconnect();
      myRuntimeInstance = null;
    }
    setStatus(ConnectionStatus.DISCONNECTED);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:ServerConnectionImpl.java

示例7: updateServerDetails

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
private void updateServerDetails(ServersTreeStructure.RemoteServerNode node) {
  RemoteServer<?> server = ((ServersTreeStructure.RemoteServerNode)node).getValue();
  ServerConnection connection = ServerConnectionManager.getInstance().getConnection(server);
  if (connection == null || connection.getStatus() == ConnectionStatus.DISCONNECTED) {
    showMessageLabel("Double-click on the server node to connect");
  }
  else {
    showMessageLabel(connection.getStatusText());
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:ServersToolWindowContent.java

示例8: getStatus

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
@NotNull
@Override
public ConnectionStatus getStatus() {
  return myStatus;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ServerConnectionImpl.java

示例9: setStatus

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
private void setStatus(final ConnectionStatus status) {
  setStatus(status, null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ServerConnectionImpl.java

示例10: isConnected

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
public boolean isConnected() {
  ServerConnection<?> connection = getConnection();
  return connection != null && connection.getStatus() == ConnectionStatus.CONNECTED;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ServersTreeStructure.java

示例11: getStatus

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
@Nonnull
@Override
public ConnectionStatus getStatus() {
  return myStatus;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:ServerConnectionImpl.java

示例12: setStatus

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
private void setStatus(final ConnectionStatus status) {
  myStatus = status;
  myEventDispatcher.queueConnectionStatusChanged(this);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:ServerConnectionImpl.java

示例13: isConnected

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
@Override
public boolean isConnected() {
  ServerConnection<?> connection = getConnection();
  return connection != null && connection.getStatus() == ConnectionStatus.CONNECTED;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:ServersTreeStructure.java

示例14: isStartActionEnabled

import com.intellij.remoteServer.runtime.ConnectionStatus; //导入依赖的package包/类
@Override
public boolean isStartActionEnabled(@Nonnull Executor executor) {
  ServerConnection connection = getConnection();
  return executor.equals(DefaultRunExecutor.getRunExecutorInstance()) &&
         (connection == null || connection.getStatus() == ConnectionStatus.DISCONNECTED);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:7,代码来源:ServersTreeStructure.java


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