File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/main/kotlin/translations Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import com.demonwav.mcdev.translations.index.TranslationIndex
14
14
import com.demonwav.mcdev.translations.sorting.Ordering
15
15
import com.demonwav.mcdev.translations.sorting.TranslationSorter
16
16
import com.demonwav.mcdev.util.applyWriteAction
17
+ import com.demonwav.mcdev.util.findMcpModule
17
18
import com.demonwav.mcdev.util.mcDomain
18
19
import com.intellij.openapi.editor.colors.EditorColors
19
20
import com.intellij.openapi.editor.colors.EditorColorsManager
@@ -55,6 +56,12 @@ class TranslationEditorNotificationProvider :
55
56
TranslationFiles .addAll(psi, fileEntries.asIterable())
56
57
EditorNotifications .updateAll()
57
58
}
59
+
60
+ if (psi.findMcpModule() == null ) {
61
+ // TranslationSorter.query requires an MCP module to work
62
+ return @createActionLabel
63
+ }
64
+
58
65
val sort = Messages .showYesNoDialog(
59
66
project,
60
67
" Would you like to sort all translations now?" ,
You can’t perform that action at this time.
0 commit comments