[textmate] IJPL-211936 fixed path to bundles detection

It does not depend on the test mode but on the running mode. Sources have a different directory structure, namely for the plugin.

GitOrigin-RevId: eb4ae9443c5d23f383d5c588b9af4787dbed87f2
This commit is contained in:
Alexandr Evstigneev
2025-10-13 15:25:27 +00:00
committed by intellij-monorepo-bot
parent 6402f92edf
commit 2ed74c9b97
@@ -2,6 +2,7 @@
package org.jetbrains.plugins.textmate
import com.intellij.ide.plugins.PluginManagerCore
import com.intellij.notification.Notification
import com.intellij.notification.NotificationAction
import com.intellij.notification.NotificationType
@@ -377,7 +378,7 @@ class TextMateServiceImpl(private val myScope: CoroutineScope) : TextMateService
}
private val bundledBundlePath: Path
get() = PluginPathManager.getPluginHome(if (ApplicationManager.getApplication().isUnitTestMode) "textmate" else "textmate-plugin")
get() = PluginPathManager.getPluginHome(if (PluginManagerCore.isRunningFromSources()) "textmate" else "textmate-plugin")
.toPath().resolve("lib/bundles").normalize()
private fun fireFileTypesChangedEvent(reason: @NonNls String, update: Runnable) {