mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-79927: "Create project from existing sources" doesn't work with HTML/JS only projects (cherry picked from commit 9f17876)
This commit is contained in:
+2
@@ -42,4 +42,6 @@ public interface ProjectFromSourcesBuilder {
|
||||
|
||||
@NotNull
|
||||
WizardContext getContext();
|
||||
|
||||
boolean hasRootsFromOtherDetectors(ProjectStructureDetector thisDetector);
|
||||
}
|
||||
|
||||
+10
@@ -32,6 +32,7 @@ import com.intellij.ide.util.projectWizard.importSources.ProjectStructureDetecto
|
||||
import com.intellij.openapi.application.AccessToken;
|
||||
import com.intellij.openapi.application.WriteAction;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
import com.intellij.openapi.module.*;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -262,6 +263,15 @@ public class ProjectFromSourcesBuilderImpl extends ProjectBuilder implements Pro
|
||||
myUpdaters.add(updater);
|
||||
}
|
||||
|
||||
public boolean hasRootsFromOtherDetectors(ProjectStructureDetector thisDetector) {
|
||||
for (ProjectStructureDetector projectStructureDetector : Extensions.getExtensions(ProjectStructureDetector.EP_NAME)) {
|
||||
if (projectStructureDetector != thisDetector && !getProjectRoots(projectStructureDetector).isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static Module createModule(ProjectDescriptor projectDescriptor, final ModuleDescriptor descriptor,
|
||||
final Map<LibraryDescriptor, Library> projectLibs, final ModifiableModuleModel moduleModel)
|
||||
|
||||
Reference in New Issue
Block a user