Search in sources :

Example 1 with AddCustomLibraryDialog

use of com.intellij.openapi.roots.ui.configuration.libraries.AddCustomLibraryDialog in project intellij-community by JetBrains.

the class MvcFramework method configureAsLibraryDependency.

protected void configureAsLibraryDependency(@NotNull Module module) {
    final GroovyLibraryDescription description = createLibraryDescription();
    final AddCustomLibraryDialog dialog = AddCustomLibraryDialog.createDialog(description, module, null);
    dialog.setTitle("Change " + getDisplayName() + " SDK version");
    if (dialog.showAndGet())
        module.putUserData(UPGRADE, Boolean.TRUE);
}
Also used : AddCustomLibraryDialog(com.intellij.openapi.roots.ui.configuration.libraries.AddCustomLibraryDialog) GroovyLibraryDescription(org.jetbrains.plugins.groovy.config.GroovyLibraryDescription)

Example 2 with AddCustomLibraryDialog

use of com.intellij.openapi.roots.ui.configuration.libraries.AddCustomLibraryDialog in project intellij-community by JetBrains.

the class MvcUpgradeAction method actionPerformed.

@Override
protected void actionPerformed(@NotNull AnActionEvent e, @NotNull final Module module, @NotNull final MvcFramework framework) {
    final GroovyLibraryDescription description = framework.createLibraryDescription();
    final AddCustomLibraryDialog dialog = AddCustomLibraryDialog.createDialog(description, module, modifiableRootModel -> removeOldMvcSdk(framework, modifiableRootModel));
    dialog.setTitle("Change " + framework.getDisplayName() + " SDK version");
    if (dialog.showAndGet()) {
        module.putUserData(MvcFramework.UPGRADE, Boolean.TRUE);
        module.putUserData(MvcModuleStructureUtil.LAST_MVC_VERSION, null);
    }
}
Also used : AddCustomLibraryDialog(com.intellij.openapi.roots.ui.configuration.libraries.AddCustomLibraryDialog) GroovyLibraryDescription(org.jetbrains.plugins.groovy.config.GroovyLibraryDescription)

Aggregations

AddCustomLibraryDialog (com.intellij.openapi.roots.ui.configuration.libraries.AddCustomLibraryDialog)2 GroovyLibraryDescription (org.jetbrains.plugins.groovy.config.GroovyLibraryDescription)2