Add write action for shorten references in finish template after building call (KT-12056)
Write action was removed in idea 146 #KT-12056 Fixed
This commit is contained in:
+2
-2
@@ -194,7 +194,7 @@ class CallableBuilder(val config: CallableBuilderConfiguration) {
|
|||||||
ApplicationManager.getApplication().invokeLater { context.showDialogIfNeeded() }
|
ApplicationManager.getApplication().invokeLater { context.showDialogIfNeeded() }
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ShortenReferences.DEFAULT.process(elementsToShorten)
|
runWriteAction { ShortenReferences.DEFAULT.process(elementsToShorten) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -992,7 +992,6 @@ class CallableBuilder(val config: CallableBuilderConfiguration) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CodeStyleManager.getInstance(project).reformat(newDeclaration)
|
CodeStyleManager.getInstance(project).reformat(newDeclaration)
|
||||||
}
|
|
||||||
|
|
||||||
// change short type names to fully qualified ones (to be shortened below)
|
// change short type names to fully qualified ones (to be shortened below)
|
||||||
val typeRefsToShorten = setupTypeReferencesForShortening(newDeclaration, parameterTypeExpressions)
|
val typeRefsToShorten = setupTypeReferencesForShortening(newDeclaration, parameterTypeExpressions)
|
||||||
@@ -1001,6 +1000,7 @@ class CallableBuilder(val config: CallableBuilderConfiguration) {
|
|||||||
setupEditor(newDeclaration)
|
setupEditor(newDeclaration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
declarationMarker.dispose()
|
declarationMarker.dispose()
|
||||||
finished = true
|
finished = true
|
||||||
|
|||||||
Reference in New Issue
Block a user