gradle scripts: temporary disable irrelevant actions when script configuration was not received during import
This commit is contained in:
+13
-11
@@ -58,21 +58,23 @@ class GradleScriptNotificationProvider(private val project: Project) :
|
||||
notEvaluatedInLastImport -> EditorNotificationPanel().apply {
|
||||
text(KotlinIdeaGradleBundle.message("notification.notEvaluatedInLastImport.text"))
|
||||
|
||||
// todo: this actions will be usefull only when gradle fix https://github.com/gradle/gradle/issues/12640
|
||||
// suggest to reimport project if something changed after import
|
||||
val root = scriptUnderRoot.nearest as? Imported
|
||||
// val root = scriptUnderRoot.nearest as? Imported
|
||||
val importTs = root?.data?.importTs
|
||||
if (root != null && importTs != null && !root.areRelatedFilesChangedBefore(file, importTs)) {
|
||||
createActionLabel(getMissingConfigurationActionText()) {
|
||||
rootsManager.updateStandaloneScripts {
|
||||
runPartialGradleImport(project, root)
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (root != null && importTs != null && !root.areRelatedFilesChangedBefore(file, importTs)) {
|
||||
// createActionLabel(getMissingConfigurationActionText()) {
|
||||
// rootsManager.updateStandaloneScripts {
|
||||
// runPartialGradleImport(project, root)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// todo: this actions will be usefull only when gradle fix https://github.com/gradle/gradle/issues/12640
|
||||
// suggest to choose new gradle project
|
||||
createActionLabel(KotlinIdeaGradleBundle.message("notification.outsideAnything.linkAction")) {
|
||||
linkProject(project)
|
||||
}
|
||||
// createActionLabel(KotlinIdeaGradleBundle.message("notification.outsideAnything.linkAction")) {
|
||||
// linkProject(project)
|
||||
// }
|
||||
|
||||
createActionLabel(KotlinIdeaGradleBundle.message("notification.notEvaluatedInLastImport.addAsStandaloneAction")) {
|
||||
rootsManager.updateStandaloneScripts {
|
||||
|
||||
Reference in New Issue
Block a user