Skip to content

Commit

Permalink
修改发布1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzhihang committed Aug 21, 2019
1 parent 122d624 commit e4ad982
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group 'com.liuzhihang.toolkit'
version '1.0.2'
version '1.0.3'

sourceCompatibility = 1.8

Expand Down
12 changes: 12 additions & 0 deletions doc/ChangeNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# ChangeNotes


## [v1.0.3](https://github.com/liuzhihangs/toolkit/releases/tag/v1.0.3) (2019-08-21)

- 修改问中文描述
- 移除JavaBean中复制为Json的注释字段(@comment)
- 使用dom4j, 新增xml格式化, 但是会导致包插件包过大

## [v1.0.2](https://github.com/liuzhihangs/toolkit/releases/tag/v1.0.2) (2019-05-09)

- 新增在JavaBean中复制为Json功能


## [v1.0.1](https://github.com/liuzhihangs/toolkit/releases/tag/v1.0.1) (2019-05-06)

- 新增在JavaBean中复制为Json字符串的功能
Expand Down
1 change: 1 addition & 0 deletions parts/changeNotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<li>1.0.3
<ol>
<li>XML: 新增XML格式化, 使用dom4j</li>
<li>支持创建多个窗口</li>
</ol>
</li>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ public void actionPerformed(@NotNull AnActionEvent e) {
public static Map getFields(PsiClass psiClass) {

Map<String, Object> fieldMap = new LinkedHashMap<>();
Map<String, Object> commentFieldMap = new LinkedHashMap<>();
// Map<String, Object> commentFieldMap = new LinkedHashMap<>();

if (psiClass != null && psiClass.getClassKind() == JvmClassKind.CLASS) {
for (PsiField field : psiClass.getAllFields()) {
PsiType type = field.getType();
String name = field.getName();
if (field.getDocComment() != null && StringUtils.isNotBlank(field.getDocComment().getText())) {
String fieldComment = field.getDocComment().getText();
commentFieldMap.put(name, CommentUtils.removeSymbol(fieldComment));
}
// if (field.getDocComment() != null && StringUtils.isNotBlank(field.getDocComment().getText())) {
// String fieldComment = field.getDocComment().getText();
// commentFieldMap.put(name, CommentUtils.removeSymbol(fieldComment));
// }
// 判断注解 javax.annotation.Resource org.springframework.beans.factory.annotation.Autowired
PsiAnnotation[] annotations = field.getAnnotations();
if (annotations.length > 0 && containsAnnotation(annotations)) {
Expand Down Expand Up @@ -157,9 +157,10 @@ public static Map getFields(PsiClass psiClass) {
}
}
}
if (commentFieldMap.size() > 0) {
fieldMap.put("@comment", commentFieldMap);
}
// json 串中的注释字段 暂时不添加
// if (commentFieldMap.size() > 0) {
// fieldMap.put("@comment", commentFieldMap);
// }
}
return fieldMap;
}
Expand Down

0 comments on commit e4ad982

Please sign in to comment.