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

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

commit d7f4c5aaa1c31a79268ea7127ee02cb488523b96
Author: Lukasz Lenart <lukaszlen...@apache.org>
AuthorDate: Thu Aug 7 20:33:52 2025 +0200

    Addresses deprecation warnings and sets proper plugin version
---
 CLAUDE.md                                          | 25 +++++++++++++++++++++-
 build.gradle.kts                                   |  5 +++++
 gradle.properties                                  |  2 +-
 .../java/com/intellij/struts2/StrutsIcons.java     |  6 +++---
 .../intellij/struts2/ognl/OgnlTypedHandler.java    |  8 ++++---
 .../ognl/template/OgnlTemplateContextType.java     |  7 ++++--
 .../lang/ognl/formatting/OgnlFormattingTest.java   |  2 +-
 7 files changed, 44 insertions(+), 11 deletions(-)

diff --git a/CLAUDE.md b/CLAUDE.md
index 1bc7d83..4e82f85 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -95,6 +95,27 @@ This section documents the process for upgrading the plugin 
to support newer ver
 
 **Files to Update:**
 
+Version Format: {BRANCH}.{BUILD}.{FIX}
+
+- 241 = IntelliJ Platform branch (2024.1)
+- 18968 = Build number within that branch
+- 1 = Fix/patch version
+
+Meaning:
+- This plugin version targets IntelliJ IDEA 2024.1 platform
+- Build 18968 corresponds to a specific IntelliJ build
+- Version 1 indicates first release for this build
+
+Context:
+The "untagged" prefix suggests this was an automated release draft created by 
your build workflow, but the tag URL appears to be truncated or no longer 
accessible (404 error).
+
+IntelliJ Version Mapping:
+- 241.x = IntelliJ IDEA 2024.1
+- 242.x = IntelliJ IDEA 2024.2
+- 243.x = IntelliJ IDEA 2024.3
+
+This versioning ensures plugin compatibility with specific IntelliJ Platform 
versions and helps users identify which IDE version the plugin supports.
+
 #### 1. `gradle.properties`
 ```properties
 # Platform version
@@ -105,7 +126,9 @@ pluginSinceBuild = 242
 pluginUntilBuild = 242.*
 
 # Plugin version should match platform
-pluginVersion = 242.0.0  # Use 242.x.x format
+pluginVersion = 242.18968.1  # Use 242.x.y format
+
+# where x represents the previous build number plus 1, y supposed be set to 1
 ```
 
 #### 2. `build.gradle.kts`
diff --git a/build.gradle.kts b/build.gradle.kts
index 9aa5456..bb0422d 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -30,6 +30,11 @@ kotlin {
     jvmToolchain(21)
 }
 
