Search in sources :

Example 1 with AbstractExternalSystemConfigurable

use of com.intellij.openapi.externalSystem.service.settings.AbstractExternalSystemConfigurable in project intellij-community by JetBrains.

the class OpenExternalSystemSettingsCallback method hyperlinkActivated.

@Override
protected void hyperlinkActivated(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
    ExternalSystemManager<?, ?, ?, ?, ?> manager;
    if (myLinkedProjectPath == null || !((manager = ExternalSystemApiUtil.getManager(mySystemId)) instanceof ExternalSystemConfigurableAware)) {
        ShowSettingsUtil.getInstance().showSettingsDialog(myProject, mySystemId.getReadableName());
        return;
    }
    final Configurable configurable = ((ExternalSystemConfigurableAware) manager).getConfigurable(myProject);
    if (configurable instanceof AbstractExternalSystemConfigurable) {
        ShowSettingsUtil.getInstance().editConfigurable(myProject, configurable, () -> ((AbstractExternalSystemConfigurable) configurable).selectProject(myLinkedProjectPath));
    }
}
Also used : AbstractExternalSystemConfigurable(com.intellij.openapi.externalSystem.service.settings.AbstractExternalSystemConfigurable) ExternalSystemConfigurableAware(com.intellij.openapi.externalSystem.ExternalSystemConfigurableAware) Configurable(com.intellij.openapi.options.Configurable) AbstractExternalSystemConfigurable(com.intellij.openapi.externalSystem.service.settings.AbstractExternalSystemConfigurable)

Aggregations

ExternalSystemConfigurableAware (com.intellij.openapi.externalSystem.ExternalSystemConfigurableAware)1 AbstractExternalSystemConfigurable (com.intellij.openapi.externalSystem.service.settings.AbstractExternalSystemConfigurable)1 Configurable (com.intellij.openapi.options.Configurable)1