Skip to content

Commit 6f3ce2b

Browse files
author
fulin
committed
fix: 更改scope为text
1 parent 59fcff6 commit 6f3ce2b

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
plugins {
22
id 'java'
33
id 'org.jetbrains.intellij' version '0.4.14'
4-
id "org.jetbrains.kotlin.jvm" version "1.3.41"
54
}
65

76
tasks.withType(JavaCompile) {
@@ -25,7 +24,7 @@ dependencies {
2524

2625
// See https://github.com/JetBrains/gradle-intellij-plugin/
2726
intellij {
28-
version 'IU-2019.3'
27+
version 'IU-2017.1'
2928
}
3029
patchPluginXml {
3130
changeNotes """

src/main/java/com/fulinlin/ui/CommitPanel.form

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<grid id="27dc6" binding="mainPanel" layout-manager="GridLayoutManager" row-count="7" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
44
<margin top="0" left="0" bottom="0" right="0"/>
55
<constraints>
6-
<xy x="20" y="20" width="954" height="629"/>
6+
<xy x="20" y="20" width="982" height="629"/>
77
</constraints>
88
<properties/>
99
<border type="none"/>
@@ -29,16 +29,6 @@
2929
<text value="Scope of this change"/>
3030
</properties>
3131
</component>
32-
<component id="549f7" class="javax.swing.JComboBox" binding="changeScope">
33-
<constraints>
34-
<grid row="1" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
35-
<preferred-size width="150" height="-1"/>
36-
</grid>
37-
</constraints>
38-
<properties>
39-
<editable value="true"/>
40-
</properties>
41-
</component>
4232
<component id="19a59" class="javax.swing.JLabel">
4333
<constraints>
4434
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
@@ -116,6 +106,14 @@
116106
<lineWrap value="true"/>
117107
</properties>
118108
</component>
109+
<component id="a244b" class="javax.swing.JTextField" binding="changeScope">
110+
<constraints>
111+
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
112+
<preferred-size width="150" height="-1"/>
113+
</grid>
114+
</constraints>
115+
<properties/>
116+
</component>
119117
</children>
120118
</grid>
121119
</form>

src/main/java/com/fulinlin/ui/CommitPanel.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
public class CommitPanel {
1414
private JPanel mainPanel;
1515
private JComboBox changeType;
16-
private JComboBox changeScope;
16+
private JTextField changeScope;
1717
private JTextField shortDescription;
1818
private JTextArea longDescription;
1919
private JTextField closedIssues;
@@ -25,11 +25,11 @@ public CommitPanel(Project project, GitCommitMessageHelperSettings settings) {
2525
for (TypeAlias type : typeAliases) {
2626
changeType.addItem(type);
2727
}
28-
File workingDirectory = VfsUtil.virtualToIoFile(project.getBaseDir());
28+
/* fix fulin File workingDirectory = VfsUtil.virtualToIoFile(project.getBaseDir());
2929
Command.Result result = new Command(workingDirectory, "git log --all --format=%s | grep -Eo '^[a-z]+(\\(.*\\)):.*$' | sed 's/^.*(\\(.*\\)):.*$/\\1/' | sort -n | uniq").execute();
3030
if (result.isSuccess()) {
3131
result.getOutput().forEach(changeScope::addItem);
32-
}
32+
}*/
3333
}
3434

3535
JPanel getMainPanel() {
@@ -40,7 +40,7 @@ CommitMessage getCommitMessage(GitCommitMessageHelperSettings settings) {
4040
return new CommitMessage(
4141
settings,
4242
(TypeAlias) changeType.getSelectedItem(),
43-
(String) changeScope.getSelectedItem(),
43+
(String) changeScope.getText().trim(),
4444
shortDescription.getText().trim(),
4545
longDescription.getText().trim(),
4646
closedIssues.getText().trim(),

src/main/resources/META-INF/plugin.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
]]>
1010
</description>
1111

12+
<idea-version since-build="171"/>
13+
1214
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
1315
on how to target different products -->
1416
<depends>com.intellij.modules.platform</depends>

0 commit comments

Comments
 (0)