use of com.intellij.openapi.roots.PlatformModifiableModelsProvider in project intellij-community by JetBrains.
the class FrameworkDetectionManager method showSetupFrameworksDialog.
private void showSetupFrameworksDialog(Notification notification) {
List<? extends DetectedFrameworkDescription> descriptions;
try {
descriptions = getValidDetectedFrameworks();
} catch (IndexNotReadyException e) {
DumbService.getInstance(myProject).showDumbModeNotification("Information about detected frameworks is not available until indices are built");
return;
}
if (descriptions.isEmpty()) {
Messages.showInfoMessage(myProject, "No frameworks are detected", "Framework Detection");
return;
}
final ConfigureDetectedFrameworksDialog dialog = new ConfigureDetectedFrameworksDialog(myProject, descriptions);
if (dialog.showAndGet()) {
notification.expire();
List<DetectedFrameworkDescription> selected = dialog.getSelectedFrameworks();
FrameworkDetectionUtil.setupFrameworks(selected, new PlatformModifiableModelsProvider(), new DefaultModulesProvider(myProject));
for (DetectedFrameworkDescription description : selected) {
final int detectorId = FrameworkDetectorRegistry.getInstance().getDetectorId(description.getDetector());
myDetectedFrameworksData.putExistentFrameworkFiles(detectorId, description.getRelatedFiles());
}
}
}
Aggregations