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 {
|
notEvaluatedInLastImport -> EditorNotificationPanel().apply {
|
||||||
text(KotlinIdeaGradleBundle.message("notification.notEvaluatedInLastImport.text"))
|
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
|
// 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
|
val importTs = root?.data?.importTs
|
||||||
if (root != null && importTs != null && !root.areRelatedFilesChangedBefore(file, importTs)) {
|
// if (root != null && importTs != null && !root.areRelatedFilesChangedBefore(file, importTs)) {
|
||||||
createActionLabel(getMissingConfigurationActionText()) {
|
// createActionLabel(getMissingConfigurationActionText()) {
|
||||||
rootsManager.updateStandaloneScripts {
|
// rootsManager.updateStandaloneScripts {
|
||||||
runPartialGradleImport(project, root)
|
// 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
|
// suggest to choose new gradle project
|
||||||
createActionLabel(KotlinIdeaGradleBundle.message("notification.outsideAnything.linkAction")) {
|
// createActionLabel(KotlinIdeaGradleBundle.message("notification.outsideAnything.linkAction")) {
|
||||||
linkProject(project)
|
// linkProject(project)
|
||||||
}
|
// }
|
||||||
|
|
||||||
createActionLabel(KotlinIdeaGradleBundle.message("notification.notEvaluatedInLastImport.addAsStandaloneAction")) {
|
createActionLabel(KotlinIdeaGradleBundle.message("notification.notEvaluatedInLastImport.addAsStandaloneAction")) {
|
||||||
rootsManager.updateStandaloneScripts {
|
rootsManager.updateStandaloneScripts {
|
||||||
|
|||||||
Reference in New Issue
Block a user