Skip to content

Commit 9d3d3ad

Browse files
authored
Merge pull request #951 from SeeSharpSoft/v420
Release v4.2.0
2 parents 8419201 + bb2a95e commit 9d3d3ad

19 files changed

Lines changed: 283 additions & 145 deletions

CHANGELOG.md

Lines changed: 23 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,24 @@
1010

1111
### Fixed
1212

13-
## [4.1.0] - Sep 07, 2025
13+
## 4.2.0 - Jan 26, 2026
14+
15+
### Fixed
16+
17+
- Compatibility verification issues
18+
- Invalid PSI Element - class CsvFile because different providers
19+
- PluginException - Element class CsvFile - file is invalid #923
20+
- NullPointerException #933
21+
- PluginException - Cannot check provider net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditorProvider #919
22+
- ExceptionInInitializerError #916
23+
- GithubStatusCodeException - 422 Unprocessable Entity - Validation Failed [Search; q]invalid: null #920
24+
- com.intellij.diagnostic.Freeze #921
25+
- Correct short name format
26+
- Slow operations are prohibited on EDT #936
27+
- This method is forbidden on EDT because it does not pump the event queue #940
28+
- Argument for @NotNull parameter 'document' of PsiDocumentManagerImpl.getPsiFile must not be null #941
29+
30+
## 4.1.0 - Sep 07, 2025
1431

1532
### Fixed
1633

@@ -22,7 +39,7 @@
2239

2340
- Project structure refactoring to avoid circular dependencies
2441

25-
## [4.0.2] - Dec 29, 2024
42+
## 4.0.2 - Dec 29, 2024
2643

2744
### Added
2845

@@ -54,9 +71,11 @@
5471
## 4.0.0 - Oct 07, 2024
5572

5673
### Added
74+
5775
- Tabularize formatting is back!
5876

5977
### Changed
78+
6079
- Text editor is shown first by default
6180

6281
## 3.4.0 - Aug 10, 2024
@@ -70,13 +89,6 @@
7089

7190
### Fixed
7291

73-
- Update gradle build
74-
- PluginException: xxx ms to call on EDT CsvChangeSeparatorActionGroup#update@EditorPopup #401
75-
- AlreadyDisposedException: Already disposed #639
76-
- Exceptions occurred on invoking the intention 'Unquote' on a copy of the file #670 #816
77-
78-
### Fixed
79-
8092
- StringIndexOutOfBoundsException: begin 0, end -1, length 5993 #801
8193
- Unhandled exception in [CoroutineName(PsiAwareFileEditorManagerImpl)] #666
8294

@@ -96,7 +108,6 @@
96108

97109
- NullPointerException: Cannot invoke "getSelectedColumn()" because "tblEditor" is null #519
98110
- IllegalStateException: Attempt to modify PSI for non-committed Document! #516
99-
100111
- StringIndexOutOfBoundsException: begin 0, end -1, length 5995 #511
101112
- ArrayIndexOutOfBoundsException: 12 >= 12 #482
102113

@@ -116,7 +127,6 @@
116127

117128
- Argument for @NotNull parameter 'tableEditor' of CsvTableActions.adjustColumnWidths must not be null #431
118129
- NullPointerException #429
119-
120130
- Comment handling breaking in table editor #451
121131

122132
### Added
@@ -136,30 +146,14 @@
136146

137147
- Argument for @NotNull parameter 'anchor' of CsvPsiTreeUpdater.appendField must not be null #392
138148
- ArrayIndexOutOfBoundsException: 8 >= 8 #396
139-
140149
- catch unreasonable exception when retrieving service #410
141150
- NullPointerException: Cannot invoke "CsvTableEditor.getActions()" because the return value of "CsvTableEditorActions.getTableEditor(AnActionEvent)" is null #394
142151

143152
### Added
144153

145154
- 358 ms to call on EDT CsvChangeSeparatorActionGroup#update@EditorPopup #401
146-
## 3.0.2 - Dec 15, 2022
147-
148-
### Fixed
149-
150-
- Detected bulk mode status update from DocumentBulkUpdateListener #384
151-
- Argument for @NotNull parameter 'parent' of PsiHelper.getNthChildOfType must not be null #372
152155

