This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
./gradlew build # Build the plugin ./gradlew test -x rat # Run unit tests (excluding Apache RAT license checks) ./gradlew test --tests "OgnlParsingTest" # Run specific test class ./gradlew test --tests "*Resolving*" # Run tests matching pattern ./gradlew check # Run tests and code analysis ./gradlew koverHtmlReport # Generate code coverage report (build/reports/kover/)
./gradlew runIde # Run IntelliJ IDEA with the plugin loaded ./gradlew runIdeForUiTests # Launch IDE with robot server on port 8082 ./gradlew buildPlugin # Build plugin distribution (build/distributions/) ./gradlew runPluginVerifier # Verify compatibility against specified IDEs
./gradlew runInspections # Run Qodana inspections (requires Docker) ./gradlew rat # Run Apache RAT license check
This is an IntelliJ IDEA Ultimate plugin for Apache Struts 2 framework, providing IDE support for struts.xml configuration, OGNL expressions, validation files, and JSP tag libraries.
com.intellij.struts2 - Core Struts 2 plugin functionalitycom.intellij.lang.ognl - OGNL language support (lexer, parser, highlighting, completion)DOM Model Layer (com.intellij.struts2.dom)
struts/ - Struts XML configuration DOM (actions, results, interceptors, packages)validator/ - Validation XML DOM modelsparams/ - Parameter handling and type conversionimpl/ packages handle reference resolutionFramework Integration (com.intellij.struts2.facet)
StrutsFacet / StrutsFacetType - Framework facet configurationStrutsFrameworkDetector - Auto-detection of Struts projectsStrutsFrameworkInitializer - Modern ProjectActivity-based initialization (replaces deprecated StartupManager)FileSetConfigurationTab - UI for configuring struts.xml file setsReference Resolution (com.intellij.struts2.reference)
StrutsReferenceContributor - XML reference providers for struts.xmljsp/ - JSP tag library references and action link resolutionOGNL Language (com.intellij.lang.ognl)
OgnlLanguage / OgnlFileType - Language definitionlexer/ - JFlex-based lexer (ognl.flex)parser/ - Grammar Kit parser (OgnlParser.bnf)psi/ - PSI element types and implementations in impl/highlight/ - Syntax and semantic highlightingcompletion/ - Code completion providersExtension Points (defined in plugin.xml)
struts2.constantContributor - Add custom Struts constantsstruts2.resultContributor - Custom result type path resolutionstruts2.classContributor - Extend class resolution (actions, interceptors)struts2.paramNameCustomConverter - Custom parameter name resolutionOptional modules loaded via <depends optional="true">:
struts2-freemarker.xml - FreeMarker template supportstruts2-velocity.xml - Velocity template supportstruts2-spring.xml - Spring integrationstruts2-groovy.xml - Groovy annotations supportsrc/test/java - Test classes following IntelliJ Platform test patternssrc/test/testData - Test fixture files (XML, JSP, Java sources)LightJavaCodeInsightFixtureTestCase or similarsrc/main/gen/ - Generated parser/lexer code (included in source set automatically)src/main/grammar/ognl.bnf (Grammar Kit), _OgnlLexer.flex (JFlex)| Branch | Platform Version | Build Range |
|---|---|---|
| 242.x | 2024.2 | 242.* |
| 243.x | 2024.3 | 243.* |
| 251.x | 2025.1 | 251.* |
| 252.x | 2025.2 | 252.* |
| 253.x | 2025.3 | 253.* |
{BRANCH}.{BUILD}.{FIX} (e.g., 252.18970.1)
18969 + git rev-list --count HEAD1 for new builds)The base value 18969 maintains historical continuity from when the plugin was donated by JetBrains to Apache Software Foundation, ensuring version numbers continue from the previous build sequence.
When upgrading to a new IntelliJ Platform version:
gradle.properties:platformVersion - Target platform (e.g., 2025.2)pluginSinceBuild / pluginUntilBuild - Build range (e.g., 251 to 252.*)pluginVersion - Match branch prefix (e.g., 252.x.y)./gradlew runPluginVerifier to detect issues.github/workflows/build.yml - Java version in setupqodana.yml - Linter version and projectJDKbuild.gradle.kts - jvmToolchain() versiongetBasePath() and getTestDataPath() if tests fail to find fixtures"src/test/testData/..."Test Data Path Resolution: IntelliJ 2024.2+ changed how LexerTestCase and DomStubTest resolve paths. If tests fail with “Cannot find source file”, override path methods to use project-relative paths.
Internal API Usage: Some platform icons and utilities are internal. The plugin verifier will warn about these. Prefer public APIs:
AllIcons.Nodes.* instead of PlatformIconsCharset.availableCharsets() instead of CharsetToolkit.getAvailableCharsets()JSP Reference Providers: The javaee.web.customServletReferenceProvider extension point behavior changed in 2024.2. Action link references in JSP may need alternative registration approaches.
Temporarily Disabled Tests: Several tests are disabled pending 2025.3 compatibility fixes: OgnlLexerTest, StrutsCompletionTest, StrutsHighlightingSpringTest, StrutsResultResolvingTest, ActionLinkReferenceProviderTest. See CHANGELOG.md for full list - these should be re-enabled when infrastructure issues are resolved.
- Dependencies - upgrade <name> to <version>./gradlew test -x rat before committing to catch test regressions