Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 23 additions & 94 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,24 @@

### Fixed

## [4.1.0] - Sep 07, 2025
## 4.2.0 - Jan 26, 2026

### Fixed

- Compatibility verification issues
- Invalid PSI Element - class CsvFile because different providers
- PluginException - Element class CsvFile - file is invalid #923
- NullPointerException #933
- PluginException - Cannot check provider net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditorProvider #919
- ExceptionInInitializerError #916
- GithubStatusCodeException - 422 Unprocessable Entity - Validation Failed [Search; q]invalid: null #920
- com.intellij.diagnostic.Freeze #921
- Correct short name format
- Slow operations are prohibited on EDT #936
- This method is forbidden on EDT because it does not pump the event queue #940
- Argument for @NotNull parameter 'document' of PsiDocumentManagerImpl.getPsiFile must not be null #941

## 4.1.0 - Sep 07, 2025

### Fixed

Expand All @@ -22,7 +39,7 @@

- Project structure refactoring to avoid circular dependencies

## [4.0.2] - Dec 29, 2024
## 4.0.2 - Dec 29, 2024

### Added

Expand Down Expand Up @@ -54,9 +71,11 @@
## 4.0.0 - Oct 07, 2024

### Added

- Tabularize formatting is back!

### Changed

- Text editor is shown first by default

## 3.4.0 - Aug 10, 2024
Expand All @@ -70,13 +89,6 @@

### Fixed

- Update gradle build
- PluginException: xxx ms to call on EDT CsvChangeSeparatorActionGroup#update@EditorPopup #401
- AlreadyDisposedException: Already disposed #639
- Exceptions occurred on invoking the intention 'Unquote' on a copy of the file #670 #816

### Fixed

- StringIndexOutOfBoundsException: begin 0, end -1, length 5993 #801
- Unhandled exception in [CoroutineName(PsiAwareFileEditorManagerImpl)] #666

Expand All @@ -96,7 +108,6 @@

- NullPointerException: Cannot invoke "getSelectedColumn()" because "tblEditor" is null #519
- IllegalStateException: Attempt to modify PSI for non-committed Document! #516

- StringIndexOutOfBoundsException: begin 0, end -1, length 5995 #511
- ArrayIndexOutOfBoundsException: 12 >= 12 #482

Expand All @@ -116,7 +127,6 @@

- Argument for @NotNull parameter 'tableEditor' of CsvTableActions.adjustColumnWidths must not be null #431
- NullPointerException #429

- Comment handling breaking in table editor #451

### Added
Expand All @@ -136,30 +146,14 @@

- Argument for @NotNull parameter 'anchor' of CsvPsiTreeUpdater.appendField must not be null #392
- ArrayIndexOutOfBoundsException: 8 >= 8 #396

- catch unreasonable exception when retrieving service #410
- NullPointerException: Cannot invoke "CsvTableEditor.getActions()" because the return value of "CsvTableEditorActions.getTableEditor(AnActionEvent)" is null #394

### Added

- 358 ms to call on EDT CsvChangeSeparatorActionGroup#update@EditorPopup #401
## 3.0.2 - Dec 15, 2022

### Fixed

- Detected bulk mode status update from DocumentBulkUpdateListener #384
- Argument for @NotNull parameter 'parent' of PsiHelper.getNthChildOfType must not be null #372

- Argument for @NotNull parameter 'element' of PsiHelper.getSiblingOfType must not be null #375
- Cannot invoke "Document.getText()" because "document" is null #388

### Fixed

- Cannot invoke "PsiFile.getProject()" because the return value of "CsvPsiTreeUpdater.getPsiFile()" is null #378
- Argument for @NotNull parameter 'replacement' of CsvPsiTreeUpdater$ReplacePsiAction.<init> must not be null #380

- provide project parameter for opening link
- Cannot invoke "Document.insertString(int, java.lang.CharSequence)" because "document" is null #386
## 3.0.2 - Dec 15, 2022

### Fixed

Expand All @@ -169,23 +163,13 @@

### Fixed

