Skip to content

Commit 39e7889

Browse files
committed
Chore: Fix plugin verifier issues, increase minimum requirement to v242
1 parent cca52b4 commit 39e7889

File tree

13 files changed

+22
-69
lines changed

13 files changed

+22
-69
lines changed

.github/workflows/CoverallsReport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
run: chmod +x gradlew
2424
- name: Build with Gradle
2525
env:
26-
IDEA_VERSION: 2024.1
26+
IDEA_VERSION: 2024.2.1
2727
run: xvfb-run ./gradlew test
2828
- name: Coveralls
2929
uses: coverallsapp/[email protected]

.github/workflows/CronEAP.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ jobs:
2424
- name: Build with Gradle
2525
env:
2626
IDEA_PLATFORM: IC
27-
IDEA_VERSION: 2024.1
27+
IDEA_VERSION: 2024.2.1
2828
IDEA_SOURCES: false
2929
run: xvfb-run ./gradlew verifyPlugin

.github/workflows/PublishStable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
include:
19-
- ideaVersion: 2024.1
19+
- ideaVersion: 2024.2.1
2020

2121
steps:
2222
- uses: actions/checkout@v2

.github/workflows/PullRequest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
include:
19-
- ideaVersion: 2024.1.1
19+
- ideaVersion: 2024.2.1
2020
ideaPlatform: IC
2121
- ideaVersion: 2024.2.1
2222
ideaPlatform: PY

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This enables default editor features like syntax validation, highlighting and in
3636

3737
Release 4.* is focusing on text-editor features.
3838
Text-editor is the default editor (again).
39-
It requires IntelliJ platform version 2024.1 or newer.
39+
**IntelliJ platform version 2024.2 or newer required.**
4040

