private void requestClose(boolean withSaving) {
        if (withSaving) {
            if (showConfirmDialog(this, res.get("i.confirm-save"), "", YES_NO_OPTION) != YES_OPTION) {
                return;
            }
            ConnectorMap m = new ConnectorMap();
            for (Object o : listModel.toArray()) {
                ConnectorEntry entry = (ConnectorEntry)o;
                final String id = entry.getId();
                m.setConnector(id, connectorMap.getConnector(id));
            }
            try {
                ConnectorConfiguration.save(m);
            } catch (IOException ex) {
                throw new RuntimeException(ex);
            }
            connectorMap.clear();
            connectorMap.putAll(m);
        } else {
            ConnectorMap fileContent;
            try {
                fileContent = ConnectorConfiguration.load();
            } catch (IOException ex) {
                throw new RuntimeException(ex);
            }
            if (!connectorMap.equals(fileContent)) {
                if (showConfirmDialog(this, res.get("i.confirm-without-save"), "", OK_CANCEL_OPTION) != OK_OPTION) {
                    return;
                }
            }
        }
        dispose();
    }