2.07 global-setting reset default | 全局设置 复位默认值 fixed #19
This commit is contained in:
17
README.md
17
README.md
@@ -31,6 +31,11 @@ Show doc comment at the Project view Tree, line End, json etc.
|
|||||||
<li>The tsv conf file must could be search in "Go to File"(Ctrl + Shift + N)
|
<li>The tsv conf file must could be search in "Go to File"(Ctrl + Shift + N)
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h2>My Other Project</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Find author/comment of multiple files or lines and export Find:
|
||||||
|
<a href="https://plugins.jetbrains.com/plugin/20557-find-author">Find Author</a>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<h2>中文说明:</h2>
|
<h2>中文说明:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -58,9 +63,17 @@ Show doc comment at the Project view Tree, line End, json etc.
|
|||||||
<li>tsv 配置文件必须能被搜索(Ctrl + Shift + N)
|
<li>tsv 配置文件必须能被搜索(Ctrl + Shift + N)
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h2>我的其他项目</h2>
|
||||||
|
<ul>
|
||||||
|
<li>查找多个文件或行的作者与导出搜索:
|
||||||
|
<a href="https://plugins.jetbrains.com/plugin/20557-find-author">Find Author</a>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
如果对你有所帮助,别忘了给本项目
|
如果对你有所帮助,别忘了给本项目
|
||||||
<a href="https://github.com/LinWanCen/show-comment">GitHub</a>
|
<a href="https://github.com/LinWanCen/show-comment">GitHub</a>
|
||||||
主页一个 Start,您的支持是项目前进的动力。
|
主页一个 Star,您的支持是项目前进的动力。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -68,6 +81,7 @@ Show doc comment at the Project view Tree, line End, json etc.
|
|||||||
|
|
||||||
<h2>English Change Notes:</h2>
|
<h2>English Change Notes:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>2.07 Add global-setting reset default
|
||||||
<li>2.06 Add project-view-tree xx-abc.xxx from Abc.java doc
|
<li>2.06 Add project-view-tree xx-abc.xxx from Abc.java doc
|
||||||
<li>2.05 Add line-end-comment json doc from xxx.json.tsv
|
<li>2.05 Add line-end-comment json doc from xxx.json.tsv
|
||||||
<li>2.04 Add line-end-comment json dict doc from (key).tsv
|
<li>2.04 Add line-end-comment json dict doc from (key).tsv
|
||||||
@@ -103,6 +117,7 @@ Show doc comment at the Project view Tree, line End, json etc.
|
|||||||
|
|
||||||
<h2>中文更新说明:</h2>
|
<h2>中文更新说明:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>2.07 增加 全局设置 复位默认值
|
||||||
<li>2.06 增加 文件树注释 xx-abc.xxx 来自 Abc.java 的文档注释
|
<li>2.06 增加 文件树注释 xx-abc.xxx 来自 Abc.java 的文档注释
|
||||||
<li>2.05 增加 行末注释 json 字段注释从 xxx.json.tsv 读取
|
<li>2.05 增加 行末注释 json 字段注释从 xxx.json.tsv 读取
|
||||||
<li>2.04 增加 行末注释 json 字典注释从 键名.tsv 读取
|
<li>2.04 增加 行末注释 json 字典注释从 键名.tsv 读取
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group 'io.github.linwancen'
|
group 'io.github.linwancen'
|
||||||
version '2.06.0.' + (new Date().format('yyyy.MM.dd_HH.mm'))
|
version '2.07.0.' + (new Date().format('yyyy.MM.dd_HH.mm'))
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@@ -87,6 +87,7 @@ patchPluginXml {
|
|||||||
changeNotes = """
|
changeNotes = """
|
||||||
<h2>English Change Notes:</h2>
|
<h2>English Change Notes:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>2.07 Add global-setting reset default
|
||||||
<li>2.06 Add project-view-tree xx-abc.xxx from Abc.java doc
|
<li>2.06 Add project-view-tree xx-abc.xxx from Abc.java doc
|
||||||
<li>2.05 Add line-end-comment json doc from xxx.json.tsv
|
<li>2.05 Add line-end-comment json doc from xxx.json.tsv
|
||||||
<li>2.04 Add line-end-comment json dict doc from (key).tsv
|
<li>2.04 Add line-end-comment json dict doc from (key).tsv
|
||||||
@@ -122,6 +123,7 @@ patchPluginXml {
|
|||||||
|
|
||||||
<h2>中文更新说明:</h2>
|
<h2>中文更新说明:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>2.07 增加 全局设置 复位默认值
|
||||||
<li>2.06 增加 文件树注释 xx-abc.xxx 来自 Abc.java 的文档注释
|
<li>2.06 增加 文件树注释 xx-abc.xxx 来自 Abc.java 的文档注释
|
||||||
<li>2.05 增加 行末注释 json 字段注释从 xxx.json.tsv 读取
|
<li>2.05 增加 行末注释 json 字段注释从 xxx.json.tsv 读取
|
||||||
<li>2.04 增加 行末注释 json 字典注释从 键名.tsv 读取
|
<li>2.04 增加 行末注释 json 字典注释从 键名.tsv 读取
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public class OwnerToPsiDocSkip {
|
|||||||
|
|
||||||
private OwnerToPsiDocSkip() {}
|
private OwnerToPsiDocSkip() {}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
public static <T extends SettingsInfo> PsiDocComment refDoc(@NotNull T settingsInfo,
|
public static <T extends SettingsInfo> PsiDocComment refDoc(@NotNull T settingsInfo,
|
||||||
@Nullable PsiDocCommentOwner docOwner) {
|
@Nullable PsiDocCommentOwner docOwner) {
|
||||||
if (docOwner == null) {
|
if (docOwner == null) {
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ class SkipUtils {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
static <T extends SettingsInfo> PsiDocComment skipDoc(@NotNull T settingsInfo, @Nullable PsiDocComment doc) {
|
static <T extends SettingsInfo> PsiDocComment skipDoc(@NotNull T settingsInfo, @Nullable PsiDocComment doc) {
|
||||||
if (doc == null) {
|
if (doc == null) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class DocFilter {
|
|||||||
String[] split = LINE_SEPARATOR_PATTERN.split(text);
|
String[] split = LINE_SEPARATOR_PATTERN.split(text);
|
||||||
int lineCount = 0;
|
int lineCount = 0;
|
||||||
@NotNull StringBuilder sb = new StringBuilder();
|
@NotNull StringBuilder sb = new StringBuilder();
|
||||||
for (String s : split) {
|
for (@NotNull String s : split) {
|
||||||
if (deletePrefix) {
|
if (deletePrefix) {
|
||||||
s = DOC_PATTERN.matcher(s).replaceAll("");
|
s = DOC_PATTERN.matcher(s).replaceAll("");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import java.awt.*;
|
|||||||
public class AppSettingsComponent extends AbstractSettingsComponent {
|
public class AppSettingsComponent extends AbstractSettingsComponent {
|
||||||
|
|
||||||
private final JPanel myMainPanel;
|
private final JPanel myMainPanel;
|
||||||
|
private final JButton resetDefault = new JButton("Reset default ");
|
||||||
private final JBCheckBox showTreeComment = new JBCheckBox("Show tree comment ");
|
private final JBCheckBox showTreeComment = new JBCheckBox("Show tree comment ");
|
||||||
private final JBCheckBox compact = new JBCheckBox("compact ");
|
private final JBCheckBox compact = new JBCheckBox("compact ");
|
||||||
private final JBTextField treeTags = new JBTextField();
|
private final JBTextField treeTags = new JBTextField();
|
||||||
@@ -41,10 +42,12 @@ public class AppSettingsComponent extends AbstractSettingsComponent {
|
|||||||
|
|
||||||
public AppSettingsComponent() {
|
public AppSettingsComponent() {
|
||||||
myMainPanel = FormBuilder.createFormBuilder()
|
myMainPanel = FormBuilder.createFormBuilder()
|
||||||
|
.addComponent(resetDefault, 1)
|
||||||
.addComponent(showPanel(), 1)
|
.addComponent(showPanel(), 1)
|
||||||
.addComponent(lineEndFilterPanel(), 1)
|
.addComponent(lineEndFilterPanel(), 1)
|
||||||
.addComponentFillVertically(new JPanel(), 0)
|
.addComponentFillVertically(new JPanel(), 0)
|
||||||
.getPanel();
|
.getPanel();
|
||||||
|
resetDefault.addActionListener(e -> AppSettingsConfigurable.reset(AppSettingsState.DEFAULT_SETTING, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
@@ -109,6 +109,10 @@ public class AppSettingsConfigurable implements Configurable {
|
|||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
@NotNull AppSettingsState settings = AppSettingsState.getInstance();
|
@NotNull AppSettingsState settings = AppSettingsState.getInstance();
|
||||||
|
reset(settings, mySettingsComponent);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void reset(@NotNull AppSettingsState settings, AppSettingsComponent mySettingsComponent) {
|
||||||
mySettingsComponent.setShowTreeComment(settings.showTreeComment);
|
mySettingsComponent.setShowTreeComment(settings.showTreeComment);
|
||||||
mySettingsComponent.setCompact(settings.compact);
|
mySettingsComponent.setCompact(settings.compact);
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ import java.util.Locale;
|
|||||||
)
|
)
|
||||||
public class AppSettingsState extends AbstractSettingsState implements PersistentStateComponent<AppSettingsState> {
|
public class AppSettingsState extends AbstractSettingsState implements PersistentStateComponent<AppSettingsState> {
|
||||||
|
|
||||||
|
public static final AppSettingsState DEFAULT_SETTING = new AppSettingsState();
|
||||||
|
|
||||||
public boolean showTreeComment = true;
|
public boolean showTreeComment = true;
|
||||||
public boolean compact = true;
|
public boolean compact = true;
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ Show doc comment at the Project view Tree, line End, json etc.
|
|||||||
<li>The tsv conf file must could be search in "Go to File"(Ctrl + Shift + N)
|
<li>The tsv conf file must could be search in "Go to File"(Ctrl + Shift + N)
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h2>My Other Project</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Find author/comment of multiple files or lines and export Find:
|
||||||
|
<a href="https://plugins.jetbrains.com/plugin/20557-find-author">Find Author</a>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<h2>中文说明:</h2>
|
<h2>中文说明:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -54,9 +59,17 @@ Show doc comment at the Project view Tree, line End, json etc.
|
|||||||
<li>tsv 配置文件必须能被搜索(Ctrl + Shift + N)
|
<li>tsv 配置文件必须能被搜索(Ctrl + Shift + N)
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h2>我的其他项目</h2>
|
||||||
|
<ul>
|
||||||
|
<li>查找多个文件或行的作者与导出搜索:
|
||||||
|
<a href="https://plugins.jetbrains.com/plugin/20557-find-author">Find Author</a>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
如果对你有所帮助,别忘了给本项目
|
如果对你有所帮助,别忘了给本项目
|
||||||
<a href="https://github.com/LinWanCen/show-comment">GitHub</a>
|
<a href="https://github.com/LinWanCen/show-comment">GitHub</a>
|
||||||
主页一个 Start,您的支持是项目前进的动力。
|
主页一个 Star,您的支持是项目前进的动力。
|
||||||
]]></description>
|
]]></description>
|
||||||
|
|
||||||
<!-- please see https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html
|
<!-- please see https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html
|
||||||
|
|||||||
Reference in New Issue
Block a user