This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch refactor/remove-experimental-CreateBeanPropertyFixes in repository https://gitbox.apache.org/repos/asf/struts-intellij-plugin.git
commit 7a75ab2102dafc99138cd1eea86c653c23871453 Author: Lukasz Lenart <[email protected]> AuthorDate: Sun Apr 5 20:01:09 2026 +0200 refactor: remove experimental CreateBeanPropertyFixes dependency Drop usage of the experimental `CreateBeanPropertyFixes` API from `BeanPropertyPathReference` and the delegating quick-fix aggregation in `ResultParamNameCustomConverter.MergingBeanPropertyPathReference`. This eliminates the plugin verifier warning about referencing an `@ApiStatus.Experimental` class that may change in future IntelliJ Platform releases. Bean-property resolution, completion, highlighting, and rename/bind behavior are unaffected. 🤖 Generated by AI Assistant Made-with: Cursor --- .../custom/ResultParamNameCustomConverter.java | 19 ++----------------- .../reference/common/BeanPropertyPathReference.java | 21 +-------------------- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/src/main/java/com/intellij/struts2/dom/params/custom/ResultParamNameCustomConverter.java b/src/main/java/com/intellij/struts2/dom/params/custom/ResultParamNameCustomConverter.java index 898ea21..dbcc402 100644 --- a/src/main/java/com/intellij/struts2/dom/params/custom/ResultParamNameCustomConverter.java +++ b/src/main/java/com/intellij/struts2/dom/params/custom/ResultParamNameCustomConverter.java @@ -15,8 +15,6 @@ package com.intellij.struts2.dom.params.custom; import com.intellij.codeInsight.daemon.EmptyResolveMessageProvider; -import com.intellij.codeInspection.LocalQuickFix; -import com.intellij.codeInspection.LocalQuickFixProvider; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiMethod; import com.intellij.psi.PsiReference; @@ -60,13 +58,13 @@ public class ResultParamNameCustomConverter extends ParamNameConverter.ParamName private static final class MergingBeanPropertyPathReference extends PsiReferenceBase<PsiElement> - implements EmptyResolveMessageProvider, LocalQuickFixProvider { + implements EmptyResolveMessageProvider { private final List<BeanPropertyPathReference[]> allReferences = new SmartList<>(); /** * @param element XML element. - * @param paramsElements First element will be used for quickfixes. + * @param paramsElements Elements providing bean property references. */ private MergingBeanPropertyPathReference(@NotNull XmlAttributeValue element, ParamsElement @NotNull ... paramsElements) { @@ -113,18 +111,5 @@ public class ResultParamNameCustomConverter extends ParamNameConverter.ParamName return "Cannot resolve property '" + getValue() + "'"; } - @Override - public @NotNull LocalQuickFix @Nullable [] getQuickFixes() { - List<LocalQuickFix> quickFixes = new SmartList<>(); - for (BeanPropertyPathReference[] reference : allReferences) { - for (BeanPropertyPathReference pathReference : reference) { - final LocalQuickFix[] fixes = pathReference.getQuickFixes(); - if (fixes != null) { - Collections.addAll(quickFixes, fixes); - } - } - } - return quickFixes.toArray(LocalQuickFix.EMPTY_ARRAY); - } } } diff --git a/src/main/java/com/intellij/struts2/reference/common/BeanPropertyPathReference.java b/src/main/java/com/intellij/struts2/reference/common/BeanPropertyPathReference.java index 6cc6376..9f45dc4 100644 --- a/src/main/java/com/intellij/struts2/reference/common/BeanPropertyPathReference.java +++ b/src/main/java/com/intellij/struts2/reference/common/BeanPropertyPathReference.java @@ -17,12 +17,8 @@ package com.intellij.struts2.reference.common; import com.intellij.codeInsight.daemon.EmptyResolveMessageProvider; import com.intellij.codeInsight.lookup.LookupElementBuilder; -import com.intellij.codeInspection.LocalQuickFix; -import com.intellij.codeInspection.LocalQuickFixProvider; import com.intellij.openapi.util.TextRange; -import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.*; -import com.intellij.psi.impl.beanProperties.CreateBeanPropertyFixes; import com.intellij.psi.util.PropertyUtilBase; import com.intellij.util.ArrayUtilRt; import com.intellij.util.IncorrectOperationException; @@ -39,7 +35,7 @@ import java.util.Map; * @author Yann Cébron */ public class BeanPropertyPathReference extends PsiReferenceBase<PsiElement> - implements EmptyResolveMessageProvider, LocalQuickFixProvider { + implements EmptyResolveMessageProvider { private final BeanPropertyPathReferenceSet referenceSet; private final int index; @@ -119,21 +115,6 @@ public class BeanPropertyPathReference extends PsiReferenceBase<PsiElement> return getElement(); } - @Override - public @NotNull LocalQuickFix @Nullable [] getQuickFixes() { - final String value = getValue(); - if (StringUtil.isEmpty(value)) { - return LocalQuickFix.EMPTY_ARRAY; - } - - final PsiClass psiClass = getPsiClass(); - if (psiClass == null) { - return LocalQuickFix.EMPTY_ARRAY; - } - - return CreateBeanPropertyFixes.createFixes(value, psiClass, null, true); - } - @Nullable private PsiMethod resolveProperty(@NotNull final PsiClass psiClass, final String propertyName) { PsiMethod method = isLast() ?
