Skip to content

Commit 59e0ef0

Browse files
committed
1.3.1版本:
1. 提升插件兼容性,去除新版本客户端废弃API
1 parent b0e6d24 commit 59e0ef0

File tree

8 files changed

+40
-24
lines changed

8 files changed

+40
-24
lines changed

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
# object-helper-plugin
22

3-
![](https://img.shields.io/badge/version-v1.3.0-blue)
4-
![](https://img.shields.io/badge/license-Apache%202-red)
5-
![](https://img.shields.io/badge/size-64%20kB-yellowgreen)
6-
![](https://img.shields.io/badge/download-1.7k-green)
3+
<div align="center">
4+
<a href="https://plugins.jetbrains.com/plugin/15788-objecthelper" style="text-decoration:none"><img src="./src/main/resources/META-INF/pluginIcon.svg" width="128px"></a>
5+
</div>
6+
<br/>
7+
<div align="center">
8+
<img src="https://img.shields.io/badge/version-v1.3.0-blue">
9+
<img src="https://img.shields.io/badge/license-Apache%202-red">
10+
<img src="https://img.shields.io/badge/size-600%20kB-yellowgreen">
11+
<img src="https://img.shields.io/badge/downloads-3.1k-green">
12+
</div>
713

8-
插件地址:[object-helper-plugin](https://plugins.jetbrains.com/plugin/15788-objecthelper)
14+
JetBrains Intellij IDEA ObjectHelper 插件旨在减少开发者重复低效的劳动,使开发者能够更专注于业务逻辑的开发。
915

10-
JetBrains Intellij IDEA ObjectHelper插件,包含以下功能
16+
该插件包含以下功能
1117

1218
- 对象拷贝
1319

@@ -22,14 +28,16 @@ JetBrains Intellij IDEA ObjectHelper插件,包含以下功能:
2228
![](https://image.bigcoder.cn/20210227223302.gif)
2329

2430
- Java类转Thrift IDL
31+
2532
![](https://image.bigcoder.cn/6eee7a02-8e4e-4f11-9b8c-81d661a920c5.gif)
2633

2734
- Java类转XML
35+
2836
![](https://image.bigcoder.cn/20220916170144.gif)
2937

3038
- 插件配置
3139

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

3442
![](https://image.bigcoder.cn/20220916173227.png)
3543

@@ -39,7 +47,8 @@ object-helper插件未来功能支持计划:
3947

4048
- [x] Class转IDL(Class To Thrift IDL)
4149
- [x] Class转XML(Class To XML)
50+
- [x] 个性化配置
4251
- [ ] JSON转Class(JSON TO Class)
52+
- [ ] Class转Protobuf IDL(JSON TO Class)
4353
- [ ] All Setter
4454
- [ ] 菜单分组显示
45-
- [x] 个性化配置

build.gradle

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
plugins {
2-
id 'org.jetbrains.intellij' version '1.8.0'
2+
// https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md
3+
id 'org.jetbrains.intellij' version '1.16.1'
34
id 'java'
45
}
56

67
group 'cn.bigcoder.plugin'
7-
version '1.3.0'
8+
version '1.3.1'
89

910
repositories {
1011
mavenCentral()
@@ -13,17 +14,19 @@ repositories {
1314
dependencies {
1415
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
1516
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
17+
implementation 'org.apache.commons:commons-lang3:3.13.0'
1618
}
1719

1820
// See https://github.com/JetBrains/gradle-intellij-plugin/
1921
intellij {
20-
version = '2021.2.1'
22+
version = '2023.3.1'
2123
plugins = ['com.intellij.java']
2224
}
2325
patchPluginXml {
26+
sinceBuild = '211'
2427
changeNotes = """
25-
Add change notes here.<br>
26-
<em>most HTML tags may be used</em>"""
28+
1. fix feature:Resolve version compatibility issues and adapt new versions of the IDE
29+
"""
2730
}
2831
test {
2932
useJUnitPlatform()

src/main/java/cn/bigcoder/plugin/objecthelper/action/ClassToJsonAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void actionPerformed(AnActionEvent anAction) {
2727
}
2828
String json = getGenerator(psiClass).generate();
2929
CopyPasteManager.getInstance().setContents(new StringSelection(json));
30-
NotificationUtils.notifyInfo(anAction.getProject(), "JSON字符串成功置入剪贴板<br>" + json);
30+
NotificationUtils.notifyInfo(anAction.getProject(), "JSON字符串成功置入剪贴板:<br>" + json);
3131
}
3232

3333
@Override

src/main/java/cn/bigcoder/plugin/objecthelper/common/util/NotificationUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package cn.bigcoder.plugin.objecthelper.common.util;
22

3-
import com.intellij.notification.NotificationDisplayType;
43
import com.intellij.notification.NotificationGroup;
4+
import com.intellij.notification.NotificationGroupManager;
55
import com.intellij.notification.NotificationType;
66
import com.intellij.openapi.project.Project;
77

@@ -14,7 +14,8 @@ public class NotificationUtils {
1414
/**
1515
* 从2020.3版本方式,通知组改由Plugin.xml注册。详见:https://plugins.jetbrains.com/docs/intellij/notifications.html#top-level-notifications
1616
*/
17-
private static final NotificationGroup NOTIFICATION_GROUP = new NotificationGroup("ObjectHelper Notification Group", NotificationDisplayType.BALLOON, true);
17+
private static final NotificationGroup NOTIFICATION_GROUP = NotificationGroupManager.getInstance()
18+
.getNotificationGroup("ObjectHelper Notification Group");
1819

1920
public static void notifyInfo(Project project, String content) {
2021
NOTIFICATION_GROUP.createNotification(content, NotificationType.INFORMATION).notify(project);

src/main/java/cn/bigcoder/plugin/objecthelper/common/util/PsiTypeUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
import com.intellij.psi.PsiClass;
55
import com.intellij.psi.PsiClassType;
66
import com.intellij.psi.PsiType;
7-
import org.apache.commons.lang.time.DateFormatUtils;
87

98
import java.time.LocalDate;
109
import java.time.LocalDateTime;
1110
import java.time.format.DateTimeFormatter;
1211
import java.util.Date;
12+
import org.apache.commons.lang3.time.DateFormatUtils;
1313

1414
import static cn.bigcoder.plugin.objecthelper.common.constant.JavaClassName.*;
1515

src/main/java/cn/bigcoder/plugin/objecthelper/generator/AbstractDataObjectGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
import org.apache.commons.collections.CollectionUtils;
1212
import org.apache.commons.compress.utils.Lists;
1313
import org.apache.commons.compress.utils.Sets;
14-
import org.apache.commons.lang.ArrayUtils;
15-
1614
import java.util.List;
1715
import java.util.Map;
16+
1817
import java.util.Set;
18+
import org.apache.commons.lang3.ArrayUtils;
1919

2020
/**
2121
* @author: Jindong.Tian

src/main/java/cn/bigcoder/plugin/objecthelper/generator/idl/ThriftIDLGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
import com.intellij.psi.impl.source.PsiClassReferenceType;
1313
import org.apache.commons.compress.utils.Lists;
1414
import org.apache.commons.compress.utils.Sets;
15-
import org.apache.commons.lang.ArrayUtils;
1615

1716
import java.util.List;
1817
import java.util.Set;
18+
import org.apache.commons.lang3.ArrayUtils;
1919

2020
/**
2121
* @author: Jindong.Tian

src/main/resources/META-INF/plugin.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<idea-plugin>
22
<id>cn.bigcoder.plugin.objecthelper</id>
33
<name>ObjectHelper</name>
4-
<version>1.3.0</version>
4+
<version>1.3.1</version>
55
<vendor email="bigcoder84@gmail.com" url="https://github.com/bigcoder84/object-helper-plugin">HearingSmile</vendor>
66

77
<description><![CDATA[
@@ -17,13 +17,12 @@
1717
]]></description>
1818

1919
<change-notes><![CDATA[
20-
<li>New feature:Added the ability to quickly convert Java classes to XML</li>
21-
<li>New feature:Customize to enable specified functions</li>
20+
<li>fix feature:Resolve version compatibility issues and adapt new versions of the IDE</li>
2221
]]>
2322
</change-notes>
2423

2524
<!-- please see https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
26-
<idea-version since-build="182.0"/>
25+
<idea-version since-build="211.0"/>
2726

2827
<!-- please see https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
2928
on how to target different products -->
@@ -37,6 +36,10 @@
3736
instance="cn.bigcoder.plugin.objecthelper.config.ObjectHelperConfigurable"/>
3837
<applicationService
3938
serviceImplementation="cn.bigcoder.plugin.objecthelper.config.PluginConfigModel"/>
39+
40+
<notificationGroup id="ObjectHelper Notification Group"
41+
displayType="BALLOON"
42+
key="notification.group.name"/>
4043
</extensions>
4144

4245
<actions>

0 commit comments

Comments
 (0)