+// Configure Java compiler options
+tasks.withType<JavaCompile> {
+    options.compilerArgs.add("-Xlint:deprecation")
+}
+
 // Configure project's dependencies
 repositories {
     mavenCentral()
diff --git a/gradle.properties b/gradle.properties
index 6b8d62e..e6940d4 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -4,7 +4,7 @@ pluginGroup = com.intellij.struts2
 pluginName = struts2
 pluginRepositoryUrl = https://github.com/apache/struts-intellij-plugin/
 # SemVer format -> https://semver.org
-pluginVersion = 242.0.0
+pluginVersion = 242.18969.1
 
 # Supported build number ranges and IntelliJ Platform versions -> 
https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
 pluginSinceBuild = 242
diff --git a/src/main/java/com/intellij/struts2/StrutsIcons.java 
b/src/main/java/com/intellij/struts2/StrutsIcons.java
index 3b669d2..d2dbce8 100644
--- a/src/main/java/com/intellij/struts2/StrutsIcons.java
+++ b/src/main/java/com/intellij/struts2/StrutsIcons.java
@@ -16,7 +16,7 @@
 package com.intellij.struts2;
 
 import com.intellij.icons.AllIcons;
-import com.intellij.openapi.fileTypes.StdFileTypes;
+import com.intellij.ide.highlighter.XmlFileType;
 import com.intellij.ui.LayeredIcon;
 import com.intellij.ui.scale.JBUIScale;
 
@@ -76,10 +76,10 @@ public final class StrutsIcons {
   public static final Icon THEME = AllIcons.Gutter.Colors;
 
   static {
-    STRUTS_CONFIG_FILE.setIcon(StdFileTypes.XML.getIcon(), 0);
+    STRUTS_CONFIG_FILE.setIcon(XmlFileType.INSTANCE.getIcon(), 0);
     STRUTS_CONFIG_FILE.setIcon(Struts2Icons.Action_small, 1, OVERLAY_X_OFFSET, 
OVERLAY_Y_OFFSET);
 
-    VALIDATION_CONFIG_FILE.setIcon(StdFileTypes.XML.getIcon(), 0);
+    VALIDATION_CONFIG_FILE.setIcon(XmlFileType.INSTANCE.getIcon(), 0);
     VALIDATION_CONFIG_FILE.setIcon(Struts2Icons.Edit_small, 1, 
OVERLAY_X_OFFSET, OVERLAY_Y_OFFSET);
 
     ACTION_CLASS.setIcon(AllIcons.Nodes.Class, 0);
diff --git a/src/main/java/com/intellij/struts2/ognl/OgnlTypedHandler.java 
b/src/main/java/com/intellij/struts2/ognl/OgnlTypedHandler.java
index 0a99be8..abfd6e1 100644
--- a/src/main/java/com/intellij/struts2/ognl/OgnlTypedHandler.java
+++ b/src/main/java/com/intellij/struts2/ognl/OgnlTypedHandler.java
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package com.intellij.lang.ognl;
+package com.intellij.struts2.ognl;
 
 import com.intellij.codeInsight.CodeInsightSettings;
 import com.intellij.codeInsight.editorActions.TypedHandlerDelegate;
@@ -22,7 +22,9 @@ import com.intellij.openapi.project.Project;
 import com.intellij.psi.PsiDocumentManager;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiFile;
-import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
+import com.intellij.lang.ognl.OgnlFileType;
+import com.intellij.lang.ognl.OgnlLanguage;
+import com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl;
 import org.jetbrains.annotations.NotNull;
 
 /**
@@ -46,7 +48,7 @@ public class OgnlTypedHandler extends TypedHandlerDelegate {
     if (file.getFileType() != OgnlFileType.INSTANCE) {
       
PsiDocumentManager.getInstance(project).commitDocument(editor.getDocument());
       final int offset = editor.getCaretModel().getOffset();
-      final PsiElement elementAtCursor = 
InjectedLanguageUtil.findElementAtNoCommit(file, offset);
+      final PsiElement elementAtCursor = 
InjectedLanguageManagerImpl.getInstanceImpl(project).findInjectedElementAt(file,
 offset);
       if (elementAtCursor == null) {
         return Result.CONTINUE;
       }
diff --git 
a/src/main/java/com/intellij/struts2/ognl/template/OgnlTemplateContextType.java 
b/src/main/java/com/intellij/struts2/ognl/template/OgnlTemplateContextType.java
index 6481b29..b56846d 100644
--- 
a/src/main/java/com/intellij/struts2/ognl/template/OgnlTemplateContextType.java
+++ 
b/src/main/java/com/intellij/struts2/ognl/template/OgnlTemplateContextType.java
@@ -13,8 +13,9 @@
  * limitations under the License.
  */
 
-package com.intellij.lang.ognl.template;
+package com.intellij.struts2.ognl.template;
 
+import com.intellij.codeInsight.template.TemplateActionContext;
 import com.intellij.codeInsight.template.TemplateContextType;
 import com.intellij.lang.ognl.OgnlFileType;
 import com.intellij.lang.ognl.OgnlLanguage;
@@ -36,7 +37,9 @@ public class OgnlTemplateContextType extends 
TemplateContextType {
   }
 
   @Override
-  public boolean isInContext(@NotNull final PsiFile psiFile, final int offset) 
{
+  public boolean isInContext(@NotNull final TemplateActionContext context) {
+    PsiFile psiFile = context.getFile();
+    int offset = context.getStartOffset();
     if (psiFile.getFileType() == OgnlFileType.INSTANCE) {
       return true;
     }
diff --git 
a/src/test/java/com/intellij/lang/ognl/formatting/OgnlFormattingTest.java 
b/src/test/java/com/intellij/lang/ognl/formatting/OgnlFormattingTest.java
index 74ee4e3..bbdcafa 100644
--- a/src/test/java/com/intellij/lang/ognl/formatting/OgnlFormattingTest.java
+++ b/src/test/java/com/intellij/lang/ognl/formatting/OgnlFormattingTest.java
@@ -104,7 +104,7 @@ public class OgnlFormattingTest extends 
BasePlatformTestCase {
   private void doTest(final String before,
                       final String after) {
     myFixture.configureByText(OgnlFileType.INSTANCE, 
OgnlTestUtils.createExpression(before));
-    WriteCommandAction.runWriteCommandAction(null, () -> {
+    WriteCommandAction.runWriteCommandAction(myFixture.getProject(), () -> {
       
CodeStyleManager.getInstance(myFixture.getProject()).reformat(myFixture.getFile());
     });
     myFixture.checkResult(OgnlTestUtils.createExpression(after));

Reply via email to