mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-120593 Do not suggest to create 'Static Web' module in IntelliJ IDEA Community Edition if there are no specific project templates like 'Dart'.
This commit is contained in:
@@ -33,6 +33,7 @@ import com.intellij.ide.wizard.CommitStepException;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleType;
|
||||
import com.intellij.openapi.module.WebModuleTypeBase;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
@@ -56,6 +57,7 @@ import com.intellij.ui.*;
|
||||
import com.intellij.ui.SingleSelectionModel;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.PlatformUtils;
|
||||
import com.intellij.util.containers.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -265,6 +267,16 @@ public class ProjectTypeStep extends ModuleWizardStep implements Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
// remove Static Web group in IDEA Community if no specific templates found (IDEA-120593)
|
||||
if (PlatformUtils.isIdeaCommunity()) {
|
||||
for (TemplatesGroup group : myTemplatesMap.keySet()) {
|
||||
if (WebModuleTypeBase.WEB_MODULE.equals(group.getId()) && myTemplatesMap.get(group).isEmpty()) {
|
||||
myTemplatesMap.remove(group);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<TemplatesGroup> groups = new ArrayList<TemplatesGroup>(myTemplatesMap.keySet());
|
||||
|
||||
// sorting by module type popularity
|
||||
|
||||
Reference in New Issue
Block a user