153-
- Argument for @NotNull parameter 'element' of PsiHelper.getSiblingOfType must not be null #375
154-
- Cannot invoke "Document.getText()" because "document" is null #388
155-
156-
### Fixed
157-
158-
- Cannot invoke "PsiFile.getProject()" because the return value of "CsvPsiTreeUpdater.getPsiFile()" is null #378
159-
- Argument for @NotNull parameter 'replacement' of CsvPsiTreeUpdater$ReplacePsiAction.<init> must not be null #380
160-
161-
- provide project parameter for opening link
162-
- Cannot invoke "Document.insertString(int, java.lang.CharSequence)" because "document" is null #386
156+
## 3.0.2 - Dec 15, 2022
163157

164158
### Fixed
165159

@@ -169,23 +163,13 @@
169163

170164
### Fixed
171165

172-
- cannot init component state (componentName=CsvFileAttributes) #359
173-
- cannot invoke "add(Object)" because "this.myUncommittedActions" is null #361
174-
- cannot invoke "createNotification(...)" because "notificationGroup" is null #362
175-
- cannot invoke "getManager()" because the return value of "getPsiFile()" is null #363
176-
177-
### Fixed
178-
179166
- image in plugin description
180167
- plugin update restart
181168

182169
## 3.0.0 - Nov 09, 2022
183170

184171
MAJOR UPDATE VERSION 3
185172

186-
General
187-
-------
188-
189173
- renamed plugin to 'CSV Editor'
190174
- fixed all compatibility issues with respect to IntelliJ platform 2022.*
191175
- rework language lexer
@@ -194,10 +178,6 @@ General
194178
- adjusted setting dialogs
195179
- integrated GitHub issue reporter in case plugin raises an exception
196180
- removed TSV & PSV language, only CSV language but different filetypes
197-
198-
Table Editor
199-
------------
200-
201181
- use PSI Tree as data source
202182
- integrate with native IntelliJ IDE document change handler (e.g. for undo/redo)
203183
- simplify UI/UX & remove header toolbar
@@ -210,22 +190,6 @@ Table Editor
210190

211191
### Changed
212192

213-
- support comments in fast lexer
214-
215-
### Changed
216-
217-
- reworked (rainbow) coloring
218-
219-
### Changed
220-
221-
- avoid formatting while typing
222-
223-
### Changed
224-
225-
- limit column highlighting to 1000 entries around caret
226-
227-
### Changed
228-
229193
- limit calculation and buffering of CSV column info data
230194

231195
### Fixed
@@ -237,7 +201,6 @@ Table Editor
237201
### Fixed
238202

239203
- Cannot load from object array because "data" is null #335 #337
240-
241204
- Empty comment indicator
242205

243206
### Added
@@ -293,6 +256,7 @@ NOTE: Minimum version requirement changed to v2020.1 and newer
293256
### Added
294257

295258
- Plugin name ### Changed
259+
296260
- CSV
297261

298262
### Fixed
@@ -387,11 +351,6 @@ NOTE: Minimum version requirement changed to v2020.1 and newer
387351

388352
### Added
389353

390-
- Predefined column colors (Rainbow-style)
391-
- Enhanced color scheme switch
392-
393-
### Added
394-
395354
- Table Editor coloring
396355

397356
## 2.13.0 - Jul 20, 2020
@@ -457,11 +416,6 @@ NOTE: Minimum version requirement changed to v2020.1 and newer
457416

458417
### Added
459418

460-
- customizable escape character #159
461-
- value separator setting moved from 'Code Style' to 'General'
462-
463-
### Added
464-
465419
- lots of cleanup & rework
466420

467421
## 2.8.2 - Jan 22, 2020
@@ -553,11 +507,6 @@ Support for IDE v192.*
553507

554508
### Added
555509

556-
- option to keep/ignore a linebreak at the end of a file (table editor)
557-
- improved change detection of table editor to avoid overwriting original text representation without editing any values
558-
559-
### Added
560-
561510
- file based value separator (e.g. ',' or ';')
562511

