lukaszlenart opened a new issue, #103:
URL: https://github.com/apache/struts-intellij-plugin/issues/103

   ## Context
   
   JetBrains notified plugin authors that in **IntelliJ Platform 2026.2**, the 
JavaScript plugin was migrated to the **v2 plugin model**. Functionality is 
split into separate content modules; a plain dependency on the `JavaScript` 
plugin may no longer be enough at runtime.
   
   Typical linkage errors:
   
   ```
   java.lang.NoClassDefFoundError: com/intellij/lang/javascript/JSElementTypes
   java.lang.ClassNotFoundException: com.intellij.lang.javascript.JSElementTypes
   ```
   
   This plugin depends on the JavaScript plugin (`<plugin id="JavaScript"/>` in 
`plugin.xml`, `bundledPlugin("JavaScript")` in Gradle) for JS language 
injection in Struts taglib attributes.
   
   **Blocked on:** IntelliJ Platform **2026.2** release (build `262.*`). The 
repo currently targets **2026.1** (`platformVersion = 2026.1`, 
`pluginSinceBuild = 261`).
   
   ## Scope of JavaScript API usage
   
   Only two production files import `com.intellij.lang.javascript.*`:
   
   | File | Classes used |
   |------|--------------|
   | `src/main/java/com/intellij/struts2/jsp/TaglibJavaScriptInjector.java` | 
`JavaScriptSupportLoader`, `JSInXmlLanguagesInjector` |
   | 
`src/main/java/com/intellij/struts2/freemarker/FreeMarkerJavaScriptInjector.java`
 | `JavaScriptSupportLoader` |
   
   No direct usage of `JSElementTypes`, `JSLanguage`, `JSReferenceExpression`, 
JS lexers/parsers, etc.
   
   ## Required v2 module dependencies
   
   Based on class placement in the 2026.1 distribution and JetBrains WEB-77676 
(JavaScript plugin → fully v2):
   
   | Class | v2 module |
   |-------|-----------|
   | `JavaScriptSupportLoader` | `intellij.javascript.parser` |
   | `JSInXmlLanguagesInjector` | `intellij.javascript.backend` |
   
   Keep the existing `<plugin id="JavaScript"/>` dependency — v2 `<module>` 
entries are **additional** runtime classloader requirements.
   
   If residual `NoClassDefFoundError` occurs after adding the two modules 
above, try `intellij.javascript.common` before broader sets (`psi.impl`, 
`analysis.impl`).
   
   ## Proposed changes
   
   ### `src/main/resources/META-INF/plugin.xml`
   
   ```xml
   <dependencies>
       ...
       <plugin id="JavaScript"/>
       <module name="intellij.javascript.parser"/>
       <module name="intellij.javascript.backend"/>
       ...
   </dependencies>
   ```
   
   ### `build.gradle.kts` (when retargeting to 2026.2)
   
   ```kotlin
   bundledPlugin("JavaScript")
   bundledModule("intellij.javascript.parser")
   bundledModule("intellij.javascript.backend")
   ```
   
   ### Platform upgrade (same release cycle)
   
   When 2026.2 is available, also update `gradle.properties`:
   
   - `platformVersion` → `2026.2`
   - `pluginSinceBuild` / `pluginUntilBuild` → `262` / `262.*`
   - `pluginVersion` branch prefix → `262.x.y`
   
   See [Platform Upgrade 
Checklist](https://github.com/apache/struts-intellij-plugin/blob/master/CLAUDE.md#platform-upgrade-checklist)
 in `CLAUDE.md`.
   
   ## Acceptance criteria
   
   - [ ] `plugin.xml` declares `intellij.javascript.parser` and 
`intellij.javascript.backend`
   - [ ] Gradle declares matching `bundledModule(...)` entries
   - [ ] Build targets IntelliJ Platform 2026.2 (`262.*`)
   - [ ] `./gradlew build` and `./gradlew runPluginVerifier` pass against 2026.2
   - [ ] `./gradlew runIde` — JSP and FreeMarker Struts taglib JS injection 
works (no classloader errors)
   - [ ] `CHANGELOG.md` updated
   
   ## References
   
   - [Plugin Dependencies — modular 
plugins](https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html)
   - [IntelliJ Platform Gradle Plugin — 
`bundledModule()`](https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html)
   - JetBrains intellij-plugins commit WEB-77676: JavaScript plugin converted 
to fully-v2 module


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to