- cannot init component state (componentName=CsvFileAttributes) #359
- cannot invoke "add(Object)" because "this.myUncommittedActions" is null #361
- cannot invoke "createNotification(...)" because "notificationGroup" is null #362
- cannot invoke "getManager()" because the return value of "getPsiFile()" is null #363

### Fixed

- image in plugin description
- plugin update restart

## 3.0.0 - Nov 09, 2022

MAJOR UPDATE VERSION 3

General
-------

- renamed plugin to 'CSV Editor'
- fixed all compatibility issues with respect to IntelliJ platform 2022.*
- rework language lexer
Expand All @@ -194,10 +178,6 @@ General
- adjusted setting dialogs
- integrated GitHub issue reporter in case plugin raises an exception
- removed TSV & PSV language, only CSV language but different filetypes

Table Editor
------------

- use PSI Tree as data source
- integrate with native IntelliJ IDE document change handler (e.g. for undo/redo)
- simplify UI/UX & remove header toolbar
Expand All @@ -210,22 +190,6 @@ Table Editor

### Changed

- support comments in fast lexer

### Changed

- reworked (rainbow) coloring

### Changed

- avoid formatting while typing

### Changed

- limit column highlighting to 1000 entries around caret

### Changed

- limit calculation and buffering of CSV column info data

### Fixed
Expand All @@ -237,7 +201,6 @@ Table Editor
### Fixed

- Cannot load from object array because "data" is null #335 #337

- Empty comment indicator

### Added
Expand Down Expand Up @@ -293,6 +256,7 @@ NOTE: Minimum version requirement changed to v2020.1 and newer
### Added

- Plugin name ### Changed

- CSV

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

### Added

- Predefined column colors (Rainbow-style)
- Enhanced color scheme switch

### Added

- Table Editor coloring

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

### Added

- customizable escape character #159
- value separator setting moved from 'Code Style' to 'General'

### Added

- lots of cleanup & rework

## 2.8.2 - Jan 22, 2020
Expand Down Expand Up @@ -553,11 +507,6 @@ Support for IDE v192.*

### Added

- option to keep/ignore a linebreak at the end of a file (table editor)
- improved change detection of table editor to avoid overwriting original text representation without editing any values

### Added

- file based value separator (e.g. ',' or ';')

## 2.3.1 - Mar 31, 2019
Expand Down Expand Up @@ -604,11 +553,6 @@ Support for IDE v192.*

### Added

- support column highlighting for table editor
- support all kind of text attributes for column highlighting

### Added

- table editor values not longer enforced to be quoted on save (customizable)

### Fixed
Expand Down Expand Up @@ -645,11 +589,6 @@ Support for IDE v192.*

### Added

- CSV/TSV editor settings (File > Settings > General > CSV/TSV Editor)
- TAB (separator) highlighting

### Added

- Enable/disable balloon info
- Soft wrap settings specific for CSV/TSV

Expand Down Expand Up @@ -706,16 +645,6 @@ Support for IDE v192.*

### Added

- TSV file support
TSV files a recognized as such but treated as a variant of CSV files, the same syntax highlighting and code style settings are applied.

### Added

- tab (↹) and pipe (|) as separators added
- spellchecker enabled

### Added

- 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.

## 1.5.1 - Mar 21, 2018
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

pluginName=CSV Editor
pluginId=net.seesharpsoft.intellij.plugins.csv
pluginVersion=4.1.0
pluginVersion=4.2.0

