Skip to content

Commit 088c965

Browse files
authored
Merge pull request #88 from wangtaicheng/dev
: fix #86 #87
2 parents 5e5871c + 02ce1d2 commit 088c965

File tree

6 files changed

+45
-22
lines changed

6 files changed

+45
-22
lines changed

build.gradle

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
import org.ajoberstar.grgit.Grgit
22

33
plugins {
4-
id "org.jetbrains.intellij" version "0.4.1"
5-
id "org.ajoberstar.grgit" version "3.1.1"
4+
id "org.jetbrains.intellij" version "1.3.0"
5+
id "org.ajoberstar.grgit" version "4.1.1"
66
id "java"
77
id "idea"
88
}
99

1010
group 'net.ishchenko.idea.nginx'
11-
version '0.1.9'
11+
version '0.1.11'
1212

13-
sourceCompatibility = 1.8
14-
targetCompatibility = 1.8
13+
sourceCompatibility = JavaVersion.VERSION_11
14+
targetCompatibility = JavaVersion.VERSION_11
1515

1616
repositories {
17+
mavenLocal()
1718
mavenCentral()
19+
1820
}
1921

2022
dependencies {
21-
testCompile group: 'junit', name: 'junit', version: '4.11'
23+
// implementation 'com.jgoodies:forms:1.2.1'
24+
implementation 'com.jgoodies:jgoodies-common:1.8.1'
25+
implementation 'com.jgoodies:jgoodies-forms:1.9.0'
26+
// implementation 'com.jgoodies:jgoodiesforms:1.5.1'
27+
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
2228
}
2329

2430
sourceSets {
@@ -32,14 +38,17 @@ sourceSets {
3238
}
3339

3440
intellij {
35-
version '2019.2' //IntelliJ IDEA dependency
36-
updateSinceUntilBuild false
37-
pluginName 'idea-nginx-support'
41+
version = '2021.3' //IntelliJ IDEA dependency
42+
type = 'IU'
43+
updateSinceUntilBuild = false
44+
pluginName = 'idea-nginx-support'
45+
// localPath = 'D:\\Program\\JetBrains\\ideaIU-2021.3.win'
46+
// localPath = 'D:\\Program\\JetBrains\\WebStorm-2021.2.3.win'
3847

39-
publishPlugin {
40-
username project.hasProperty('user') ? user : ''
41-
password project.hasProperty('pass') ? pass : ''
42-
}
48+
// publishPlugin {
49+
// username project.hasProperty('user') ? user : ''
50+
// password project.hasProperty('pass') ? pass : ''
51+
// }
4352
}
4453

4554
task generateDocumentation(type: JavaExec) {

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip

nginx.conf

Whitespace-only changes.

resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<idea-plugin url="https://github.com/ishchenko/idea-nginx">
1+
<idea-plugin url="https://github.com/ishchenko/idea-nginx" require-restart="true">
22

33
<id>ideanginx9</id>
44
<name>nginx Support</name>

src/net/ishchenko/idea/nginx/configurator/NginxConfigurationManager.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
import com.intellij.openapi.options.BaseConfigurable;
2222
import com.intellij.openapi.options.ConfigurationException;
2323
import com.intellij.openapi.util.IconLoader;
24-
import javax.swing.*;
2524
import net.ishchenko.idea.nginx.NginxBundle;
2625
import org.jetbrains.annotations.Nls;
2726
import org.jetbrains.annotations.NotNull;
2827

28+
import javax.swing.*;
29+
2930
/**
3031
* Created by IntelliJ IDEA.
3132
* User: Max
@@ -37,8 +38,9 @@ public class NginxConfigurationManager extends BaseConfigurable implements BaseC
3738
private NginxServersConfiguration configuration;
3839
private NginxConfigurationPanel panel;
3940

40-
public NginxConfigurationManager(NginxServersConfiguration configuration) {
41-
this.configuration = configuration;
41+
public NginxConfigurationManager() {
42+
43+
this.configuration = NginxServersConfiguration.getInstance();
4244
}
4345

4446
public NginxServersConfiguration getConfiguration() {
@@ -66,10 +68,12 @@ public void initComponent() {
6668
}
6769

6870
@Nls
71+
@Override
6972
public String getDisplayName() {
7073
return NginxBundle.message("config.title");
7174
}
7275

76+
@Override
7377
public String getHelpTopic() {
7478
return null;
7579
}
@@ -100,9 +104,9 @@ public JComponent createComponent() {
100104
}
101105
return panel.getPanel();
102106
}
103-
107+
@Override
104108
public void disposeUIResources() {
105109
panel = null;
106110
}
107111

108-
}
112+
}

src/net/ishchenko/idea/nginx/run/NginxConfigurationType.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,31 @@ public class NginxConfigurationType implements ConfigurationType {
3636

3737
NginxConfigurationFactory ncf = new NginxConfigurationFactory(this);
3838

39+
@NotNull
40+
@Override
3941
public String getDisplayName() {
4042
return NginxBundle.message("cofigurationtype.displayname");
4143
}
4244

45+
@Override
4346
public String getConfigurationTypeDescription() {
4447
return NginxBundle.message("configurationtype.description");
4548
}
4649

50+
@Override
4751
public Icon getIcon() {
4852
return IconLoader.getIcon("/nginx.png");
4953
}
5054

55+
@Override
5156
@NotNull
5257
public String getId() {
5358
return "nginx.configuration.type";
5459
}
5560

61+
@Override
5662
public ConfigurationFactory[] getConfigurationFactories() {
57-
return new ConfigurationFactory[]{ncf};
63+
return new ConfigurationFactory[] {this.ncf};
5864
}
5965

6066
private static class NginxConfigurationFactory extends ConfigurationFactory {
@@ -63,10 +69,14 @@ protected NginxConfigurationFactory(@NotNull ConfigurationType type) {
6369
super(type);
6470
}
6571

72+
73+
@Override
6674
public RunConfiguration createTemplateConfiguration(Project project) {
6775
return new NginxRunConfiguration(project, this, NginxBundle.message("cofigurationtype.displayname"));
6876
}
69-
77+
78+
79+
@NotNull
7080
@Override
7181
public String getId() {
7282
return "net.ishchenko.idea.nginx.run";

0 commit comments

Comments
 (0)