From f0510d24b808aaff99532d63fdfd458a4b4f2236 Mon Sep 17 00:00:00 2001 From: Vitaliy Boyko Date: Sat, 15 Apr 2023 12:42:58 +0300 Subject: [PATCH 1/3] 1527: fixed java.lang.NoClassDefFoundError: org/codehaus/plexus/util/StringUtils --- .../dialog/event/eavdialog/DataPatchNameAdapter.java | 6 +++--- .../dialog/event/eavdialog/SourceModelNameAdapter.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/com/magento/idea/magento2plugin/actions/generation/dialog/event/eavdialog/DataPatchNameAdapter.java b/src/com/magento/idea/magento2plugin/actions/generation/dialog/event/eavdialog/DataPatchNameAdapter.java index 536b1a487..c2331371e 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/dialog/event/eavdialog/DataPatchNameAdapter.java +++ b/src/com/magento/idea/magento2plugin/actions/generation/dialog/event/eavdialog/DataPatchNameAdapter.java @@ -11,7 +11,7 @@ import javax.swing.event.DocumentEvent; import javax.swing.text.BadLocationException; import javax.swing.text.Document; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import org.jetbrains.annotations.NotNull; public class DataPatchNameAdapter extends DocumentAdapter { @@ -73,7 +73,7 @@ private void updateDataPatchFileName(final String attributeCode) { String fileName = ""; for (final String fileNamePart : SplitEavAttributeCodeUtil.execute(attributeCode)) { - fileName = String.join("", fileName, StringUtils.capitalise(fileNamePart)); + fileName = String.join("", fileName, StringUtils.capitalize(fileNamePart)); } dataPatchNameTextField.setText( @@ -81,7 +81,7 @@ private void updateDataPatchFileName(final String attributeCode) { "", NAME_PREFIX, fileName, - StringUtils.capitalise(entityType), NAME_SUFFIX + StringUtils.capitalize(entityType), NAME_SUFFIX ) ); } diff --git a/src/com/magento/idea/magento2plugin/actions/generation/dialog/event/eavdialog/SourceModelNameAdapter.java b/src/com/magento/idea/magento2plugin/actions/generation/dialog/event/eavdialog/SourceModelNameAdapter.java index 1128e2ef1..d0fb22b0e 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/dialog/event/eavdialog/SourceModelNameAdapter.java +++ b/src/com/magento/idea/magento2plugin/actions/generation/dialog/event/eavdialog/SourceModelNameAdapter.java @@ -11,7 +11,7 @@ import javax.swing.event.DocumentEvent; import javax.swing.text.BadLocationException; import javax.swing.text.Document; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import org.jetbrains.annotations.NotNull; public class SourceModelNameAdapter extends DocumentAdapter { @@ -46,7 +46,7 @@ private void updateSourceModelName(final String attributeCode) { final StringBuilder sourceModelClassName = new StringBuilder(); for (final String codePart : SplitEavAttributeCodeUtil.execute(attributeCode)) { - sourceModelClassName.append(StringUtils.capitalise(codePart)); + sourceModelClassName.append(StringUtils.capitalize(codePart)); } sourceModelNameTexField.setText(sourceModelClassName.toString()); From f315e702fd6a671f9e432da901d053c139c361e3 Mon Sep 17 00:00:00 2001 From: Vitaliy Boyko Date: Sat, 15 Apr 2023 12:49:35 +0300 Subject: [PATCH 2/3] 1527: updated CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 613fa7f20..fc05811ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). ## 5.1.1 +### Fixed + +- java.lang.NoClassDefFoundError: org/codehaus/plexus/util/StringUtils [#1235](https://github.com/magento/magento2-phpstorm-plugin/pull/1530) + ## 5.1.0 ### Fixed From 9c2eb77ea4103e2d2cf473648a8f01e82f465366 Mon Sep 17 00:00:00 2001 From: Vitaliy Boyko Date: Sat, 15 Apr 2023 13:10:22 +0300 Subject: [PATCH 3/3] 1527: fixed tests --- CHANGELOG.md | 2 +- .../magento2plugin/linemarker/LinemarkerFixtureTestCase.java | 1 - .../graphqls/GraphQlResolverClassLinemarkerRegistrarTest.java | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc05811ef..b6cc12faa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). ### Fixed -- java.lang.NoClassDefFoundError: org/codehaus/plexus/util/StringUtils [#1235](https://github.com/magento/magento2-phpstorm-plugin/pull/1530) +- java.lang.NoClassDefFoundError: org/codehaus/plexus/util/StringUtils [#1530](https://github.com/magento/magento2-phpstorm-plugin/pull/1530) ## 5.1.0 diff --git a/tests/com/magento/idea/magento2plugin/linemarker/LinemarkerFixtureTestCase.java b/tests/com/magento/idea/magento2plugin/linemarker/LinemarkerFixtureTestCase.java index 8d292c667..e47e486fc 100644 --- a/tests/com/magento/idea/magento2plugin/linemarker/LinemarkerFixtureTestCase.java +++ b/tests/com/magento/idea/magento2plugin/linemarker/LinemarkerFixtureTestCase.java @@ -59,7 +59,6 @@ protected void assertHasNoLinemarkerWithTooltipAndIcon( = "Failed that documents not contains linemarker with the tooltip `%s`"; final List> lineMarkers = getDocumentLineMarkers(); - assertNotEmpty(lineMarkers); for (final LineMarkerInfo lineMarkerInfo: lineMarkers) { final String lineMarkerTooltip = lineMarkerInfo.getLineMarkerTooltip(); final Icon lineMarkerIcon = lineMarkerInfo.getIcon(); diff --git a/tests/com/magento/idea/magento2plugin/linemarker/graphqls/GraphQlResolverClassLinemarkerRegistrarTest.java b/tests/com/magento/idea/magento2plugin/linemarker/graphqls/GraphQlResolverClassLinemarkerRegistrarTest.java index 8709da579..ba0bb9048 100644 --- a/tests/com/magento/idea/magento2plugin/linemarker/graphqls/GraphQlResolverClassLinemarkerRegistrarTest.java +++ b/tests/com/magento/idea/magento2plugin/linemarker/graphqls/GraphQlResolverClassLinemarkerRegistrarTest.java @@ -15,6 +15,6 @@ public class GraphQlResolverClassLinemarkerRegistrarTest extends LinemarkerFixtu public void testWithValidSchemaResolver() { myFixture.configureByFile(this.getFixturePath("schema.graphqls", "graphqls")); - assertHasLinemarkerWithTooltipAndIcon("Navigate to class", "nodes/class.svg"); + assertHasLinemarkerWithTooltipAndIcon("Navigate to class", "Class"); } }