diff --git a/README.md b/README.md
index fbea56a..a731083 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,19 @@
# object-helper-plugin
-
-
-
-
+
+

+
+
+
-插件地址:[object-helper-plugin](https://plugins.jetbrains.com/plugin/15788-objecthelper)
+JetBrains Intellij IDEA ObjectHelper 插件旨在减少开发者重复低效的劳动,使开发者能够更专注于业务逻辑的开发。
-JetBrains Intellij IDEA ObjectHelper插件,包含以下功能:
+该插件包含以下功能:
- 对象拷贝
@@ -22,14 +28,16 @@ JetBrains Intellij IDEA ObjectHelper插件,包含以下功能:

- Java类转Thrift IDL
+

- Java类转XML
+

- 插件配置
-File->settings->Tools->Object Helper 即可进入插件的配置页面
+File->Settings->Tools->Object Helper 即可进入插件的配置页面

@@ -39,7 +47,8 @@ object-helper插件未来功能支持计划:
- [x] Class转IDL(Class To Thrift IDL)
- [x] Class转XML(Class To XML)
+- [x] 个性化配置
- [ ] JSON转Class(JSON TO Class)
+- [ ] Class转Protobuf IDL(JSON TO Class)
- [ ] All Setter
- [ ] 菜单分组显示
-- [x] 个性化配置
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index f419e84..55b4ad7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,10 +1,11 @@
plugins {
- id 'org.jetbrains.intellij' version '1.8.0'
+ // https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md
+ id 'org.jetbrains.intellij' version '1.16.1'
id 'java'
}
group 'cn.bigcoder.plugin'
-version '1.3.0'
+version '1.3.1'
repositories {
mavenCentral()
@@ -13,17 +14,19 @@ repositories {
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
+ implementation 'org.apache.commons:commons-lang3:3.13.0'
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
- version = '2021.2.1'
+ version = '2023.3.1'
plugins = ['com.intellij.java']
}
patchPluginXml {
+ sinceBuild = '211'
changeNotes = """
- Add change notes here.
- most HTML tags may be used"""
+ 1. fix feature:Resolve version compatibility issues and adapt new versions of the IDE
+ """
}
test {
useJUnitPlatform()
diff --git a/src/main/java/cn/bigcoder/plugin/objecthelper/action/ClassToJsonAction.java b/src/main/java/cn/bigcoder/plugin/objecthelper/action/ClassToJsonAction.java
index 1183e6f..ed31287 100644
--- a/src/main/java/cn/bigcoder/plugin/objecthelper/action/ClassToJsonAction.java
+++ b/src/main/java/cn/bigcoder/plugin/objecthelper/action/ClassToJsonAction.java
@@ -27,7 +27,7 @@ public void actionPerformed(AnActionEvent anAction) {
}
String json = getGenerator(psiClass).generate();
CopyPasteManager.getInstance().setContents(new StringSelection(json));
- NotificationUtils.notifyInfo(anAction.getProject(), "JSON字符串成功置入剪贴板:
" + json);
+ NotificationUtils.notifyInfo(anAction.getProject(), "JSON字符串成功置入剪贴板:
" + json);
}
@Override
diff --git a/src/main/java/cn/bigcoder/plugin/objecthelper/common/util/NotificationUtils.java b/src/main/java/cn/bigcoder/plugin/objecthelper/common/util/NotificationUtils.java
index 78b2453..f0b9d48 100644
--- a/src/main/java/cn/bigcoder/plugin/objecthelper/common/util/NotificationUtils.java
+++ b/src/main/java/cn/bigcoder/plugin/objecthelper/common/util/NotificationUtils.java
@@ -1,7 +1,7 @@
package cn.bigcoder.plugin.objecthelper.common.util;
-import com.intellij.notification.NotificationDisplayType;
import com.intellij.notification.NotificationGroup;
+import com.intellij.notification.NotificationGroupManager;
import com.intellij.notification.NotificationType;
import com.intellij.openapi.project.Project;
@@ -14,7 +14,8 @@ public class NotificationUtils {
/**
* 从2020.3版本方式,通知组改由Plugin.xml注册。详见:https://plugins.jetbrains.com/docs/intellij/notifications.html#top-level-notifications
*/
- private static final NotificationGroup NOTIFICATION_GROUP = new NotificationGroup("ObjectHelper Notification Group", NotificationDisplayType.BALLOON, true);
+ private static final NotificationGroup NOTIFICATION_GROUP = NotificationGroupManager.getInstance()
+ .getNotificationGroup("ObjectHelper Notification Group");
public static void notifyInfo(Project project, String content) {
NOTIFICATION_GROUP.createNotification(content, NotificationType.INFORMATION).notify(project);
diff --git a/src/main/java/cn/bigcoder/plugin/objecthelper/common/util/PsiTypeUtils.java b/src/main/java/cn/bigcoder/plugin/objecthelper/common/util/PsiTypeUtils.java
index 0f00f1a..c539a76 100644
--- a/src/main/java/cn/bigcoder/plugin/objecthelper/common/util/PsiTypeUtils.java
+++ b/src/main/java/cn/bigcoder/plugin/objecthelper/common/util/PsiTypeUtils.java
@@ -4,12 +4,12 @@
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiClassType;
import com.intellij.psi.PsiType;
-import org.apache.commons.lang.time.DateFormatUtils;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
+import org.apache.commons.lang3.time.DateFormatUtils;
import static cn.bigcoder.plugin.objecthelper.common.constant.JavaClassName.*;
diff --git a/src/main/java/cn/bigcoder/plugin/objecthelper/generator/AbstractDataObjectGenerator.java b/src/main/java/cn/bigcoder/plugin/objecthelper/generator/AbstractDataObjectGenerator.java
index e7d3384..d490bfe 100644
--- a/src/main/java/cn/bigcoder/plugin/objecthelper/generator/AbstractDataObjectGenerator.java
+++ b/src/main/java/cn/bigcoder/plugin/objecthelper/generator/AbstractDataObjectGenerator.java
@@ -11,11 +11,11 @@
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.compress.utils.Sets;
-import org.apache.commons.lang.ArrayUtils;
-
import java.util.List;
import java.util.Map;
+
import java.util.Set;
+import org.apache.commons.lang3.ArrayUtils;
/**
* @author: Jindong.Tian
diff --git a/src/main/java/cn/bigcoder/plugin/objecthelper/generator/idl/ThriftIDLGenerator.java b/src/main/java/cn/bigcoder/plugin/objecthelper/generator/idl/ThriftIDLGenerator.java
index 6ab6a57..2ea54f1 100644
--- a/src/main/java/cn/bigcoder/plugin/objecthelper/generator/idl/ThriftIDLGenerator.java
+++ b/src/main/java/cn/bigcoder/plugin/objecthelper/generator/idl/ThriftIDLGenerator.java
@@ -12,10 +12,10 @@
import com.intellij.psi.impl.source.PsiClassReferenceType;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.compress.utils.Sets;
-import org.apache.commons.lang.ArrayUtils;
import java.util.List;
import java.util.Set;
+import org.apache.commons.lang3.ArrayUtils;
/**
* @author: Jindong.Tian
diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml
index 9fcb614..5c2e9be 100644
--- a/src/main/resources/META-INF/plugin.xml
+++ b/src/main/resources/META-INF/plugin.xml
@@ -1,7 +1,7 @@
cn.bigcoder.plugin.objecthelper
ObjectHelper
- 1.3.0
+ 1.3.1
HearingSmile
New feature:Added the ability to quickly convert Java classes to XML
- New feature:Customize to enable specified functions
+ fix feature:Resolve version compatibility issues and adapt new versions of the IDE
]]>
-
+
@@ -37,6 +36,10 @@
instance="cn.bigcoder.plugin.objecthelper.config.ObjectHelperConfigurable"/>
+
+