scripting: preload scripting support plugins
This commit is contained in:
committed by
Vladimir Dolzhenko
parent
b5e04378ed
commit
45f0328f21
@@ -62,6 +62,8 @@ class IdeScriptDependenciesProvider(project: Project) : ScriptDependenciesProvid
|
|||||||
* of opened files when configuration will be loaded or updated.
|
* of opened files when configuration will be loaded or updated.
|
||||||
*/
|
*/
|
||||||
interface ScriptConfigurationManager {
|
interface ScriptConfigurationManager {
|
||||||
|
fun loadPlugins()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get cached configuration for [file] or load it.
|
* Get cached configuration for [file] or load it.
|
||||||
* May return null even configuration was loaded but was not yet applied.
|
* May return null even configuration was loaded but was not yet applied.
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ class LoadScriptDefinitionsStartupActivity : StartupActivity {
|
|||||||
} else {
|
} else {
|
||||||
executeOnPooledThread {
|
executeOnPooledThread {
|
||||||
ScriptDefinitionsManager.getInstance(project).reloadScriptDefinitionsIfNeeded()
|
ScriptDefinitionsManager.getInstance(project).reloadScriptDefinitionsIfNeeded()
|
||||||
|
ScriptConfigurationManager.getInstance(project).loadPlugins()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -65,6 +65,10 @@ class CompositeScriptConfigurationManager(val project: Project) : ScriptConfigur
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun loadPlugins() {
|
||||||
|
plugins
|
||||||
|
}
|
||||||
|
|
||||||
fun tryGetScriptDefinitionFast(locationId: String): ScriptDefinition? {
|
fun tryGetScriptDefinitionFast(locationId: String): ScriptDefinition? {
|
||||||
return classpathRoots.getLightScriptInfo(locationId)?.definition
|
return classpathRoots.getLightScriptInfo(locationId)?.definition
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user