Skip to content

Commit 7951067

Browse files
committed
Upgrade to IDEA 2019.3.1
Closes gh-165
1 parent 3cc9436 commit 7951067

File tree

3 files changed

+47
-17
lines changed

3 files changed

+47
-17
lines changed

spring-javaformat-intellij/spring-javaformat-intellij-plugin/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@
5656
<version>${project.version}</version>
5757
<scope>provided</scope>
5858
</dependency>
59+
<dependency>
60+
<groupId>io.spring.javaformat.intellij</groupId>
61+
<artifactId>platform-util-ui</artifactId>
62+
<version>${project.version}</version>
63+
<scope>provided</scope>
64+
</dependency>
5965
<dependency>
6066
<groupId>io.spring.javaformat.intellij</groupId>
6167
<artifactId>util</artifactId>

spring-javaformat-intellij/spring-javaformat-intellij-plugin/src/main/java/io/spring/format/formatter/intellij/SpringFormatComponent.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2019 the original author or authors.
2+
* Copyright 2017-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,10 +19,8 @@
1919
import java.util.concurrent.locks.Lock;
2020
import java.util.concurrent.locks.ReentrantLock;
2121

22-
import com.intellij.designer.designSurface.ScalableComponent;
2322
import com.intellij.ide.util.PropertiesComponent;
2423
import com.intellij.openapi.application.ApplicationManager;
25-
import com.intellij.openapi.components.AbstractProjectComponent;
2624
import com.intellij.openapi.components.ProjectComponent;
2725
import com.intellij.openapi.diagnostic.Logger;
2826
import com.intellij.openapi.project.Project;
@@ -41,11 +39,13 @@
4139
*
4240
* @author Phillip Webb
4341
*/
44-
public class SpringFormatComponent extends AbstractProjectComponent {
42+
public class SpringFormatComponent implements ProjectComponent {
4543

4644
private static final String CODE_STYLE_MANAGER_KEY = CodeStyleManager.class.getName();
4745

48-
private static final String ACTIVE_PROPERTY = ScalableComponent.class.getName() + ".ACTIVE";
46+
private static final String ACTIVE_PROPERTY = SpringFormatComponent.class.getName() + ".ACTIVE";
47+
48+
private final Project project;
4949

5050
private final StatusIndicator statusIndicator;
5151

@@ -58,7 +58,7 @@ public class SpringFormatComponent extends AbstractProjectComponent {
5858
private PropertiesComponent properties;
5959

6060
protected SpringFormatComponent(Project project) {
61-
super(project);
61+
this.project = project;
6262
this.statusIndicator = new StatusIndicator(project);
6363
this.properties = PropertiesComponent.getInstance(project);
6464
}
@@ -68,7 +68,7 @@ public void initComponent() {
6868
if (this.properties.getBoolean(ACTIVE_PROPERTY, false)) {
6969
update(State.ACTIVE);
7070
}
71-
this.monitors = new Monitors(this.myProject, this::update, FileMonitor.factory(), MavenMonitor.factory(),
71+
this.monitors = new Monitors(this.project, this::update, FileMonitor.factory(), MavenMonitor.factory(),
7272
GradleMonitor.factory());
7373
}
7474

@@ -83,7 +83,7 @@ public void disposeComponent() {
8383
private void update(State state) {
8484
this.lock.lock();
8585
try {
86-
CodeStyleManager manager = CodeStyleManager.getInstance(this.myProject);
86+
CodeStyleManager manager = CodeStyleManager.getInstance(this.project);
8787
if (manager == null) {
8888
logger.warn("Unable to find exiting CodeStyleManager");
8989
return;
@@ -106,7 +106,7 @@ private void update(State state) {
106106
}
107107

108108
private void reregisterComponent(CodeStyleManager manager) {
109-
MutablePicoContainer container = (MutablePicoContainer) this.myProject.getPicoContainer();
109+
MutablePicoContainer container = (MutablePicoContainer) this.project.getPicoContainer();
110110
container.unregisterComponent(CODE_STYLE_MANAGER_KEY);
111111
container.registerComponentInstance(CODE_STYLE_MANAGER_KEY, manager);
112112
}

spring-javaformat-intellij/spring-javaformat-intellij-runtime/pom.xml

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
<name>Spring JavaFormat IntelliJ Runtime</name>
1414
<properties>
1515
<main.basedir>${basedir}/../..</main.basedir>
16-
<intellij.binary>https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2019.1/ideaIC-2019.1.zip</intellij.binary>
17-
<intellij.source>https://github.com/JetBrains/intellij-community/archive/idea/191.6183.87.zip</intellij.source>
16+
<intellij.binary>https://download.jetbrains.com/idea/ideaIC-2019.3.1.tar.gz</intellij.binary>
17+
<intellij.source>https://github.com/JetBrains/intellij-community/archive/idea/193.5662.53.zip</intellij.source>
18+
<intellij.root>idea-IC-193.5662.53</intellij.root>
1819
</properties>
1920
<build>
2021
<plugins>
@@ -37,7 +38,7 @@
3738
</goals>
3839
<configuration>
3940
<url>${intellij.binary}</url>
40-
<outputFileName>intellij.zip</outputFileName>
41+
<outputFileName>intellij.tar.gz</outputFileName>
4142
</configuration>
4243
</execution>
4344
<execution>
@@ -65,15 +66,16 @@
6566
</goals>
6667
<configuration>
6768
<target>
68-
<unzip src="${project.build.directory}/intellij.zip"
69+
<gunzip src="${project.build.directory}/intellij.tar.gz"/>
70+
<untar src="${project.build.directory}/intellij.tar"
6971
dest="${project.build.directory}/intellij">
7072
<patternset>
71-
<include name="lib/*.jar" />
72-
<include name="plugins/maven/lib/*.jar" />
73-
<include name="plugins/gradle/lib/*.jar" />
73+
<include name="${intellij.root}/lib/*.jar" />
74+
<include name="${intellij.root}/plugins/maven/lib/*.jar" />
75+
<include name="${intellij.root}/plugins/gradle/lib/*.jar" />
7476
</patternset>
7577
<mapper type="flatten" />
76-
</unzip>
78+
</untar>
7779
<unzip
7880
src="${project.build.directory}/intellij-source.zip"
7981
dest="${project.build.directory}/intellij-source">
@@ -84,6 +86,8 @@
8486
name="*/platform/platform-impl/src/**" />
8587
<include
8688
name="*/platform/util/src/**" />
89+
<include
90+
name="*/platform/util/ui/src/**" />
8791
<include
8892
name="*/platform/extensions/src/**" />
8993
<include
@@ -106,6 +110,9 @@
106110
<zip
107111
destfile="${project.build.directory}/intellij-source/util-sources.zip"
108112
basedir="${project.build.directory}/intellij-source/platform/util/src" />
113+
<zip
114+
destfile="${project.build.directory}/intellij-source/platform-util-ui-sources.zip"
115+
basedir="${project.build.directory}/intellij-source/platform/util/ui/src" />
109116
<zip
110117
destfile="${project.build.directory}/intellij-source/extensions-sources.zip"
111118
basedir="${project.build.directory}/intellij-source/platform/extensions/src" />
@@ -181,6 +188,23 @@
181188
<generatePom>true</generatePom>
182189
</configuration>
183190
</execution>
191+
<execution>
192+
<id>install-intellij-platform-util-ui</id>
193+
<phase>install</phase>
194+
<inherited>false</inherited>
195+
<goals>
196+
<goal>install-file</goal>
197+
</goals>
198+
<configuration>
199+
<file>${project.build.directory}/intellij/platform-util-ui.jar</file>
200+
<sources>${project.build.directory}/intellij-source/platform-util-ui-sources.zip</sources>
201+
<groupId>io.spring.javaformat.intellij</groupId>
202+
<artifactId>platform-util-ui</artifactId>
203+
<version>${project.version}</version>
204+
<packaging>jar</packaging>
205+
<generatePom>true</generatePom>
206+
</configuration>
207+
</execution>
184208
<execution>
185209
<id>install-intellij-extensions</id>
186210
<phase>install</phase>

0 commit comments

Comments
 (0)