pluginSinceBuild=242

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class CsvGithubIssueSubmitter extends ErrorReportSubmitter {
public static final String GIT_USER = "SeeSharpSoft";
public static final String GIT_REPO = "intellij-csv-validator";
public static final GHRepositoryPath GITHUB_FULL_PATH = new GHRepositoryPath(GIT_USER, GIT_REPO);
private static final String REPORT_ACTION_TEXT = "Report to 'CSV Editor' (Github)";

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

@Override
Expand Down Expand Up @@ -94,7 +95,7 @@ protected boolean submit(IdeaLoggingEvent event, String additionalInfo, Project

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

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

protected String searchExistingIssues(GithubApiRequestExecutor githubExecutor, String title, ProgressIndicator progressIndicator) throws IOException {
// Create a search needle from the title but ensure it is never null/empty to avoid GitHub 422 (Validation Failed)
String needle = title.replaceAll("\\s*(\\[.*?]|\\(.*?\\)|\\{.*?})\\s*", "");

// If the sanitized title becomes empty (e.g., only brackets present), fall back to the raw title
if (Strings.isEmptyOrSpaces(needle)) {
needle = title == null ? "" : title.trim();
}

// Apply length cap with word boundary if possible
if (needle.length() > 250) {
int endIndex = needle.substring(0, 250).lastIndexOf(" ");
if (endIndex == -1) {
endIndex = 250;
}
needle = needle.substring(0, endIndex);
}

// Final safety: if still empty, use a minimal non-empty token to satisfy GitHub API requirements
if (Strings.isEmptyOrSpaces(needle)) {
needle = "crash";
}
GithubApiRequest<GithubResponsePage<GithubSearchedIssue>> existingIssueRequest =
GithubApiRequests.Search.Issues.get(
GithubServerPath.DEFAULT_SERVER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@ public PsiParser createParser(final Project project) {
}

@Override
public IFileElementType getFileNodeType() {
public @NotNull IFileElementType getFileNodeType() {
return FILE;
}

@Override
public PsiFile createFile(FileViewProvider viewProvider) {
public @NotNull PsiFile createFile(@NotNull FileViewProvider viewProvider) {
return new CsvFile(viewProvider, viewProvider.getFileType());
// return new CsvFile(viewProvider, CsvFileType.INSTANCE);
}

@Override
Expand Down
22 changes: 13 additions & 9 deletions src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvPlugin.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package net.seesharpsoft.intellij.plugins.csv;

import com.intellij.ide.BrowserUtil;
import com.intellij.ide.actions.ShowSettingsUtilImpl;
import com.intellij.notification.*;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.options.ShowSettingsUtil;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.progress.Task;
Expand All @@ -22,11 +23,14 @@ public class CsvPlugin implements ProjectActivity, DumbAware {
private static void openLink(Project project, String link) {
if (project.isDisposed()) return;

if (link.startsWith("#")) {
ShowSettingsUtilImpl.showSettingsDialog(project, link.substring(1), null);
} else {
BrowserUtil.browse(link, project);
}
ApplicationManager.getApplication().invokeLater(() ->
{
if (link.startsWith("#")) {
ShowSettingsUtil.getInstance().showSettingsDialog(project, link.substring(1));
} else {
BrowserUtil.browse(link, project);
}
});
}

public static void doAsyncProjectMaintenance(@NotNull Project project) {
Expand All @@ -42,7 +46,7 @@ public void run(@NotNull ProgressIndicator progressIndicator) {
// start process
try {
CsvFileAttributes csvFileAttributes = CsvFileAttributes.getInstance(getProject());
csvFileAttributes.cleanupAttributeMap(getProject());
csvFileAttributes.cleanupAttributeMap(project);
} catch (Exception exception) {
// repeated unresolved bug-reports when retrieving the component
// while this cleanup is an optional and non-critical task
Expand Down Expand Up @@ -75,10 +79,10 @@ public void run(@NotNull ProgressIndicator progressIndicator) {
NotificationType.INFORMATION
);

notification.addAction(NotificationAction.create("General Settings", (anActionEvent, notification1) -> {
notification.addAction(NotificationAction.create("General settings", (anActionEvent, notification1) -> {
openLink(project, "#" + CsvEditorSettingsProvider.CSV_EDITOR_SETTINGS_ID);
}));
notification.addAction(NotificationAction.create("Color Scheme", (anActionEvent, notification1) -> {
notification.addAction(NotificationAction.create("Color scheme", (anActionEvent, notification1) -> {
openLink(project, "#reference.settingsdialog.IDE.editor.colors.CSV/TSV/PSV");
}));
notification.addAction(NotificationAction.create("Formatting", (anActionEvent, notification1) -> {
Expand Down
Loading
Loading