Search in sources :

Example 1 with SQServerWizard

use of org.sonarlint.intellij.config.global.wizard.SQServerWizard in project sonarlint-intellij by SonarSource.

the class SonarQubeServerMgmtPanel method editServer.

private void editServer() {
    SonarQubeServer selectedServer = getSelectedServer();
    int selectedIndex = serverList.getSelectedIndex();
    if (selectedServer != null) {
        SQServerWizard serverEditor = new SQServerWizard(selectedServer);
        if (serverEditor.showAndGet()) {
            SonarQubeServer newServer = serverEditor.getServer();
            ((CollectionListModel) serverList.getModel()).setElementAt(newServer, selectedIndex);
            servers.set(servers.indexOf(selectedServer), newServer);
            serverChangeListener.changed(servers);
        }
    }
}
Also used : CollectionListModel(com.intellij.ui.CollectionListModel) RelativePoint(com.intellij.ui.awt.RelativePoint) SQServerWizard(org.sonarlint.intellij.config.global.wizard.SQServerWizard)

Aggregations

CollectionListModel (com.intellij.ui.CollectionListModel)1 RelativePoint (com.intellij.ui.awt.RelativePoint)1 SQServerWizard (org.sonarlint.intellij.config.global.wizard.SQServerWizard)1