Skip to content

Commit 6f8fcb4

Browse files
authored
Merge branch 'ignatov:master' into master
2 parents 3e89125 + e781001 commit 6f8fcb4

File tree

13 files changed

+86
-71
lines changed

13 files changed

+86
-71
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v1
12-
- name: Set up JDK 11
12+
- name: Set up JDK 17
1313
uses: actions/setup-java@v1
1414
with:
15-
java-version: 11
15+
java-version: 17
1616
- name: Build with Gradle
1717
run: ./gradlew clean test

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
plugins {
2-
id 'org.jetbrains.intellij' version "1.8.0"
2+
id 'org.jetbrains.intellij' version "1.10.0"
33
}
44

55
dependencies {
66
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.6.1'
77
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.1'
88
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.1'
99
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.1'
10-
testCompileOnly 'junit:junit:4.13'
10+
testCompileOnly 'junit:junit:4.13.1'
1111
}
1212

1313
version = "${version}.$buildNumber"
1414
allprojects {
1515
repositories { mavenCentral() }
1616
apply plugin: 'java'
1717
sourceCompatibility = javaVersion
18-
targetCompatibility = javaVersion
18+
targetCompatibility = javaTargetVersion
1919
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
2020

2121
sourceSets {

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# https://www.jetbrains.com/intellij-repository/snapshots
44

55
version = 0.11
6-
ideaVersion = 2022.2
7-
javaVersion = 11
8-
javaTargetVersion = 11
6+
ideaVersion = 223.7571-EAP-CANDIDATE-SNAPSHOT
7+
javaVersion = 17
8+
javaTargetVersion = 17
99
buildNumber = SNAPSHOT
1010
sources = true
1111
isEAP = false

jps-plugin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
jar.archiveName = "jps-plugin.jar"
1+
jar.archiveFileName = "jps-plugin.jar"

jps-plugin/tests/org/intellij/erlang/jps/BuildResult.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ private boolean isSuccessful() {
5454
}
5555

5656
public void assertSuccessful() {
57-
Function<BuildMessage,String> toStringFunction = StringUtil.createToStringFunction(BuildMessage.class);
57+
Function<BuildMessage, String> toStringFunction = Object::toString;
5858
assertTrue("Build failed. \nErrors:\n" + StringUtil.join(myErrorMessages, toStringFunction, "\n") +
59-
"\nInfo messages:\n" + StringUtil.join(myInfoMessages, toStringFunction, "\n"), isSuccessful());
59+
"\nInfo messages:\n" + StringUtil.join(myInfoMessages, toStringFunction, "\n"), isSuccessful());
6060
}
6161
}

resources/META-INF/ErlangPlugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
<referencesSearch implementation="org.intellij.erlang.search.ErlangAtomSearch"/>
156156
<targetElementEvaluator language="Erlang" implementationClass="org.intellij.erlang.search.ErlangTargetElementEvaluator"/>
157157

158-
<editorNotificationProvider implementation="org.intellij.erlang.inspection.SetupSDKNotificationProvider"/>
158+
<editorNotificationProvider implementation="org.intellij.erlang.inspection.ErlangSdkNotificationProvider"/>
159159

160160
<callHierarchyProvider language="Erlang" implementationClass="org.intellij.erlang.hierarchy.ErlangCallHierarchyProvider"/>
161161

src/org/intellij/erlang/ErlangDescriptionProvider.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class ErlangDescriptionProvider implements ElementDescriptionProvider {
3838
@Override
3939
public String getElementDescription(@NotNull PsiElement o, @NotNull ElementDescriptionLocation location) {
4040
if (!(o instanceof ErlangCompositeElement)) return null;
41-
if (location == UsageViewNodeTextLocation.INSTANCE && (o instanceof ErlangNamedElement || o instanceof ErlangQAtom)) {
41+
if (location == UsageViewNodeTextLocation.INSTANCE && (o instanceof ErlangNamedElement || o instanceof ErlangQAtom || o instanceof ErlangTypeRef)) {
4242
return getElementDescription(o, UsageViewShortNameLocation.INSTANCE);
4343
}
4444
if (location == UsageViewShortNameLocation.INSTANCE ||
@@ -47,6 +47,7 @@ public String getElementDescription(@NotNull PsiElement o, @NotNull ElementDescr
4747
) {
4848
if (o instanceof ErlangNamedElement) return ((ErlangNamedElement) o).getName();
4949
if (o instanceof ErlangQAtom) return ErlangPsiImplUtil.getName((ErlangQAtom)o);
50+
if (o instanceof ErlangTypeRef) return o.getText();
5051
if (o instanceof ErlangAttribute) {
5152
ErlangSpecification spec = ((ErlangAttribute) o).getSpecification();
5253
if (spec != null) return spec.getName();
@@ -68,6 +69,7 @@ public String getElementDescription(@NotNull PsiElement o, @NotNull ElementDescr
6869
else if (o instanceof ErlangTypeDefinition) return "type";
6970
else if (o instanceof ErlangAttribute) return "attribute";
7071
else if (o instanceof ErlangQAtom) return "atom";
72+
else if (o instanceof ErlangTypeRef) return "type";
7173
}
7274
LOG.error("Unexpected element " + o.getText() + ", class: " + o.getClass() + ", location: " + location.getClass());
7375
return "<unknown>";

src/org/intellij/erlang/index/ErlangAtomIndex.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.jetbrains.annotations.NotNull;
3232

3333
import java.util.Collection;
34+
import java.util.HashMap;
3435
import java.util.Map;
3536

3637
public class ErlangAtomIndex extends ScalarIndexExtension<String> {
@@ -52,7 +53,7 @@ public int getVersion() {
5253
@Override
5354
public DataIndexer<String, Void, FileContent> getIndexer() {
5455
return inputData -> {
55-
final Map<String, Void> result = new THashMap<>();
56+
final Map<String, Void> result = new HashMap<>();
5657
PsiFile file = inputData.getPsiFile();
5758
if (file instanceof ErlangFile) {
5859
file.accept(new ErlangRecursiveVisitor() {

0 commit comments

Comments
 (0)