563512
## 2.3.1 - Mar 31, 2019
@@ -604,11 +553,6 @@ Support for IDE v192.*
604553

605554
### Added
606555

607-
- support column highlighting for table editor
608-
- support all kind of text attributes for column highlighting
609-
610-
### Added
611-
612556
- table editor values not longer enforced to be quoted on save (customizable)
613557

614558
### Fixed
@@ -645,11 +589,6 @@ Support for IDE v192.*
645589

646590
### Added
647591

648-
- CSV/TSV editor settings (File > Settings > General > CSV/TSV Editor)
649-
- TAB (separator) highlighting
650-
651-
### Added
652-
653592
- Enable/disable balloon info
654593
- Soft wrap settings specific for CSV/TSV
655594

@@ -706,16 +645,6 @@ Support for IDE v192.*
706645

707646
### Added
708647

709-
- TSV file support
710-
TSV files a recognized as such but treated as a variant of CSV files, the same syntax highlighting and code style settings are applied.
711-
712-
### Added
713-
714-
- tab (↹) and pipe (|) as separators added
715-
- spellchecker enabled
716-
717-
### Added
718-
719648
- it was necessary to increase the minimum IDE version from 2016.1.1 to 2016.3.2 due to a required fix in the formatting code. Previous versions of the plugin can still be downloaded directly from Jetbrains Plugin Repository.
720649

721650
## 1.5.1 - Mar 21, 2018

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
pluginName=CSV Editor
66
pluginId=net.seesharpsoft.intellij.plugins.csv
7-
pluginVersion=4.1.0
7+
pluginVersion=4.2.0
88

