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
1 change: 1 addition & 0 deletions .github/workflows/PublishStable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- ideaVersion: 2023.1.1
- ideaVersion: 2023.2.1
- ideaVersion: 2023.3.1
- ideaVersion: 2024.1.1
- ideaVersion: LATEST-EAP-SNAPSHOT

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/PullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
fail-fast: false
matrix:
include:
- ideaVersion: 2022.2.1
ideaType: PS
- ideaVersion: 2022.2.3
ideaType: PY
- ideaVersion: 2023.3.1
ideaType: PS
- ideaVersion: 2024.2.1
ideaType: IC

steps:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
3.4.0
Aug 10, 2024

CHORE: Update gradle build
FIX: ActionUpdateThread.OLD_EDT is deprecated and going to be removed soon
FIX: Cannot create class CsvEditorSettingsProvider

3.3.0
Feb 24, 2024

Expand Down
27 changes: 7 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ plugins {
id 'org.jetbrains.grammarkit' version '2022.3.2.2'
}

jacoco {
toolVersion = "0.8.8"
}

jacocoTestReport {
reports {
xml.enabled true
}
}

group 'net.seesharpsoft.intellij.plugins'

apply plugin: 'java'
Expand Down Expand Up @@ -67,19 +57,19 @@ idea {
}

var final EAP_VERSION = 'LATEST-EAP-SNAPSHOT'
var final EAP_BUILD = '241'
var final EAP_BUILD = '242'

var final DEFAULT_VERSION = '2022.2.1' //'LATEST-EAP-SNAPSHOT' //
var final LATEST_SUPPORTED_VERSION = '2024.1.5' //EAP_VERSION

// IDE version - https://www.jetbrains.com/intellij-repository/releases
var idea_version = System.getenv().getOrDefault('IDEA_VERSION', DEFAULT_VERSION)
var idea_version = System.getenv().getOrDefault('IDEA_VERSION', LATEST_SUPPORTED_VERSION)
var build_version = idea_version == EAP_VERSION ? EAP_BUILD : idea_version.substring(2, 4) + idea_version.charAt(5) // extract e.g. '221' from '2022.1.1'

version '3.3.0-' + build_version
version '3.4.0-' + build_version

