Example #1
0
 public static IRemoteConnection[] getSuitableConnections() {
   IRemoteServicesManager manager = Activator.getService(IRemoteServicesManager.class);
   if (manager == null) return null;
   ArrayList<IRemoteConnection> suitableConnections = new ArrayList<>();
   List<IRemoteConnection> allConnections = manager.getAllRemoteConnections();
   for (IRemoteConnection conn : allConnections) {
     if (conn.hasService(IRemoteCommandShellService.class)) {
       suitableConnections.add(conn);
     }
   }
   return suitableConnections.toArray(new IRemoteConnection[] {});
 }
Example #2
0
 public static IRemoteConnection getRemoteConnectionByName(String remoteConnection) {
   if (remoteConnection == null) return null;
   IRemoteServicesManager manager = Activator.getService(IRemoteServicesManager.class);
   if (manager == null) {
     return null;
   }
   List<IRemoteConnection> conns = manager.getAllRemoteConnections();
   for (IRemoteConnection conn : conns) {
     if (conn.getName().contentEquals(remoteConnection)) {
       return conn;
     }
   }
   return null;
 }
Example #3
0
 public void stop(BundleContext bundleContext) throws Exception {
   IRemoteServicesManager remoteManager = getService(IRemoteServicesManager.class);
   remoteManager.removeRemoteConnectionChangeListener(ArduinoRemoteConnectionListener.INSTANCE);
   plugin = null;
 }
Example #4
0
 public void start(BundleContext bundleContext) throws Exception {
   plugin = this;
   IRemoteServicesManager remoteManager = getService(IRemoteServicesManager.class);
   remoteManager.addRemoteConnectionChangeListener(ArduinoRemoteConnectionListener.INSTANCE);
 }