Skip to content

Commit

Permalink
feat: V3版本发布
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Aug 17, 2022
1 parent f2bbcf5 commit b64b230
Show file tree
Hide file tree
Showing 23 changed files with 185 additions and 747 deletions.
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ hs_err_pid*

# IntelliJ project files
.idea
.github
*.iml
out
gen
Expand Down
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,30 @@

![样列](https://raw.githubusercontent.com/Link-Kou/intellij-mybaitslog/master/image/2020-04-17_23-51-18.gif "样列")

## Sponsors
## <p style="color:red">★★重大更新★★</p>
> 版本从V3.*开始<b style="color:red">支持所有数据库的SQL都能均能正常格式化输出</b><br/>
> 版本从V3.*开始必须需要配合Mybatis插件使用否则就无效。
> 版本从V3.*插件只支持IDEA版本2020.3以上
####
第一步:
```xml
<dependency>
<groupId>com.github.link-kou</groupId>
<artifactId>mybatis-plugin</artifactId>
<version>1.0.0</version>
</dependency>
```
####
第二步:<br/>
**SpringBoot配置示例:**
```java
SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
sqlSessionFactoryBean.setPlugins(new LogInterceptor());
return sqlSessionFactoryBean.getObject();
```


### Sponsors

<table>
<td>
Expand All @@ -22,6 +45,9 @@
</td>
</table>

#### <kbd>2021.08.16</kbd> -> <kbd>★★★重大更新,从版本V3开始将彻底解决字符串替代弊端,支持所有数据库★★★</kbd>

#### <kbd>2021.08.16</kbd> -> <kbd>《IDEA 2022.2 测试通过支持使用。》</kbd>

#### <kbd>2020.08.11</kbd> -> <kbd>《IDEA 2020.2 测试通过支持使用。》</kbd>

Expand All @@ -45,6 +71,10 @@

#### <kbd>2021.06.15</kbd> -> <kbd>发布2.0.5包。修复无法自定义关键字问题。</kbd>

#### <kbd>2021.09.16</kbd> -> <kbd>发布2.0.6包。增加自动生成字面量按钮。</kbd>

#### <kbd>2021.12.15</kbd> -> <kbd>支持IDEA 2020.3 发布2.0.7包。修复无法自定义关键字问题。</kbd>


```sql

Expand Down Expand Up @@ -82,9 +112,9 @@ WHERE f_type = 2;

### 手动安装

2020.2 以上版本都支持
2020.3 以上版本都支持
>
[plugin.intellij.assistant.mybaitslog-2020.X-2.0.5.jar](https://raw.githubusercontent.com/Link-Kou/intellij-mybaitslog/master/plugin/plugin.intellij.assistant.mybaitslog-2.0.5.jar)
[plugin.intellij.assistant.mybaitslog-2020.3.X-3.0.0.jar](https://raw.githubusercontent.com/Link-Kou/intellij-mybaitslog/master/plugin/plugin.intellij.assistant.mybaitslog-3.0.0.jar)


> ##### 说明文档:
Expand Down
46 changes: 29 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,38 @@ buildscript {
gradlePluginPortal()
}
dependencies {

classpath "org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.8.0"
}
}

plugins {
id 'idea'
id 'org.jetbrains.intellij' version '0.4.21'
id 'java'
id 'org.jetbrains.intellij' version '1.8.0'
// Gradle Changelog Plugin
id 'org.jetbrains.changelog' version "1.3.1"
// Gradle Qodana Plugin
id 'org.jetbrains.qodana' version "0.1.13"
}

//2.1 插件配置
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'idea'
apply plugin: 'org.jetbrains.changelog'
apply plugin: 'org.jetbrains.qodana'
apply plugin: 'java'

apply plugin: 'application'
mainClassName = "com.rapid.develop.core.server.ApplicationServer"

group 'com.linkkou'
version '2.0.6'
version '3.0.0'

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

applicationDefaultJvmArgs = [
'-javaagent:/Applications/jetbra/fineagent.jar=jetbrains',
'--add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED',
'--add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED']

repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
Expand All @@ -37,22 +49,22 @@ repositories {
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
/*compile group: 'com.alibaba', name: 'druid', version: '1.1.23'*/
compile fileTree(dir: 'libs', include: [ '*'])
/*compile fileTree(dir: 'libs', include: [ '*'])*/
}

/*https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html#intellij-platform-based-products-of-recent-ide-versions*/
intellij {
pluginName 'MybatisLog'
pluginName = 'MybatisLog'
// 开发环境运行时使用的版本
version '2020.2'
//version = '2021.1'
// 沙箱目录位置,用于保存IDEA的设置,默认在build文件下面,防止clean,放在根目录下。
sandboxDirectory = "${rootProject.rootDir}/idea-sandbox"
type 'IU'
sandboxDir = "${rootProject.rootDir}/idea-sandbox"
type = 'IU'
// 依赖的插件
//plugins = ['DatabaseTools', 'Velocity']
//Disables updating since-build attribute in plugin.xml
updateSinceUntilBuild false
downloadSources false
localPath '/Applications/IntelliJ IDEA.app'
updateSinceUntilBuild = false
downloadSources = false
localPath = '/Applications/IntelliJ IDEA.app'
}

processResources {
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.plugins.mybaitslog;

import com.intellij.execution.filters.ConsoleDependentInputFilterProvider;
import com.intellij.execution.filters.InputFilter;
import com.intellij.execution.ui.ConsoleView;
import com.intellij.openapi.project.Project;
import com.intellij.psi.search.GlobalSearchScope;
import com.plugins.mybaitslog.filter.MyBatisLogInputFilter;
import org.jetbrains.annotations.NotNull;

import java.util.List;

public class MyBatisLogInputFilterProvider extends ConsoleDependentInputFilterProvider {

@Override
public @NotNull List<InputFilter> getDefaultFilters(@NotNull ConsoleView consoleView, @NotNull Project project, @NotNull GlobalSearchScope globalSearchScope) {
return List.of(new MyBatisLogInputFilter(project));
}


}
18 changes: 9 additions & 9 deletions src/main/java/com/plugins/mybaitslog/MyBatisLogProvider.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
package com.plugins.mybaitslog;

import com.intellij.execution.filters.ConsoleFilterProvider;
import com.intellij.execution.filters.ConsoleDependentFilterProvider;
import com.intellij.execution.filters.Filter;
import com.intellij.execution.ui.ConsoleView;
import com.intellij.openapi.project.Project;
import com.intellij.psi.search.GlobalSearchScope;
import com.plugins.mybaitslog.filter.MyBatisLogFilter;
import org.jetbrains.annotations.NotNull;


import com.intellij.openapi.project.Project;

/**
* Console 输出监控
*
* @author lk
* @version 1.0
* @date 2020/4/10 21:46
*/
public class MyBatisLogProvider implements ConsoleFilterProvider {
@NotNull
public class MyBatisLogProvider extends ConsoleDependentFilterProvider {
@Override
public Filter[] getDefaultFilters(@NotNull Project project) {
Filter filter = new MyBatisLogFilter(project);
return new Filter[]{filter};
public Filter @NotNull [] getDefaultFilters(@NotNull ConsoleView consoleView, @NotNull Project project, @NotNull GlobalSearchScope globalSearchScope) {
return new Filter[]{new MyBatisLogFilter(consoleView, project)};
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class MyBatisLogToolWindow implements ToolWindowFactory {
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
ConsolePanel consolePanel = new ConsolePanel();
final JComponent jComponent = consolePanel.getConsolePanel(project);
ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
ContentFactory contentFactory = ContentFactory.getInstance();
Content content = contentFactory.createContent(jComponent, "", false);
toolWindow.setIcon(Icons.MyBatisIcon);
toolWindow.getContentManager().addContent(content);
Expand Down

This file was deleted.

Loading

0 comments on commit b64b230

Please sign in to comment.