filler.setLayoutData(gd);
}
protected void sideButtonPressed(int index) {
if (index == IDX_ADD) {
Server newServer = getServerFromWizard();
if (newServer != null) {
fServersList.addElement(newServer);
ServersManager.addServer(newServer);
ServersManager.save();
Display.getDefault().asyncExec(new Runnable() {
public void run() {
fServersList.refresh();
}
});
}
} else if (index == IDX_EDIT) {
handleEditServerButtonSelected();
fServersList.refresh();
} else if (index == IDX_DEFAULT) {
List selectedElements = fServersList.getSelectedElements();
if (selectedElements.size() > 0) {
Server server = (Server) selectedElements.get(0);
ServersManager.setDefaultServer(null, server);
ServersManager.save();
fServersList.refresh();
}
}