J2K: do not run runUndoTransparentAction outside EDT

#KT-39739 fixed
This commit is contained in:
Ilya Kirillov
2020-07-16 21:05:24 +03:00
parent d16f246375
commit dccac34282
2 changed files with 15 additions and 14 deletions
@@ -28,20 +28,18 @@ class ShortenReferenceProcessing : FileBasedPostProcessing() {
}
override fun runProcessing(file: KtFile, allFiles: List<KtFile>, rangeMarker: RangeMarker?, converterContext: NewJ2kConverterContext) {
CommandProcessor.getInstance().runUndoTransparentAction {
if (rangeMarker != null) {
if (rangeMarker.isValid) {
ShortenReferences.DEFAULT.process(
file,
rangeMarker.startOffset,
rangeMarker.endOffset,
filter,
actionRunningMode = ActionRunningMode.RUN_IN_EDT
)
}
} else {
ShortenReferences.DEFAULT.process(file, filter, actionRunningMode = ActionRunningMode.RUN_IN_EDT)
if (rangeMarker != null) {
if (rangeMarker.isValid) {
ShortenReferences.DEFAULT.process(
file,
rangeMarker.startOffset,
rangeMarker.endOffset,
filter,
actionRunningMode = ActionRunningMode.RUN_IN_EDT
)
}
} else {
ShortenReferences.DEFAULT.process(file, filter, actionRunningMode = ActionRunningMode.RUN_IN_EDT)
}
}
}