@Override public Object[] getChildren(Object parentElement) { if (parentElement instanceof IDSServer) { IDSServer server = (IDSServer) parentElement; List<IDSProject> projects = server.getDsProjects(); return projects.toArray(); } else { return null; } }
protected boolean accept(IDSServer server) { if (server.getState() == IDSServer.STATE_STARTED || server.getState() == IDSServer.STATE_STARTING || server.getState() == IDSServer.STATE_STARTED_DEBUG || server.getState() == IDSServer.STATE_STOPPING || server.getState() == IDSServer.STATE_ACTIVE || server.getState() == IDSServer.STATE_ACTIVE_IN_DEBUG) { return true; } return false; }
@Override public void run(final IDSServer server) { try { if (server.getState() != IDSServerStates.STATE_STOPPED) { getContributions().stop(server); } } catch (UnableToStopServerException e) { MessageDialog.openError( Display.getCurrent().getActiveShell(), "Cannot launch the server", e.getMessage()); } }