Skip to content

Commit

Permalink
IDEA plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
LinWanCen committed Nov 18, 2023
1 parent 2ad9f0c commit 9c7330f
Show file tree
Hide file tree
Showing 29 changed files with 988 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 15 additions & 13 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .run/Main.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Main" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="ALTERNATIVE_JRE_PATH" value="1.8" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="MAIN_CLASS_NAME" value="io.github.linwancen.compare.Main" />
<option name="PROGRAM_PARAMETERS" value="messages/CompareJarBundle.properties messages/CompareJarBundle_zh.properties" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/target/classes" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="io.github.linwancen.compare.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Maven.BeforeRunTask" enabled="true" file="$PROJECT_DIR$/pom.xml" goal="compile" />
</method>
</configuration>
</component>
25 changes: 25 additions & 0 deletions .run/Run IDE for UI Tests.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run IDE for UI Tests" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runIdeForUiTests" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
24 changes: 24 additions & 0 deletions .run/Run Plugin.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Plugin" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runIde" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>
30 changes: 30 additions & 0 deletions .run/Run Qodana.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Qodana" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="env">
<map>
<entry key="QODANA_SHOW_REPORT" value="true" />
</map>
</option>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="cleanInspections" />
<option value="runInspections" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
24 changes: 24 additions & 0 deletions .run/Run Tests.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Tests" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="check" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>
26 changes: 26 additions & 0 deletions .run/Run Verifications.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Verifications" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runPluginVerifier" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2">
<option name="Gradle.BeforeRunTask" enabled="true" tasks="clean" externalProjectPath="$PROJECT_DIR$" vmOptions="" scriptParameters="" />
</method>
</configuration>
</component>
25 changes: 25 additions & 0 deletions .run/buildPlugin.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="buildPlugin" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="-x test" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="buildPlugin" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Keep a Changelog guide -> https://keepachangelog.com -->

# sql-list Changelog

## [1.0.0]

- 1.00 init

# 中文更新日志

- 1.00 基本功能
35 changes: 35 additions & 0 deletions Jenkins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Jenkins 使用方式指南

- 可以`mvn package`生成或在这里下载 zip:https://github.com/LinWanCen/sql-list/releases
- 然后在服务器上执行以下命令创建目录上传解压
```shell script
mkidr /var/lib/jenkins/workspace/sql-list
cd /var/lib/jenkins/workspace/sql-list
rz
unzip sql-list.zip
```
- 登陆 Jenkins
- 点击 新建Item
- 创建自由风格(Freestyle project)的项目
- 描述
1. 点击 Build with Parameters
2. 选择文件后点击"开始构建",等左下角上传进度完成
3. 执行完毕后点击"工作区"或"工作空间"
4. 点击打包下载全部文件
5. 解压后用 IDEA 打开
6. 选择两个文件夹,右键比较即可
- [x] Discard old builds
- 保持构建的最大个数 5
- [x] This project is parameterized
- File Parameter
- file1
- file2
- 构建环境
- [x] Delete workspace before build starts
- 构建
- Execute shell
```shell script
mv file1 "1-$file1"
mv file2 "2-$file2"
java -jar /var/lib/jenkins/workspace/sql-list/sql-list.jar "1-$file1" "2-$file2"
```
100 changes: 91 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,97 @@
# SQL 清单
# SQL 清单 sql-list

解析 Mapper.xml 中的 SQL,涉及的表和条件列,Git 最后修改时间和作者,生成 Excel 表格
[![Version](https://img.shields.io/jetbrains/plugin/v/23142-sql-list.svg)](https://plugins.jetbrains.com/plugin/23142-sql-list)
[![Downloads](https://img.shields.io/jetbrains/plugin/d/23142-sql-list.svg)](https://plugins.jetbrains.com/plugin/23142-sql-list)

## 入参
- [Maven package for Jenkins etc](Jenkins.md).
- Gradle build for IDEA plugin.

- 入参
- 多个目录
- 多个文件
- gitHash..gitHash 多个 Git 根目录
- gitBranch..gitBranch 多个 Git 根目录
- diff 旧目录 新目录
- 无入参时 GUI 弹框选择


## Plugin description 插件介绍

<!-- Plugin description -->

Export Mapper.xml SQL to Excel.

解析 Mapper.xml 中的 SQL,涉及的表和条件列,Git 最后修改时间和作者,生成 Excel 表格。

## How to Use

- Select dir and right-click<kbd>Export Mapper.xml SQL</kbd>
- Select two dir and right-click<kbd>Export Mapper.xml diff SQL</kbd>

## My Plugin
- Show doc comment at the Project view Tree, line End, json etc.: [Show Comment]
- Method call usage graph and maven dependency graph: [Draw Graph]
- Find author/comment of multiple files or lines and export Find: [Find Author]
- Auto sync coverage and capture coverage during debug: [Sync Coverage]
- UnCompress and Delete same, use `javap -c` decompile class: [Compare Jar]
- Export Mapper.xml SQL to Excel: [SQL List]

---

# 中文

## 用法

- 选择多个目录右键点击<kbd>导出 Mapper.xml 的 SQL</kbd>
- 选择两个目录右键点击<kbd>导出 Mapper.xml 差异的 SQL</kbd>

在服务器中用 Jenkins 运行详见 [Jenkins 使用方式指南][Jenkins]

## 我的项目
- 在文件树、行末、JSON 显示注释:[Show Comment]
- 生成 方法调用图 和 Maven 依赖图:[Draw Graph]
- 查找多个文件或行的作者 与 导出搜索:[Find Author]
- 自动同步覆盖率 和 调试中抓取覆盖率:[Sync Coverage]
- 逐层解压,删除相同文件,反编译 class 对比:[Compare Jar]
- 解析 Mapper.xml 中的 SQL,涉及的表和条件列,Git 最后修改时间和作者,生成 Excel 表格:[SQL List]

---

# 支持

如果对你有所帮助,别忘了给 [本项目 GitHub 主页][GitHub] 一个 Star,您的支持是项目前进的动力。

[Show Comment]: https://plugins.jetbrains.com/plugin/18553-show-comment
[Draw Graph]: https://plugins.jetbrains.com/plugin/draw-graph
[Find Author]: https://plugins.jetbrains.com/plugin/20557-find-author
[Sync Coverage]: https://plugins.jetbrains.com/plugin/20780-sync-coverage
[Compare Jar]: https://plugins.jetbrains.com/plugin/22356-compare-jar
[SQL List]: https://plugins.jetbrains.com/plugin/23142-sql-list
[GitHub]: https://github.com/LinWanCen/sql-list
[Jenkins]: https://github.com/LinWanCen/sql-list/Jenkins.md

<!-- Plugin description end -->

## Installation

- Using IDE built-in plugin system:

<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "sql-list"</kbd> >
<kbd>Install Plugin</kbd>

- Manually:

Download the [latest release](https://github.com/LinWanCen/sql-list/releases/latest) and install it manually using
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>

[Changelog 更新说明](CHANGELOG.md)

---
Plugin based on the [IntelliJ Platform Plugin Template][template].

[template]: https://github.com/JetBrains/intellij-platform-plugin-template
[docs:plugin-description]: https://plugins.jetbrains.com/docs/intellij/plugin-user-experience.html#plugin-description-and-presentation

- 多个目录
- 多个文件
- gitHash..gitHash 多个 Git 根目录
- gitBranch..gitBranch 多个 Git 根目录
- diff 旧目录 新目录
- 无入参时 GUI 弹框选择

## TODO

Expand Down
Loading

0 comments on commit 9c7330f

Please sign in to comment.