Class IntellijPluginUtils
java.lang.Object
uno.anahata.asi.intellij.internal.IntellijPluginUtils
Utility class for introspecting the IntelliJ IDEA runtime and assembling the full plugin classpath.
Mirrors the dependency resolution architecture of NetBeansModuleUtils by dynamically
discovering the plugin descriptor, recursively traversing declared plugin dependencies (such as
the IntelliJ Platform, Java plugin, Maven integration, and Terminal support), and aggregating
all required library JARs without hardcoding specific paths or IDs.
- Author:
- anahata
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor to prevent instantiation of this utility class. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringAssembles the complete runtime classpath by traversing the plugin descriptor and its declared dependencies, the IntelliJ Platform core libraries, and the system classpath.private static voidcollectPluginJars(com.intellij.ide.plugins.IdeaPluginDescriptor descriptor, Set<com.intellij.openapi.extensions.PluginId> processedPlugins, Set<String> paths) Recursively traverses a plugin descriptor and its declared dependencies, collecting all packaged JAR files from each plugin'slibdirectory.static StringReturns the comprehensive classpath string for the Anahata ASI IntelliJ plugin runtime.static voidResets the cached plugin classpath, forcing re-resolution on subsequent accesses.
-
Field Details
-
PLUGIN_ID
The official plugin ID of the Anahata ASI IntelliJ integration.- See Also:
-
cachedAnahataAsiPluginClasspath
Cached classpath string for the IntelliJ plugin runtime environment.
-
-
Constructor Details
-
IntellijPluginUtils
private IntellijPluginUtils()Private constructor to prevent instantiation of this utility class.
-
-
Method Details
-
getFullAnahataAsiPluginClasspath
Returns the comprehensive classpath string for the Anahata ASI IntelliJ plugin runtime. The result is cached after the first computation.- Returns:
- the fully assembled classpath string separated by
File.pathSeparator.
-
resetCachedPluginClasspath
public static void resetCachedPluginClasspath()Resets the cached plugin classpath, forcing re-resolution on subsequent accesses. -
buildFullPluginClasspath
Assembles the complete runtime classpath by traversing the plugin descriptor and its declared dependencies, the IntelliJ Platform core libraries, and the system classpath.- Returns:
- the combined classpath string.
-
collectPluginJars
private static void collectPluginJars(com.intellij.ide.plugins.IdeaPluginDescriptor descriptor, Set<com.intellij.openapi.extensions.PluginId> processedPlugins, Set<String> paths) Recursively traverses a plugin descriptor and its declared dependencies, collecting all packaged JAR files from each plugin'slibdirectory.- Parameters:
descriptor- the plugin descriptor to inspect.processedPlugins- set of already visited plugin IDs to prevent circular dependency loops.paths- the accumulator set for resolved JAR file paths.
-