99
pluginSinceBuild=242
1010

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

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class CsvGithubIssueSubmitter extends ErrorReportSubmitter {
3939
public static final String GIT_USER = "SeeSharpSoft";
4040
public static final String GIT_REPO = "intellij-csv-validator";
4141
public static final GHRepositoryPath GITHUB_FULL_PATH = new GHRepositoryPath(GIT_USER, GIT_REPO);
42+
private static final String REPORT_ACTION_TEXT = "Report to 'CSV Editor' (Github)";
4243

4344
private static ScheduledFuture<?> recentlySentReport = null;
4445
private static final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
@@ -52,7 +53,7 @@ private static class CsvGithubSubmitException extends RuntimeException {
5253
@NotNull
5354
@Override
5455
public String getReportActionText() {
55-
return "Report to 'CSV Editor' (Github)";
56+
return REPORT_ACTION_TEXT;
5657
}
5758

5859
@Override
@@ -94,7 +95,7 @@ protected boolean submit(IdeaLoggingEvent event, String additionalInfo, Project
9495

9596
GithubApiRequestExecutor githubExecutor = GithubApiRequestExecutor.Factory.getInstance().create(account.getServer(), token);
9697

97-
Task submitTask = new Task.Backgroundable(project, getReportActionText()) {
98+
Task submitTask = new Task.Backgroundable(project, REPORT_ACTION_TEXT) {
9899
@Override
99100
public void run(@NotNull ProgressIndicator indicator) {
100101
submitToGithub(event, additionalInfo, githubExecutor, consumer, indicator);
@@ -160,14 +161,27 @@ protected GithubApiRequest<?> createNewIssue(String title, String content) throw
160161
}
161162

162163
protected String searchExistingIssues(GithubApiRequestExecutor githubExecutor, String title, ProgressIndicator progressIndicator) throws IOException {
164+
// Create a search needle from the title but ensure it is never null/empty to avoid GitHub 422 (Validation Failed)
163165
String needle = title.replaceAll("\\s*(\\[.*?]|\\(.*?\\)|\\{.*?})\\s*", "");
166+
167+
// If the sanitized title becomes empty (e.g., only brackets present), fall back to the raw title
168+
if (Strings.isEmptyOrSpaces(needle)) {
169+
needle = title == null ? "" : title.trim();
170+
}
171+
172+
// Apply length cap with word boundary if possible
164173
if (needle.length() > 250) {
165174
int endIndex = needle.substring(0, 250).lastIndexOf(" ");
166175
if (endIndex == -1) {
167176
endIndex = 250;
168177
}
169178
needle = needle.substring(0, endIndex);
170179
}
180+
181+
// Final safety: if still empty, use a minimal non-empty token to satisfy GitHub API requirements
182+
if (Strings.isEmptyOrSpaces(needle)) {
183+
needle = "crash";
184+
}
171185
GithubApiRequest<GithubResponsePage<GithubSearchedIssue>> existingIssueRequest =
172186
GithubApiRequests.Search.Issues.get(
173187
GithubServerPath.DEFAULT_SERVER,

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,13 @@ public PsiParser createParser(final Project project) {
5555
}
5656

5757
@Override
58-
public IFileElementType getFileNodeType() {
58+
public @NotNull IFileElementType getFileNodeType() {
5959
return FILE;
6060
}
6161

6262
@Override
63-
public PsiFile createFile(FileViewProvider viewProvider) {
63+
public @NotNull PsiFile createFile(@NotNull FileViewProvider viewProvider) {
6464
return new CsvFile(viewProvider, viewProvider.getFileType());
65-
// return new CsvFile(viewProvider, CsvFileType.INSTANCE);
6665
}
6766

6867
@Override

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

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

33
import com.intellij.ide.BrowserUtil;
4-
import com.intellij.ide.actions.ShowSettingsUtilImpl;
54
import com.intellij.notification.*;
5+
import com.intellij.openapi.application.ApplicationManager;
6+
import com.intellij.openapi.options.ShowSettingsUtil;
67
import com.intellij.openapi.progress.ProgressIndicator;
78
import com.intellij.openapi.progress.ProgressManager;
89
import com.intellij.openapi.progress.Task;
@@ -22,11 +23,14 @@ public class CsvPlugin implements ProjectActivity, DumbAware {
2223
private static void openLink(Project project, String link) {
2324
if (project.isDisposed()) return;
2425

25-
if (link.startsWith("#")) {
26-
ShowSettingsUtilImpl.showSettingsDialog(project, link.substring(1), null);
27-
} else {
28-
BrowserUtil.browse(link, project);
29-
}
26+
ApplicationManager.getApplication().invokeLater(() ->
27+
{
28+
if (link.startsWith("#")) {
29+
ShowSettingsUtil.getInstance().showSettingsDialog(project, link.substring(1));
30+
} else {
31+
BrowserUtil.browse(link, project);
32+
}
33+
});
3034
}
3135

3236
public static void doAsyncProjectMaintenance(@NotNull Project project) {
@@ -42,7 +46,7 @@ public void run(@NotNull ProgressIndicator progressIndicator) {
4246
// start process
4347
try {
4448
CsvFileAttributes csvFileAttributes = CsvFileAttributes.getInstance(getProject());
45-
csvFileAttributes.cleanupAttributeMap(getProject());
49+
csvFileAttributes.cleanupAttributeMap(project);
4650
} catch (Exception exception) {
4751
// repeated unresolved bug-reports when retrieving the component
4852
// while this cleanup is an optional and non-critical task
@@ -75,10 +79,10 @@ public void run(@NotNull ProgressIndicator progressIndicator) {
7579
NotificationType.INFORMATION
7680
);
7781

78-
notification.addAction(NotificationAction.create("General Settings", (anActionEvent, notification1) -> {
82+
notification.addAction(NotificationAction.create("General settings", (anActionEvent, notification1) -> {
7983
openLink(project, "#" + CsvEditorSettingsProvider.CSV_EDITOR_SETTINGS_ID);
8084
}));
81-
notification.addAction(NotificationAction.create("Color Scheme", (anActionEvent, notification1) -> {
85+
notification.addAction(NotificationAction.create("Color scheme", (anActionEvent, notification1) -> {
8286
openLink(project, "#reference.settingsdialog.IDE.editor.colors.CSV/TSV/PSV");
8387
}));
8488
notification.addAction(NotificationAction.create("Formatting", (anActionEvent, notification1) -> {

0 commit comments

Comments
 (0)