Skip to content

Commit ec4590a

Browse files
committed
Drop support for < 261 to fix deprecations
1 parent 8d5e652 commit ec4590a

8 files changed

Lines changed: 16 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# 1.0.9
1+
# 1.1.0
22
* Update PMD to 7.24.0
3-
* Dropped support for IntelliJ IDEA < 251
3+
* Dropped support for IntelliJ IDEA < 261 to fix deprecations
44

55
# 1.0.8
66
* Correctly handle missing/removal of built-in configuration

build.gradle

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,9 @@ intellijPlatform {
104104
}
105105
pluginVerification {
106106
ides {
107-
select {
108-
it.types = [IntelliJPlatformType.IntellijIdeaCommunity]
109-
it.sinceBuild = properties("platformSinceBuild")
110-
it.untilBuild = '252.*'
111-
}
112107
select {
113108
it.types = [IntelliJPlatformType.IntellijIdea]
114-
it.sinceBuild = '253'
109+
it.sinceBuild = properties("platformSinceBuild")
115110
}
116111
}
117112
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
pluginGroup=software.xdev.pmd
33
pluginName=PMD X
44
# SemVer format -> https://semver.org
5-
pluginVersion=1.0.9-SNAPSHOT
5+
pluginVersion=1.1.0-SNAPSHOT
66
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
77
platformType=IU
88
platformVersion=2026.1.1
9-
platformSinceBuild=251
9+
platformSinceBuild=261
1010
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
1111
# Example: platformBundledPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
1212
platformBundledPlugins=com.intellij.java,org.jetbrains.kotlin

src/main/java/software/xdev/pmd/action/ActionFilesAnalyzer.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,13 @@ private void analyzeAsync(
8585
project.getService(PluginConfigurationManager.class).getCurrent();
8686
final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex();
8787

88-
final Map<Optional<com.intellij.openapi.module.Module>, Set<PsiFile>> psiFiles = ReadAction.compute(() ->
89-
this.collectFiles(projectFileIndex, psiManager, pluginConfiguration, progressIndicator, selectedFiles));
88+
final Map<Optional<com.intellij.openapi.module.Module>, Set<PsiFile>> psiFiles =
89+
ReadAction.computeBlocking(() -> this.collectFiles(
90+
projectFileIndex,
91+
psiManager,
92+
pluginConfiguration,
93+
progressIndicator,
94+
selectedFiles));
9095

9196
if(psiFiles.isEmpty())
9297
{

src/main/java/software/xdev/pmd/analysis/PMDAnalyzer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ private List<PsiFile> determineApplicableFiles(
268268
final int totalFiles = filesToScan.size();
269269
final AtomicInteger counter = new AtomicInteger(0);
270270

271-
final List<PsiFile> files = ReadAction.compute(() -> filesToScan.stream()
271+
final List<PsiFile> files = ReadAction.computeBlocking(() -> filesToScan.stream()
272272
.filter(file -> {
273273
progressIndicator.setFraction((double)counter.incrementAndGet() / totalFiles);
274274
progressIndicator.setText2(file != null ? file.getName() : null);

src/main/java/software/xdev/pmd/annotator/PMDExternalLanguageAnnotator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ public void apply(
178178
+ "<p>"
179179
+ ruleDescriptionDocMarkdownToHtmlService.mdToHtml(rule.getDescription())
180180
+ "</p>")
181-
.range(range)
182-
.needsUpdateOnTyping(true);
181+
.range(range);
183182

184183
if(psiElement != null)
185184
{

src/main/java/software/xdev/pmd/currentfile/CurrentFileAnalysisManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private void reportAnalysisResultInternal(
7777
return;
7878
}
7979

80-
final Optional<PsiFile> optPSIFile = ReadAction.compute(() -> Optional.of(editor)
80+
final Optional<PsiFile> optPSIFile = ReadAction.computeBlocking(() -> Optional.of(editor)
8181
.map(Editor::getDocument)
8282
.map(FileDocumentManager.getInstance()::getFile)
8383
.flatMap(this::findPSIFile));

src/main/java/software/xdev/pmd/ui/toolwindow/node/FileOverviewNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public FileOverviewNode(final PsiFile psiFile)
2929
{
3030
this.psiFile = psiFile;
3131
// Icon requires read access so let's get it here
32-
this.icon = ReadAction.compute(() -> psiFile.getIcon(0));
32+
this.icon = ReadAction.computeBlocking(() -> psiFile.getIcon(0));
3333

3434
this.filePositionSupplier = Suppliers.memoize(() -> new FilePosition(psiFile));
3535
}

0 commit comments

Comments
 (0)