4141
Previous versions (incl README) can still be accessed and installed manually (see section [Installation](https://github.com/SeeSharpSoft/intellij-csv-validator#installation)).
4242

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ tasks {
129129
}
130130

131131
processResources {
132-
duplicatesStrategy = DuplicatesStrategy.WARN
132+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
133133
}
134134

135135
processTestResources {
136-
duplicatesStrategy = DuplicatesStrategy.WARN
136+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
137137
}
138138

139139
test {

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ pluginName=CSV Editor
66
pluginId=net.seesharpsoft.intellij.plugins.csv
77
pluginVersion=4.0.0
88

9-
pluginSinceBuild=241
9+
pluginSinceBuild=242
1010

1111
platform = IC
1212
# LATEST-EAP-SNAPSHOT
13-
platformVersion = 2024.1.1
13+
platformVersion = 2024.2.1
1414

1515
platformBundledPlugins=Git4Idea,org.jetbrains.plugins.github
1616

src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvGithubIssueSubmitter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected boolean submit(IdeaLoggingEvent event, String additionalInfo, Project
9292
String token = GHCompatibilityUtil.getOrRequestToken(account, project);
9393
if (token == null) return false;
9494

95-
GithubApiRequestExecutor githubExecutor = GithubApiRequestExecutor.Factory.getInstance().create(token);
95+
GithubApiRequestExecutor githubExecutor = GithubApiRequestExecutor.Factory.getInstance().create(account.getServer(), token);
9696

9797
Task submitTask = new Task.Backgroundable(project, getReportActionText()) {
9898
@Override

src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableEditor.java

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package net.seesharpsoft.intellij.plugins.csv.editor.table;
22

3-
import com.intellij.codeHighlighting.BackgroundEditorHighlighter;
43
import com.intellij.ide.structureView.StructureViewBuilder;
54
import com.intellij.openapi.application.ApplicationManager;
65
import com.intellij.openapi.editor.Document;
@@ -9,7 +8,6 @@
98
import com.intellij.openapi.fileEditor.*;
109
import com.intellij.openapi.project.Project;
1110
import com.intellij.openapi.util.Key;
12-
import com.intellij.openapi.util.TraceableDisposable;
1311
import com.intellij.openapi.util.UserDataHolder;
1412
import com.intellij.openapi.util.UserDataHolderBase;
1513
import com.intellij.openapi.vfs.VirtualFile;
@@ -60,7 +58,7 @@ public CsvTableEditor(@NotNull Project projectArg, @NotNull VirtualFile fileArg)
6058
}
6159

6260
@NotNull
63-
public abstract CsvTableActions getActions();
61+
public abstract CsvTableActions<?> getActions();
6462

6563
protected abstract boolean isInCellEditMode();
6664

@@ -109,26 +107,25 @@ public <T extends CsvTableEditorState> T getTableEditorState() {
109107
}
110108

111109
@Override
110+
@NotNull
112111
public FileEditorState getState(@NotNull FileEditorStateLevel level) {
113112
return getTableEditorState();
114113
}
115114

116115
@Override
117116
public void setState(@NotNull FileEditorState fileEditorState) {
118-
CsvTableEditorState tableEditorState = fileEditorState instanceof CsvTableEditorState ? (CsvTableEditorState) fileEditorState : new CsvTableEditorState();
119-
this.storedState = tableEditorState;
117+
this.storedState = fileEditorState instanceof CsvTableEditorState ? (CsvTableEditorState) fileEditorState : new CsvTableEditorState();
120118
applyEditorState(getTableEditorState());
121119
}
122120

123121
@Override
124122
public boolean isModified() {
125-
// return this.dataManagement != null && initialState != null && !this.dataManagement.equalsCurrentState(initialState);
126123
return false;
127124
}
128125

129126
@Override
130127
public boolean isValid() {
131-
if (this.isDisposed() || file == null || !file.isValid()) {
128+
if (this.isDisposed() || !file.isValid()) {
132129
return false;
133130
}
134131
CsvFile csvFile = this.getCsvFile();
@@ -161,12 +158,6 @@ public void removePropertyChangeListener(@NotNull PropertyChangeListener propert
161158
this.changeSupport.removePropertyChangeListener(propertyChangeListener);
162159
}
163160

164-
@Nullable
165-
@Override
166-
public BackgroundEditorHighlighter getBackgroundHighlighter() {
167-
return null;
168-
}
169-
170161
@Override
171162
public void dispose() {
172163
if (this.isDisposed()) return;
@@ -193,7 +184,7 @@ public <T> void putUserData(@NotNull Key<T> key, @Nullable T t) {
193184

194185
@Nullable
195186
public StructureViewBuilder getStructureViewBuilder() {
196-
return isValid() ? StructureViewBuilder.PROVIDER.getStructureViewBuilder(file.getFileType(), file, this.project) : null;
187+
return isValid() ? StructureViewBuilder.getProvider().getStructureViewBuilder(file.getFileType(), file, this.project) : null;
197188
}
198189

199190
@Nullable
@@ -218,7 +209,7 @@ public PsiFile getPsiFile() {
218209

219210
@Nullable
220211
public final CsvFile getCsvFile() {
221-
if (project == null || project.isDisposed()) {
212+
if (project.isDisposed()) {
222213
return null;
223214
}
224215
if (this.psiFile == null || !this.psiFile.isValid()) {

src/main/java/net/seesharpsoft/intellij/plugins/csv/formatter/CsvFormatHelper.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
package net.seesharpsoft.intellij.plugins.csv.formatter;
22

3-
import com.intellij.formatting.SpacingBuilder;
43
import com.intellij.lang.ASTNode;
54
import com.intellij.psi.PsiElement;
6-
import com.intellij.psi.codeStyle.CodeStyleSettings;
75
import net.seesharpsoft.intellij.plugins.csv.CsvHelper;
8-
import net.seesharpsoft.intellij.plugins.csv.CsvLanguage;
9-
import net.seesharpsoft.intellij.plugins.csv.psi.CsvElementType;
106
import net.seesharpsoft.intellij.plugins.csv.psi.CsvTypes;
117
import net.seesharpsoft.intellij.plugins.csv.settings.CsvCodeStyleSettings;
128
import org.jetbrains.annotations.Nullable;
@@ -176,29 +172,6 @@ public static int getTextLength(PsiElement psiElement, CsvCodeStyleSettings csvC
176172
return CsvFormatHelper.getTextLength(psiElement.getText().strip(), csvCodeStyleSettings);
177173
}
178174

179-
public static SpacingBuilder createSpaceBuilder(CodeStyleSettings settings) {
180-
CsvCodeStyleSettings csvCodeStyleSettings = settings.getCustomSettings(CsvCodeStyleSettings.class);
181-
SpacingBuilder builder = new SpacingBuilder(settings, CsvLanguage.INSTANCE);
182-
if (csvCodeStyleSettings.TRIM_LEADING_WHITE_SPACES || csvCodeStyleSettings.TABULARIZE) {
183-
builder
184-
.after(CsvTypes.COMMA).spaceIf(csvCodeStyleSettings.SPACE_AFTER_SEPARATOR)
185-
.after(CsvTypes.CRLF).spaces(0)
186-
.after(CsvElementType.DOCUMENT_START).spaces(0);
187-
} else if (csvCodeStyleSettings.SPACE_AFTER_SEPARATOR) {
188-
builder.after(CsvTypes.COMMA).spaces(1);
189-
}
190-
191-
if (csvCodeStyleSettings.TRIM_TRAILING_WHITE_SPACES || csvCodeStyleSettings.TABULARIZE) {
192-
builder
193-
.before(CsvTypes.COMMA).spaceIf(csvCodeStyleSettings.SPACE_BEFORE_SEPARATOR)
194-
.before(CsvTypes.CRLF).spaces(0);
195-
} else if (csvCodeStyleSettings.SPACE_BEFORE_SEPARATOR) {
196-
builder.before(CsvTypes.COMMA).spaces(1);
197-
}
198-
199-
return builder;
200-
}
201-
202175
public static boolean isFieldNode(@Nullable ASTNode node) {
203176
return node != null && node.getElementType() == CsvTypes.FIELD;
204177
}

0 commit comments

Comments
 (0)