apply plugin: 'org.jetbrains.intellij'
intellij {
version = idea_version
version = idea_version > LATEST_SUPPORTED_VERSION || idea_version == EAP_VERSION ? LATEST_SUPPORTED_VERSION : idea_version
type = System.getenv().getOrDefault('IDEA_TYPE', 'IC')
pluginName = 'CSVEditor'
updateSinceUntilBuild = true
Expand All @@ -97,11 +87,8 @@ patchPluginXml {

changeNotes = """<pre style="font-family: sans-serif">
CHORE: Update gradle build
FIX: PluginException: xxx ms to call on EDT CsvChangeSeparatorActionGroup#update@EditorPopup #401
FIX: AlreadyDisposedException: Already disposed #639
FIX: Exceptions occurred on invoking the intention 'Unquote' on a copy of the file #670 #816
FIX: StringIndexOutOfBoundsException: begin 0, end -1, length 5993 #801
FIX: Unhandled exception in [CoroutineName(PsiAwareFileEditorManagerImpl)] #666
FIX: ActionUpdateThread.OLD_EDT is deprecated and going to be removed soon
FIX: Cannot create class CsvEditorSettingsProvider
</pre>"""
}
publishPlugin {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ protected GithubApiRequest createNewIssue(String title, String content) throws I

protected String searchExistingIssues(GithubApiRequestExecutor githubExecutor, String title, ProgressIndicator progressIndicator) throws IOException {
String needle = title.replaceAll("\\s*(\\[.*?]|\\(.*?\\)|\\{.*?})\\s*", "");
if (needle.length() > 255) {
int endIndex = needle.substring(0, 255).lastIndexOf(" ");
if (needle.length() > 250) {
int endIndex = needle.substring(0, 250).lastIndexOf(" ");
if (endIndex == -1) {
endIndex = 255;
endIndex = 250;
}
needle = needle.substring(0, endIndex);
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package net.seesharpsoft.intellij.plugins.csv.actions;

import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.actionSystem.ToggleAction;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.fileEditor.FileEditor;
import com.intellij.psi.PsiFile;
import com.intellij.util.FileContentUtilCore;
Expand All @@ -12,7 +9,7 @@
import net.seesharpsoft.intellij.plugins.csv.components.CsvFileAttributes;
import org.jetbrains.annotations.NotNull;

public class CsvChangeEscapeCharacterAction extends ToggleAction implements ActionUpdateThreadBGT {
public class CsvChangeEscapeCharacterAction extends ToggleAction implements ActionUpdateThreadAware {
private final CsvEscapeCharacter myEscapeCharacter;

CsvChangeEscapeCharacterAction(CsvEscapeCharacter escapeCharacter) {
Expand Down Expand Up @@ -43,4 +40,9 @@ public void setSelected(@NotNull AnActionEvent anActionEvent, boolean selected)
fileEditor.selectNotify();
}
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package net.seesharpsoft.intellij.plugins.csv.actions;

import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.actionSystem.ToggleAction;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.fileEditor.FileEditor;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.psi.PsiFile;
Expand All @@ -14,7 +11,7 @@
import net.seesharpsoft.intellij.plugins.csv.components.CsvFileAttributes;
import org.jetbrains.annotations.NotNull;

public class CsvChangeSeparatorAction extends ToggleAction implements ActionUpdateThreadBGT {
public class CsvChangeSeparatorAction extends ToggleAction implements ActionUpdateThreadAware {
private final CsvValueSeparator mySeparator;

CsvChangeSeparatorAction(CsvValueSeparator separator) {
Expand Down Expand Up @@ -50,4 +47,9 @@ public void setSelected(@NotNull AnActionEvent anActionEvent, boolean selected)
fileEditor.selectNotify();
}
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import javax.swing.*;

public class CsvCustomSeparatorAction extends ToggleAction implements ActionUpdateThreadBGT {
public class CsvCustomSeparatorAction extends ToggleAction implements ActionUpdateThreadAware {
CsvCustomSeparatorAction() {
super("Custom");
}
Expand Down Expand Up @@ -54,4 +54,9 @@ public void setSelected(@NotNull AnActionEvent anActionEvent, boolean selected)
fileEditor.selectNotify();
}
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.seesharpsoft.intellij.plugins.csv.components.CsvFileAttributes;
import org.jetbrains.annotations.NotNull;

public class CsvDefaultEscapeCharacterAction extends ToggleAction implements ActionUpdateThreadBGT {
public class CsvDefaultEscapeCharacterAction extends ToggleAction implements ActionUpdateThreadAware {
CsvDefaultEscapeCharacterAction() {
super("Project Default");
}
Expand Down Expand Up @@ -36,4 +36,9 @@ public void setSelected(@NotNull AnActionEvent anActionEvent, boolean selected)
fileEditor.selectNotify();
}
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.seesharpsoft.intellij.plugins.csv.components.CsvFileAttributes;
import org.jetbrains.annotations.NotNull;

public class CsvDefaultSeparatorAction extends ToggleAction implements ActionUpdateThreadBGT {
public class CsvDefaultSeparatorAction extends ToggleAction implements ActionUpdateThreadAware {
CsvDefaultSeparatorAction() {
super("Project Default");
}
Expand Down Expand Up @@ -36,4 +36,9 @@ public void setSelected(@NotNull AnActionEvent anActionEvent, boolean selected)
fileEditor.selectNotify();
}
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package net.seesharpsoft.intellij.plugins.csv.actions;

import com.intellij.openapi.actionSystem.ActionUpdateThreadAware;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.fileEditor.FileEditor;
import net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableActions;
import net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditor;
import org.jetbrains.annotations.NotNull;

public abstract class CsvTableEditorActions extends AnAction implements ActionUpdateThreadBGT {
public abstract class CsvTableEditorActions extends AnAction implements ActionUpdateThreadAware {

public static class AddRowBefore extends CsvTableEditorActions {
@Override
Expand Down Expand Up @@ -79,4 +76,9 @@ public static CsvTableActions getTableActions(@NotNull AnActionEvent anActionEve
CsvTableEditor tableEditor = getTableEditor(anActionEvent);
return tableEditor == null ? CsvTableActions.DUMMY : tableEditor.getActions();
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,20 @@ public static final class OptionSet {
public ValueColoring VALUE_COLORING = ValueColoring.RAINBOW;
public boolean AUTO_DETECT_VALUE_SEPARATOR = true;

public OptionSet() {
private boolean isInitialized = false;

public OptionSet() {}

public void init() {
if (this.isInitialized) {
return;
}

EditorSettingsExternalizable editorSettingsExternalizable = EditorSettingsExternalizable.getInstance();
CARET_ROW_SHOWN = editorSettingsExternalizable == null ? true : editorSettingsExternalizable.isCaretRowShown();
USE_SOFT_WRAP = editorSettingsExternalizable == null ? false : editorSettingsExternalizable.isUseSoftWraps();

this.isInitialized = true;
}
}

Expand Down Expand Up @@ -116,6 +126,7 @@ public void removePropertyChangeListener(PropertyChangeListener listener) {

@Override
public OptionSet getState() {
this.myOptions.init();
return this.myOptions;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public void testApply() throws ConfigurationException {
editorSettingsPanel.apply();

CsvEditorSettings.OptionSet freshOptionSet = new CsvEditorSettings.OptionSet();
freshOptionSet.init();

assertEquals(false, editorSettingsPanel.isModified());
assertEquals(freshOptionSet.CARET_ROW_SHOWN, csvEditorSettings.isCaretRowShown());
Expand Down
Loading