Skip to content

Commit 4433f18

Browse files
authored
Merge pull request #39 from johnmai-dev/next-1.3.0
Next 1.3.0
2 parents ed1a03d + fd32aa5 commit 4433f18

21 files changed

+155
-69
lines changed

.run/Run Plugin.run.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Run Plugin" type="GradleRunConfiguration" factoryName="Gradle">
3-
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
3+
<log_file alias="IDE logs" path="$PROJECT_DIR$/build/idea-sandbox/*/log/idea.log" show_all="true" />
44
<ExternalSystemSettings>
55
<option name="executionName" />
66
<option name="externalProjectPath" value="$PROJECT_DIR$" />
@@ -19,6 +19,7 @@
1919
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
2020
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
2121
<DebugAllEnabled>false</DebugAllEnabled>
22+
<RunAsTest>false</RunAsTest>
2223
<method v="2" />
2324
</configuration>
24-
</component>
25+
</component>

build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import org.jetbrains.changelog.Changelog
2-
import org.jetbrains.changelog.markdownToHTML
32
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
43

54
plugins {
@@ -53,9 +52,6 @@ dependencies {
5352
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
5453
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })
5554

56-
instrumentationTools()
57-
pluginVerifier()
58-
zipSigner()
5955
testFramework(TestFrameworkType.Platform)
6056
}
6157
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ platformPlugins =
2121
platformBundledPlugins = org.jetbrains.plugins.go
2222

2323
# Gradle Releases -> https://github.com/gradle/gradle/releases
24-
gradleVersion = 8.10
24+
gradleVersion = 8.11.1
2525

2626
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
2727
kotlin.stdlib.default.dependency = false

gradle/libs.versions.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[versions]
22
# libraries
3-
junit = "5.11.0"
4-
lombok = "1.18.34"
5-
guava = "33.3.1-jre"
6-
druid = "1.2.23"
3+
junit = "5.11.4"
4+
lombok = "1.18.36"
5+
guava = "33.4.0-jre"
6+
druid = "1.2.24"
77
jsqlparser = "5.0"
88
evoInflector = "1.3"
9-
annotations = "24.1.0"
9+
annotations = "26.0.2"
1010

1111
# plugins
1212
changelog = "2.2.1"
13-
intelliJPlatform = "2.0.1"
13+
intelliJPlatform = "2.2.1"
1414
kotlin = "1.9.25"
1515
kover = "0.8.3"
16-
qodana = "2024.1.9"
16+
qodana = "2024.3.4"
1717

1818
[libraries]
1919
junit = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit" }

gradle/wrapper/gradle-wrapper.jar

79 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

qodana.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://www.jetbrains.com/help/qodana/qodana-yaml.html
33

44
version: 1.0
5-
linter: jetbrains/qodana-jvm-community:latest
5+
linter: jetbrains/qodana-jvm-community:2024.2
66
projectJDK: "17"
77
profile:
88
name: qodana.recommended

settings.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
rootProject.name = "Go ORM Helper"
2+
3+
plugins {
4+
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
5+
}

src/main/java/com/github/maiqingqiang/goormhelper/Types.java

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.github.maiqingqiang.goormhelper.sql2struct.impl.SQL2GormStruct;
77
import com.github.maiqingqiang.goormhelper.sql2struct.impl.SQL2Struct;
88
import com.github.maiqingqiang.goormhelper.sql2struct.impl.SQL2XormStruct;
9+
import com.intellij.openapi.project.Project;
910

1011
import java.util.List;
1112
import java.util.regex.Pattern;
@@ -61,12 +62,12 @@ public String toString() {
6162
return name;
6263
}
6364

64-
public ISQL2Struct sql2Struct(String sql, DbType dbType) {
65+
public ISQL2Struct sql2Struct(Project project, String sql, DbType dbType) {
6566
return switch (this) {
66-
case General -> new SQL2Struct(sql, dbType);
67-
case Gorm -> new SQL2GormStruct(sql, dbType);
68-
case Xorm -> new SQL2XormStruct(sql, dbType);
69-
case GoFrame -> new SQL2GoFrameStruct(sql, dbType);
67+
case General -> new SQL2Struct(project, sql, dbType);
68+
case Gorm -> new SQL2GormStruct(project, sql, dbType);
69+
case Xorm -> new SQL2XormStruct(project, sql, dbType);
70+
case GoFrame -> new SQL2GoFrameStruct(project, sql, dbType);
7071
default -> null;
7172
};
7273
}
@@ -96,4 +97,20 @@ public String toString() {
9697
return name;
9798
}
9899
}
100+
101+
enum TagMode {
102+
Compact(GoORMHelperBundle.message("tagMode.Compact")),
103+
Full(GoORMHelperBundle.message("tagMode.Full"));
104+
105+
private final String name;
106+
107+
@Override
108+
public String toString() {
109+
return name;
110+
}
111+
112+
TagMode(String name) {
113+
this.name = name;
114+
}
115+
}
99116
}

src/main/java/com/github/maiqingqiang/goormhelper/actions/EditorPasteListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ protected void doExecute(@NotNull Editor editor, @Nullable Caret caret, DataCont
8585
return;
8686
}
8787

88-
ISQL2Struct sql2Struct = finalSelectedORM.sql2Struct(text, finalSelectedDatabase.toDbType());
88+
ISQL2Struct sql2Struct = finalSelectedORM.sql2Struct(project, text, finalSelectedDatabase.toDbType());
8989
if (sql2Struct == null) {
9090
return;
9191
}

0 commit comments

Comments
 (0)