This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/struts-intellij-plugin.git


The following commit(s) were added to refs/heads/main by this push:
     new 105af2b  Supports IntelliJ platform 2024.2 (#13)
105af2b is described below

commit 105af2b8bae0e56462036efe694c4cb691af7550
Author: Lukasz Lenart <lukasz.len...@gmail.com>
AuthorDate: Thu Aug 7 20:03:50 2025 +0200

    Supports IntelliJ platform 2024.2 (#13)
---
 .github/workflows/build.yml                        |  31 +++-
 .github/workflows/release.yml                      |   2 +-
 .gitignore                                         |   5 +-
 CHANGELOG.md                                       |   9 ++
 CLAUDE.md                                          | 172 ++++++++++++++++++++-
 build.gradle.kts                                   |   4 +-
 gradle.properties                                  |   8 +-
 qodana.yml                                         |  24 ++-
 .../struts2/facet/StrutsFrameworkDetector.java     |   5 +-
 9 files changed, 234 insertions(+), 26 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0db7c4e..aebdb7a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -64,7 +64,7 @@ jobs:
         uses: actions/setup-java@v4
         with:
           distribution: zulu
-          java-version: 17
+          java-version: 21
 
       # Setup Gradle
       - name: Setup Gradle
@@ -126,7 +126,7 @@ jobs:
         uses: actions/setup-java@v4
         with:
           distribution: zulu
-          java-version: 17
+          java-version: 21
 
       # Setup Gradle
       - name: Setup Gradle
@@ -164,20 +164,32 @@ jobs:
       pull-requests: write
     steps:
 
+      # Free GitHub Actions Environment Disk Space
+      - name: Maximize Build Space
+        uses: jlumbroso/free-disk-space@v1.3.1
+        with:
+          tool-cache: false
+          large-packages: false
+
       # Check out the current repository
       - name: Fetch Sources
         uses: actions/checkout@v4
+        with:
+          # to check out the actual pull request commit, not the merge commit
+          ref: ${{ github.event.pull_request.head.sha }}
+          # a full history is required for pull request analysis
+          fetch-depth: 0
 
-      # Set up Java environment for the next steps
+      # Set up the Java environment for the next steps
       - name: Setup Java
         uses: actions/setup-java@v4
         with:
           distribution: zulu
-          java-version: 17
+          java-version: 21
 
       # Run Qodana inspections
       - name: Qodana - Code Inspection
-        uses: JetBrains/qodana-action@v2024.1.5
+        uses: JetBrains/qodana-action@v2024.2.6
         with:
           cache-default-branch-only: true
 
@@ -188,6 +200,13 @@ jobs:
     runs-on: ubuntu-latest
     steps:
 
+      # Free GitHub Actions Environment Disk Space
+      - name: Maximize Build Space
+        uses: jlumbroso/free-disk-space@v1.3.1
+        with:
+          tool-cache: false
+          large-packages: false
+
       # Check out the current repository
       - name: Fetch Sources
         uses: actions/checkout@v4
@@ -197,7 +216,7 @@ jobs:
         uses: actions/setup-java@v4
         with:
           distribution: zulu
-          java-version: 17
+          java-version: 21
 
       # Setup Gradle
       - name: Setup Gradle
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 0dd0aee..bc6305a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -49,7 +49,7 @@ jobs:
         uses: actions/setup-java@v4
         with:
           distribution: zulu
-          java-version: 17
+          java-version: 21
 
       # Setup Gradle
       - name: Setup Gradle
diff --git a/.gitignore b/.gitignore
index e0da412..45d02b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,6 +41,7 @@ bin/
 .DS_Store
 
 ### Claude Code ###
-.claude
+.claude/
 
-.cert
+### Private certs ###
+.cert/
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 99c537b..8764439 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,15 @@
 
 ## [Unreleased]
 
+### Changed
+
+- Update `platformVersion` to `2024.2`
+- Change since/until build to `242-242.*` (2024.2)
+- Upgrade Java toolchain from 17 to 21 (required by IntelliJ 2024.2)
+- Update GitHub Actions workflows to use Java 21
+- Fix `WebUtilImpl.isWebFacetConfigurationContainingFiles` API compatibility 
issue for IntelliJ 2024.2
+- Dependencies - upgrade `org.jetbrains.intellij.platform` to `2.1.0`
+
 ### Added
 
 - [WW-5558](https://issues.apache.org/jira/browse/WW-5558) Support for new 
Struts 7 packages
diff --git a/CLAUDE.md b/CLAUDE.md
index f4bb2c2..1bc7d83 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -78,6 +78,172 @@ The plugin supports multiple view technologies:
 ### Build Configuration
 - Gradle-based build with Kotlin DSL
 - IntelliJ Platform Gradle Plugin 2.1.0
-- Supports IntelliJ IDEA Ultimate 2023.3+
-- Java 17 toolchain requirement
-- Code coverage via Kover plugin
\ No newline at end of file
+- Supports IntelliJ IDEA Ultimate 2024.2+
+- Java 21 toolchain requirement
+- Code coverage via Kover plugin
+
+## IntelliJ Platform Upgrade Guide
+
+This section documents the process for upgrading the plugin to support newer 
versions of IntelliJ Platform.
+
+### Upgrading to IntelliJ Platform 2024.2
+
+**Prerequisites:**
+- IntelliJ Platform Gradle Plugin 2.0+ (migration already completed)
+- Java 21 required (2024.2+ requirement)
+- Gradle 8.5+ running on Java 17+
+
+**Files to Update:**
+
+#### 1. `gradle.properties`
+```properties
+# Platform version
+platformVersion = 2024.2
+
+# Build number ranges (2024.2 = 242)
+pluginSinceBuild = 242
+pluginUntilBuild = 242.*
+
+# Plugin version should match platform
+pluginVersion = 242.0.0  # Use 242.x.x format
+```
+
+#### 2. `build.gradle.kts`
+```kotlin
+// Update Java toolchain
+kotlin {
+    jvmToolchain(21)  # Java 21 required for 2024.2+
+}
+
+// Update Qodana plugin version to match platform
+id("org.jetbrains.qodana") version "2024.2.6"
+```
+
+#### 3. `.github/workflows/build.yml`
+```yaml
+# Update Java version in all jobs
+- name: Setup Java
+  uses: actions/setup-java@v4
+  with:
+    distribution: zulu
+    java-version: 21  # Changed from 17
+
+# Update Qodana action version
+- name: Qodana - Code Inspection
+  uses: JetBrains/qodana-action@v2024.2.6
+
+# Add disk space management for resource-intensive jobs (inspectCode, verify)
+- name: Maximize Build Space
+  uses: jlumbroso/free-disk-space@v1.3.1
+  with:
+    tool-cache: false
+    large-packages: false
+```
+
+#### 4. `.github/workflows/release.yml`
+```yaml
+# Update Java version
+- name: Setup Java
+  uses: actions/setup-java@v4
+  with:
+    distribution: zulu
+    java-version: 21  # Changed from 17
+```
+
+#### 5. `qodana.yml` (update existing file)
+```yaml
+version: "1.0"
+linter: jetbrains/qodana-jvm-community:2024.2  # Match platform version
+projectJDK: 21  # Match Java requirement
+exclude:
+  - name: All
+    paths:
+      - .qodana
+      - build
+      - gradle
+      - gradlew
+      - gradlew.bat
+      - src/test/testData
+include:
+  - name: Root
+    paths:
+      - src/main/java
+      - src/main/resources
+```
+
+#### 6. API Compatibility Fixes
+Check and fix any deprecated/removed APIs by reviewing the [API Changes 
List](https://plugins.jetbrains.com/docs/intellij/api-changes-list-2024.html):
+
+**Example from 2024.2 upgrade:**
+```java
+// Before (removed in 2024.2)
+return WebUtilImpl.isWebFacetConfigurationContainingFiles(underlying, files);
+
+// After (compatible alternative)
+return underlying instanceof WebFacetConfiguration;
+```
+
+#### 7. `CHANGELOG.md`
+Document the upgrade:
+```markdown
+### Changed
+- Update `platformVersion` to `2024.2`
+- Change since/until build to `242-242.*` (2024.2)
+- Upgrade Java toolchain from 17 to 21 (required by IntelliJ 2024.2)
+- Update GitHub Actions workflows to use Java 21
+- Fix API compatibility issues for IntelliJ 2024.2
+- Dependencies - upgrade plugin versions to match 2024.2
+```
+
+### General Upgrade Process
+
+**Step 1: Check Requirements**
+1. Review [JetBrains migration 
documentation](https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-migration.html)
+2. Check Java version requirements for target platform
+3. Verify IntelliJ Platform Gradle Plugin version compatibility
+
+**Step 2: Update Configuration Files**
+1. Update `gradle.properties` with new platform version and build numbers
+2. Update `build.gradle.kts` with correct Java toolchain and plugin versions
+3. Update GitHub Actions workflows with matching Java versions
+4. Update `qodana.yml` with corresponding linter version
+
+**Step 3: Fix API Compatibility**
+1. Review [API Changes 
List](https://plugins.jetbrains.com/docs/intellij/api-changes-list-2024.html) 
for breaking changes
+2. Update deprecated/removed API calls
+3. Test compilation and runtime compatibility
+
+**Step 4: Verification**
+1. **Build Test**: `./gradlew build` - Ensure compilation succeeds
+2. **Unit Tests**: `./gradlew test -x rat` - Verify no API compatibility 
issues  
+3. **Plugin Verifier**: `./gradlew runPluginVerifier` - Check compatibility 
against target IDEs
+4. **Qodana Check**: Verify code quality analysis runs without version warnings
+
+**Step 5: Documentation**
+1. Update `CHANGELOG.md` with upgrade details
+2. Update this guide with any new findings or issues
+3. Document any plugin-specific compatibility fixes
+
+### Common Issues & Solutions
+
+**Java Version Mismatch**
+- Error: `sourceCompatibility='17' but IntelliJ Platform requires 
sourceCompatibility='21'`
+- Solution: Update `jvmToolchain()` in `build.gradle.kts` and all GitHub 
Actions workflows
+
+**Qodana Version Warnings**
+- Error: `You are running a Qodana linter without an exact version tag`
+- Solution: Update `qodana.yml` with specific linter version matching platform
+
+**API Compatibility Issues**
+- Error: `cannot find symbol` for removed methods
+- Solution: Check API changes documentation and replace with compatible 
alternatives
+
+**Kotlin K2 Mode**
+- Java-based plugins automatically support K2 mode (no migration needed)
+- If using Kotlin APIs, may need migration to Analysis API
+
+### Migration Resources
+- [IntelliJ Platform Migration 
Guide](https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-migration.html)
+- [API Changes 
List](https://plugins.jetbrains.com/docs/intellij/api-changes-list-2024.html)
+- [Platform Gradle Plugin 
2.0](https://blog.jetbrains.com/platform/2024/07/intellij-platform-gradle-plugin-2-0/)
+- [Build Number 
Ranges](https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html)
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index 006bbe4..9aa5456 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -15,7 +15,7 @@ plugins {
     // Gradle Changelog Plugin
     id("org.jetbrains.changelog") version "2.2.1"
     // Gradle Qodana Plugin
-    id("org.jetbrains.qodana") version "2024.1.9"
+    id("org.jetbrains.qodana") version "2024.2.6"
     // Gradle Kover Plugin
     id("org.jetbrains.kotlinx.kover") version "0.8.3"
     // Apache RAT Plugin
@@ -27,7 +27,7 @@ version = providers.gradleProperty("pluginVersion").get()
 
 // Set the JVM language level used to build the project.
 kotlin {
-    jvmToolchain(17)
+    jvmToolchain(21)
 }
 
 // Configure project's dependencies
diff --git a/gradle.properties b/gradle.properties
index d5c8275..6b8d62e 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -4,14 +4,14 @@ pluginGroup = com.intellij.struts2
 pluginName = struts2
 pluginRepositoryUrl = https://github.com/apache/struts-intellij-plugin/
 # SemVer format -> https://semver.org
-pluginVersion = 241.18968.1
+pluginVersion = 242.0.0
 
 # Supported build number ranges and IntelliJ Platform versions -> 
https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
-pluginSinceBuild = 233
-pluginUntilBuild = 241.*
+pluginSinceBuild = 242
+pluginUntilBuild = 242.*
 
 # IntelliJ Platform Properties -> 
https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
-platformVersion = 2023.3
+platformVersion = 2024.2
 
 # Gradle Releases -> https://github.com/gradle/gradle/releases
 gradleVersion = 8.9
diff --git a/qodana.yml b/qodana.yml
index 9f5b2d0..c02d69b 100644
--- a/qodana.yml
+++ b/qodana.yml
@@ -16,12 +16,24 @@
 # Qodana configuration:
 # https://www.jetbrains.com/help/qodana/qodana-yaml.html
 
-version: 1.0
-linter: jetbrains/qodana-jvm-community:latest
-projectJDK: "17"
-profile:
-  name: qodana.recommended
+version: "1.0"
+
+linter: jetbrains/qodana-jvm-community:2024.2
+
+projectJDK: 21
+
 exclude:
   - name: All
     paths:
-      - .qodana
\ No newline at end of file
+      - .qodana
+      - build
+      - gradle
+      - gradlew
+      - gradlew.bat
+      - src/test/testData
+
+include:
+  - name: Root
+    paths:
+      - src/main/java
+      - src/main/resources
\ No newline at end of file
diff --git 
a/src/main/java/com/intellij/struts2/facet/StrutsFrameworkDetector.java 
b/src/main/java/com/intellij/struts2/facet/StrutsFrameworkDetector.java
index 370ff65..7c6ace3 100644
--- a/src/main/java/com/intellij/struts2/facet/StrutsFrameworkDetector.java
+++ b/src/main/java/com/intellij/struts2/facet/StrutsFrameworkDetector.java
@@ -19,7 +19,7 @@ import com.intellij.facet.FacetType;
 import com.intellij.framework.detection.FacetBasedFrameworkDetector;
 import com.intellij.framework.detection.FileContentPattern;
 import com.intellij.ide.highlighter.XmlFileType;
-import com.intellij.javaee.web.WebUtilImpl;
+import com.intellij.javaee.web.facet.WebFacetConfiguration;
 import com.intellij.openapi.fileTypes.FileType;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.patterns.ElementPattern;
@@ -63,6 +63,7 @@ public class StrutsFrameworkDetector extends 
FacetBasedFrameworkDetector<StrutsF
   public boolean isSuitableUnderlyingFacetConfiguration(final 
FacetConfiguration underlying,
                                                         final 
StrutsFacetConfiguration configuration,
                                                         final Set<? extends 
VirtualFile> files) {
-    return WebUtilImpl.isWebFacetConfigurationContainingFiles(underlying, 
files);
+    // Check if the underlying configuration is a WebFacetConfiguration
+    return underlying instanceof WebFacetConfiguration;
   }
 }

Reply via email to