Skip to content

V1.3.1 dev #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# object-helper-plugin

![](https://img.shields.io/badge/version-v1.3.0-blue)
![](https://img.shields.io/badge/license-Apache%202-red)
![](https://img.shields.io/badge/size-64%20kB-yellowgreen)
![](https://img.shields.io/badge/download-1.7k-green)
<div align="center">
<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>
</div>
<br/>
<div align="center">
<img src="https://img.shields.io/badge/version-v1.3.1-blue">
<img src="https://img.shields.io/badge/license-Apache%202-red">
<img src="https://img.shields.io/badge/size-600%20kB-yellowgreen">
<img src="https://img.shields.io/badge/downloads-3.1k-green">
</div>

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

JetBrains Intellij IDEA ObjectHelper插件,包含以下功能
该插件包含以下功能

- 对象拷贝

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

- Java类转Thrift IDL

![](https://image.bigcoder.cn/6eee7a02-8e4e-4f11-9b8c-81d661a920c5.gif)

- Java类转XML

![](https://image.bigcoder.cn/20220916170144.gif)

- 插件配置

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

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

Expand All @@ -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] 个性化配置
13 changes: 8 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -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.<br>
<em>most HTML tags may be used</em>"""
1. fix feature:Resolve version compatibility issues and adapt new versions of the IDE
"""
}
test {
useJUnitPlatform()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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字符串成功置入剪贴板<br>" + json);
NotificationUtils.notifyInfo(anAction.getProject(), "JSON字符串成功置入剪贴板:<br>" + json);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin>
<id>cn.bigcoder.plugin.objecthelper</id>
<name>ObjectHelper</name>
<version>1.3.0</version>
<version>1.3.1</version>
<vendor email="bigcoder84@gmail.com" url="https://github.com/bigcoder84/object-helper-plugin">HearingSmile</vendor>

<description><![CDATA[
Expand All @@ -17,13 +17,12 @@
]]></description>

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

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

<!-- please see https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
on how to target different products -->
Expand All @@ -37,6 +36,10 @@
instance="cn.bigcoder.plugin.objecthelper.config.ObjectHelperConfigurable"/>
<applicationService
serviceImplementation="cn.bigcoder.plugin.objecthelper.config.PluginConfigModel"/>

<notificationGroup id="ObjectHelper Notification Group"
displayType="BALLOON"
key="notification.group.name"/>
</extensions>

<actions>
Expand Down