diff --git a/.github/workflows/PublishStable.yml b/.github/workflows/PublishStable.yml
index b6742df4..f09dedd7 100644
--- a/.github/workflows/PublishStable.yml
+++ b/.github/workflows/PublishStable.yml
@@ -18,8 +18,10 @@ jobs:
include:
- ideaVersion: 2022.2.1
gkVersion: 2021.1.2
- - ideaVersion: LATEST-EAP-SNAPSHOT
+ - ideaVersion: 2022.3.1
gkVersion: 2021.1.2
+# - ideaVersion: LATEST-EAP-SNAPSHOT
+# gkVersion: 2021.1.2
steps:
- uses: actions/checkout@v2
diff --git a/CHANGELOG b/CHANGELOG
index fb7950ca..53be3088 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,16 @@
+3.0.2
+Dec 15, 2022
+
+FIX: Detected bulk mode status update from DocumentBulkUpdateListener #384
+FIX: Argument for @NotNull parameter 'parent' of PsiHelper.getNthChildOfType must not be null #372
+FIX: Argument for @NotNull parameter 'element' of PsiHelper.getSiblingOfType must not be null #375
+FIX: Cannot invoke "Document.getText()" because "document" is null #388
+FIX: Cannot invoke "PsiFile.getProject()" because the return value of "CsvPsiTreeUpdater.getPsiFile()" is null #378
+FIX: Argument for @NotNull parameter 'replacement' of CsvPsiTreeUpdater$ReplacePsiAction. must not be null #380
+FIX: provide project parameter for opening link
+FIX: Cannot invoke "Document.insertString(int, java.lang.CharSequence)" because "document" is null #386
+FIX: first extension sanity check
+
3.0.1
Nov 12, 2022
diff --git a/build.gradle b/build.gradle
index a15e4105..d53baf1c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,6 @@
plugins {
// https://github.com/JetBrains/gradle-intellij-plugin
- id 'org.jetbrains.intellij' version '1.9.0'
+ id 'org.jetbrains.intellij' version '1.10.1'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.8.4'
id 'com.github.ManifestClasspath' version '0.1.0-RELEASE'
@@ -57,8 +57,8 @@ sourceSets {
apply plugin: 'idea'
idea {
project {
- jdkName = JavaVersion.VERSION_11
- languageLevel = JavaVersion.VERSION_11
+ jdkName = JavaVersion.VERSION_17
+ languageLevel = JavaVersion.VERSION_17
vcs = 'Git'
}
module {
@@ -73,7 +73,7 @@ var final EAP_BUILD = '223'
var idea_version = System.getenv().getOrDefault('IDEA_VERSION', '2022.2.1')
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.0.1-' + build_version
+version '3.0.2-' + build_version
apply plugin: 'org.jetbrains.intellij'
intellij {
@@ -107,15 +107,17 @@ Feedback is welcome!
PS: The previous versions are still available on the project page.
-Update 3.0.1
-
-FIX: cannot init component state (componentName=CsvFileAttributes) #359
-FIX: cannot invoke "add(Object)" because "this.myUncommittedActions" is null #361
-FIX: cannot invoke "createNotification(...)" because "notificationGroup" is null #362
-FIX: cannot invoke "getManager()" because the return value of "getPsiFile()" is null #363
-FIX: image in plugin description
-FIX: plugin update restart
+Update 3.0.2
+FIX: Detected bulk mode status update from DocumentBulkUpdateListener #384
+FIX: Argument for @NotNull parameter 'parent' of PsiHelper.getNthChildOfType must not be null #372
+FIX: Argument for @NotNull parameter 'element' of PsiHelper.getSiblingOfType must not be null #375
+FIX: Cannot invoke "Document.getText()" because "document" is null #388
+FIX: Cannot invoke "PsiFile.getProject()" because the return value of "CsvPsiTreeUpdater.getPsiFile()" is null #378
+FIX: Argument for @NotNull parameter 'replacement' of CsvPsiTreeUpdater\$ReplacePsiAction. must not be null #380
+FIX: provide project parameter for opening link
+FIX: Cannot invoke "Document.insertString(int, java.lang.CharSequence)" because "document" is null #386
+FIX: first extension sanity check
"""
}
@@ -164,10 +166,3 @@ tasks.named("generateLexer").configure {
compileJava {
dependsOn generateLexer
}
-
-// TODO https://youtrack.jetbrains.com/issue/IDEA-298989 - remove after gradle plugin v1.9.1 or v1.10.0 released
-setupDependencies {
- doLast {
- fileTree("$buildDir/instrumented/instrumentCode") { include("**/*TableEditorSwing.class") }.files.forEach { delete(it) }
- }
-}
\ No newline at end of file
diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvHelper.java b/src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvHelper.java
index b639286f..12129458 100644
--- a/src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvHelper.java
+++ b/src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvHelper.java
@@ -75,7 +75,7 @@ public static boolean isCsvFile(String extension) {
}
public static boolean isCsvFile(Project project, VirtualFile file) {
- if (project == null || file == null) {
+ if (project == null || file == null || !isCsvFile(file.getExtension())) {
return false;
}
final Language language = LanguageUtil.getLanguageForPsi(project, file);
@@ -312,10 +312,6 @@ public static String quoteCsvField(String content,
}
if (quotingEnforced || isQuotingRequired(content, valueSeparator)) {
String result = content;
-// if (escapeCharacter != CsvEscapeCharacter.QUOTE) {
-// result = result.replaceAll(escapeCharacter.getRegexPattern(),
-// escapeCharacter.getRegexPattern() + escapeCharacter.getRegexPattern());
-// }
result = result.replaceAll("\"", escapeCharacter.getRegexPattern() + "\"");
return "\"" + result + "\"";
}
diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvPlugin.java b/src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvPlugin.java
index 399829ea..c2f6d598 100644
--- a/src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvPlugin.java
+++ b/src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvPlugin.java
@@ -37,7 +37,7 @@ private static void openLink(Project project, String link) {
if (link.startsWith("#")) {
((ShowSettingsUtilImpl) ShowSettingsUtil.getInstance()).showSettingsDialog(project, link.substring(1), null);
} else {
- BrowserUtil.browse(link);
+ BrowserUtil.browse(link, project);
}
}
diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableModelBase.java b/src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableModelBase.java
index 5e512422..cf0c3a71 100644
--- a/src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableModelBase.java
+++ b/src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableModelBase.java
@@ -157,7 +157,9 @@ public void setValue(String value, int rowIndex, int columnIndex) {
}
private int getColumnCount(int rowIndex) {
- return getColumnCount(PsiHelper.getNthChildOfType(getPsiTreeUpdater().getPsiFile(), rowIndex, CsvRecord.class));
+ PsiFile psiFile = getPsiFile();
+ if (psiFile == null) return 0;
+ return getColumnCount(PsiHelper.getNthChildOfType(psiFile, rowIndex, CsvRecord.class));
}
private int getColumnCount(PsiElement record) {
diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/csv/inspection/CsvValidationInspection.java b/src/main/java/net/seesharpsoft/intellij/plugins/csv/inspection/CsvValidationInspection.java
index 2cbcc478..87a3fb1b 100644
--- a/src/main/java/net/seesharpsoft/intellij/plugins/csv/inspection/CsvValidationInspection.java
+++ b/src/main/java/net/seesharpsoft/intellij/plugins/csv/inspection/CsvValidationInspection.java
@@ -121,8 +121,9 @@ public String getFamilyName() {
public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
PsiElement element = descriptor.getPsiElement();
Document document = PsiDocumentManager.getInstance(project).getDocument(element.getContainingFile());
- List quotePositions = new ArrayList<>();
+ if (document == null) return;
+ List quotePositions = new ArrayList<>();
int quotePosition = CsvIntentionHelper.getOpeningQuotePosition(element);
if (quotePosition != -1) {
quotePositions.add(quotePosition);
@@ -147,6 +148,8 @@ public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descri
try {
PsiElement element = descriptor.getPsiElement();
Document document = PsiDocumentManager.getInstance(project).getDocument(element.getContainingFile());
+ if (document == null) return;
+
CsvValueSeparator separator = CsvHelper.getValueSeparator(element.getContainingFile());
String text = document.getText();
document.setText(text.substring(0, element.getTextOffset()) + separator.getCharacter() + text.substring(element.getTextOffset()));
@@ -166,6 +169,8 @@ public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descri
try {
PsiElement element = descriptor.getPsiElement();
Document document = PsiDocumentManager.getInstance(project).getDocument(element.getContainingFile());
+ if (document == null) return;
+
document.setText(document.getText() + "\"");
} catch (IncorrectOperationException e) {
LOG.error(e);
diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvIntentionHelper.java b/src/main/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvIntentionHelper.java
index b9950636..ac8097f7 100644
--- a/src/main/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvIntentionHelper.java
+++ b/src/main/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvIntentionHelper.java
@@ -47,8 +47,9 @@ public static Collection getAllElements(PsiFile file) {
public static void quoteAll(@NotNull Project project, @NotNull PsiFile psiFile) {
Document document = PsiDocumentManager.getInstance(project).getDocument(psiFile);
- List quotePositions = new ArrayList<>();
+ if (document == null) return;
+ List quotePositions = new ArrayList<>();
PsiTreeUtil.processElements(psiFile, CsvField.class, field -> {
if (PsiHelper.getElementType(field.getFirstChild()) != CsvTypes.QUOTE) {
quotePositions.add(field.getTextRange().getStartOffset());
@@ -63,6 +64,8 @@ public static void quoteAll(@NotNull Project project, @NotNull PsiFile psiFile)
public static void quoteValue(@NotNull Project project, @NotNull final PsiElement field) {
Document document = PsiDocumentManager.getInstance(project).getDocument(field.getContainingFile());
+ if (document == null) return;
+
List quotePositions = new ArrayList<>();
if (PsiHelper.getElementType(field.getFirstChild()) != CsvTypes.QUOTE) {
quotePositions.add(field.getTextRange().getStartOffset());
@@ -75,9 +78,9 @@ public static void quoteValue(@NotNull Project project, @NotNull final PsiElemen
public static void unquoteAll(@NotNull Project project, @NotNull PsiFile psiFile) {
Document document = PsiDocumentManager.getInstance(project).getDocument(psiFile);
+ if (document == null) return;
final List quotePositions = new ArrayList<>();
-
PsiTreeUtil.processElements(psiFile, CsvField.class, field -> {
if (getChildren(field).stream().noneMatch(element -> PsiHelper.getElementType(element) == CsvTypes.ESCAPED_TEXT)) {
Pair positions = getQuotePositions(field);
@@ -115,7 +118,7 @@ private static Pair getQuotePositions(PsiElement element
return null;
}
- public static void addQuotes(final Document document, List quotePositions) {
+ public static void addQuotes(@NotNull final Document document, List quotePositions) {
int offset = 0;
String quote = "\"";
quotePositions.sort(Integer::compareTo);
diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvShiftColumnIntentionAction.java b/src/main/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvShiftColumnIntentionAction.java
index 449e72a3..5cb3e095 100644
--- a/src/main/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvShiftColumnIntentionAction.java
+++ b/src/main/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvShiftColumnIntentionAction.java
@@ -24,6 +24,8 @@ protected static void changeLeftAndRightColumnOrder(@NotNull Project project,
CsvColumnInfo leftColumnInfo,
CsvColumnInfo rightColumnInfo) {
Document document = PsiDocumentManager.getInstance(project).getDocument(csvFile);
+ if (document == null) return;
+
document.setText(
changeLeftAndRightColumnOrder(document.getText(), CsvHelper.getValueSeparator(csvFile), leftColumnInfo, rightColumnInfo)
);
diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/csv/psi/CsvPsiTreeUpdater.java b/src/main/java/net/seesharpsoft/intellij/plugins/csv/psi/CsvPsiTreeUpdater.java
index fcce208c..90650318 100644
--- a/src/main/java/net/seesharpsoft/intellij/plugins/csv/psi/CsvPsiTreeUpdater.java
+++ b/src/main/java/net/seesharpsoft/intellij/plugins/csv/psi/CsvPsiTreeUpdater.java
@@ -24,30 +24,46 @@
public class CsvPsiTreeUpdater implements PsiFileHolder, Suspendable {
- private final PsiFileHolder myPsiFileHolder;
+ protected final EventListenerList myEventListenerList = new EventListenerList();
- private final PsiFileFactory myFileFactory;
+ private final PsiFileHolder myPsiFileHolder;
- private final CsvPsiParserFileType myFileType;
+ private PsiFileFactory myFileFactory;
- protected final EventListenerList myEventListenerList = new EventListenerList();
+ private CsvPsiParserFileType myFileType;
private List myUncommittedActions = new ArrayList<>();
public CsvPsiTreeUpdater(@NotNull PsiFileHolder psiFileHolder) {
myPsiFileHolder = psiFileHolder;
- myFileFactory = PsiFileFactory.getInstance(getPsiFile().getProject());
- myFileType = new CsvPsiParserFileType(CsvHelper.getValueSeparator(psiFileHolder.getPsiFile()), CsvHelper.getEscapeCharacter(psiFileHolder.getPsiFile()));
}
private FileType getFileType() {
- myFileType.setSeparator(CsvHelper.getValueSeparator(getPsiFile()));
- myFileType.setEscapeCharacter(CsvHelper.getEscapeCharacter(getPsiFile()));
+ PsiFile psiFile = getPsiFile();
+ if (psiFile == null) return null;
+
+ if (myFileType == null) {
+ myFileType = new CsvPsiParserFileType(CsvHelper.getValueSeparator(psiFile), CsvHelper.getEscapeCharacter(psiFile));
+ } else {
+ myFileType.setSeparator(CsvHelper.getValueSeparator(psiFile));
+ myFileType.setEscapeCharacter(CsvHelper.getEscapeCharacter(psiFile));
+ }
return myFileType;
}
+ private PsiFileFactory getFileFactory() {
+ PsiFile psiFile = getPsiFile();
+ if (psiFile == null) return null;
+
+ if (myFileFactory == null) {
+ myFileFactory = PsiFileFactory.getInstance(getPsiFile().getProject());
+ }
+ return myFileFactory;
+ }
+
private PsiFile createFile(@NotNull String text) {
- return myFileFactory.createFileFromText("a.csv", getFileType(), text);
+ PsiFileFactory fileFactory = getFileFactory();
+ return fileFactory == null ? null : getFileFactory().createFileFromText("a.csv", getFileType(), text);
}
private boolean isIndicatingComment(@NotNull String text) {
@@ -63,7 +79,7 @@ private boolean isIndicatingComment(@NotNull String text) {
return SyntaxTraverser.psiTraverser(createFile(sanitizedValue)).filter(CsvField.class).first();
}
- public @NotNull CsvRecord createRecord() {
+ public @Nullable CsvRecord createRecord() {
return SyntaxTraverser.psiTraverser(createFile("\n")).filter(CsvRecord.class).first();
}
@@ -73,6 +89,8 @@ private boolean isIndicatingComment(@NotNull String text) {
public Document getDocument() {
PsiFile psiFile = getPsiFile();
+ if (psiFile == null) return null;
+
return PsiDocumentManager.getInstance(psiFile.getProject()).getDocument(psiFile);
}
@@ -244,12 +262,16 @@ public void deleteRow(@NotNull PsiElement row) {
}
public void deleteRows(Collection indices) {
- Set toDelete = new HashSet<>();
PsiFile psiFile = getPsiFile();
+ if (psiFile == null) return;
+
+ Set toDelete = new HashSet<>();
List sortedIndices = new ArrayList<>(indices);
Collections.sort(sortedIndices);
for (int rowIndex : sortedIndices) {
CsvRecord row = PsiHelper.getNthChildOfType(psiFile, rowIndex, CsvRecord.class);
+ if (row == null) continue;
+
boolean removePreviousLF = rowIndex > 0;
PsiElement lf = PsiHelper.getSiblingOfType(row, CsvTypes.CRLF, removePreviousLF);
if (lf == null || toDelete.contains(lf)) {
@@ -318,34 +340,34 @@ private void doAddField(@NotNull PsiElement anchor, @Nullable String text, boole
public synchronized void commit() {
if (isSuspended() || myUncommittedActions == null || myUncommittedActions.size() == 0) return;
- suspend();
List actionsToCommit = new ArrayList<>(myUncommittedActions);
- if (!doCommit(() -> {
- try {
- actionsToCommit.forEach(PsiAction::execute);
- } finally {
- resume();
- fireCommitted();
- }
- })) {
- resume();
- } else {
- myUncommittedActions.clear();
- }
+ myUncommittedActions.clear();
+
+ doCommit(() -> actionsToCommit.forEach(PsiAction::execute));
}
private boolean doCommit(@NotNull Runnable runnable) {
- if (!getPsiFile().isWritable()) return false;
-
+ PsiFile psiFile = getPsiFile();
Document document = getDocument();
+ if (psiFile == null || !psiFile.isWritable() || document == null || !document.isWritable())
+ {
+ return false;
+ }
+
+ suspend();
ApplicationManager.getApplication().runWriteAction(() -> {
- CommandProcessor.getInstance().executeCommand(
- getPsiFile().getProject(),
- () -> DocumentUtil.executeInBulk(document, runnable),
- "CSV Editor changes",
- null,
- document);
+ try {
+ CommandProcessor.getInstance().executeCommand(
+ getPsiFile().getProject(),
+ () -> DocumentUtil.executeInBulk(document, runnable),
+ "CSV Editor changes",
+ null,
+ document);
+ } finally {
+ resume();
+ fireCommitted();
+ }
});
return true;
@@ -394,11 +416,11 @@ private static class AddSiblingPsiAction extends PsiAction {
private final PsiElement myElementToAdd;
private final boolean myBefore;
- AddSiblingPsiAction(@NotNull PsiElement anchor, @NotNull PsiElement elementToAdd) {
+ AddSiblingPsiAction(@NotNull PsiElement anchor, @Nullable PsiElement elementToAdd) {
this(anchor, elementToAdd, false);
}
- AddSiblingPsiAction(@NotNull PsiElement anchor, @NotNull PsiElement elementToAdd, boolean before) {
+ AddSiblingPsiAction(@NotNull PsiElement anchor, @Nullable PsiElement elementToAdd, boolean before) {
super(anchor);
myElementToAdd = elementToAdd;
myBefore = before;
@@ -406,6 +428,8 @@ private static class AddSiblingPsiAction extends PsiAction {
@Override
public void execute() {
+ if (myElementToAdd == null) return;
+
PsiElement anchor = getAnchor();
if (anchor.getParent() == null) return;
if (myBefore) {
@@ -420,13 +444,15 @@ private static class AddChildPsiAction extends PsiAction {
private final PsiElement myElementToAdd;
- AddChildPsiAction(@NotNull PsiElement parent, @NotNull PsiElement elementToAdd) {
+ AddChildPsiAction(@NotNull PsiElement parent, @Nullable PsiElement elementToAdd) {
super(parent);
myElementToAdd = elementToAdd;
}
@Override
public void execute() {
+ if (myElementToAdd == null) return;
+
PsiElement anchor = getAnchor();
anchor.add(myElementToAdd);
}
@@ -436,13 +462,15 @@ private static class ReplacePsiAction extends PsiAction {
private final PsiElement myReplacement;
- ReplacePsiAction(@NotNull PsiElement anchor, @NotNull PsiElement replacement) {
+ ReplacePsiAction(@NotNull PsiElement anchor, @Nullable PsiElement replacement) {
super(anchor);
myReplacement = replacement;
}
@Override
public void execute() {
+ if (myReplacement == null) return;
+
getAnchor().replace(myReplacement);
}
}
@@ -491,6 +519,8 @@ public void execute() {
PsiDocumentManager manager = PsiDocumentManager.getInstance(psiFile.getProject());
Document document = manager.getDocument(psiFile);
+ if (document == null) return;
+
manager.doPostponedOperationsAndUnblockDocument(document);
int offset = 0;
diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvEditorSettings.java b/src/main/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvEditorSettings.java
index f963b672..ada01f79 100644
--- a/src/main/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvEditorSettings.java
+++ b/src/main/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvEditorSettings.java
@@ -24,7 +24,7 @@
@SuppressWarnings("all")
public class CsvEditorSettings implements PersistentStateComponent {
- public static final int TABLE_EDITOR_ROW_HEIGHT_MIN = 10;
+ public static final int TABLE_EDITOR_ROW_HEIGHT_MIN = 20;
public static final int TABLE_EDITOR_ROW_HEIGHT_MAX = 100;
public static final int TABLE_EDITOR_ROW_HEIGHT_DEFAULT = 48;
public static final int TABLE_AUTO_MAX_COLUMN_WIDTH_DEFAULT = 300;
@@ -188,14 +188,13 @@ public void showTableEditorInfoPanel(boolean showInfoPanel) {
}
public int getTableEditorRowHeight() {
+ // ensure the current state of row height fits the boundaries (which is checked in the setTableEditorRowHeight method
+ setTableEditorRowHeight(getState().TABLE_EDITOR_ROW_HEIGHT);
return getState().TABLE_EDITOR_ROW_HEIGHT;
}
public void setTableEditorRowHeight(int rowHeight) {
- int finalRowHeight = rowHeight;
- if (finalRowHeight > TABLE_EDITOR_ROW_HEIGHT_MAX) finalRowHeight = TABLE_EDITOR_ROW_HEIGHT_MAX;
- if (finalRowHeight < TABLE_EDITOR_ROW_HEIGHT_MIN) finalRowHeight = TABLE_EDITOR_ROW_HEIGHT_MIN;
- getState().TABLE_EDITOR_ROW_HEIGHT = finalRowHeight;
+ getState().TABLE_EDITOR_ROW_HEIGHT = rowHeight > TABLE_EDITOR_ROW_HEIGHT_MAX || rowHeight < TABLE_EDITOR_ROW_HEIGHT_MIN ? TABLE_EDITOR_ROW_HEIGHT_DEFAULT : rowHeight;
}
public boolean isQuotingEnforced() {
diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvEditorSettingsProvider.form b/src/main/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvEditorSettingsProvider.form
index e3f189b3..af8726f3 100644
--- a/src/main/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvEditorSettingsProvider.form
+++ b/src/main/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvEditorSettingsProvider.form
@@ -131,7 +131,7 @@
-
+
@@ -162,7 +162,7 @@
-
+
@@ -193,7 +193,7 @@
-
+
diff --git a/src/main/java/net/seesharpsoft/intellij/psi/PsiHelper.java b/src/main/java/net/seesharpsoft/intellij/psi/PsiHelper.java
index ba528440..638e1bbb 100644
--- a/src/main/java/net/seesharpsoft/intellij/psi/PsiHelper.java
+++ b/src/main/java/net/seesharpsoft/intellij/psi/PsiHelper.java
@@ -103,7 +103,7 @@ public static PsiElement getLastSiblingOfType(@NotNull final PsiElement element,
return prevSibling == element ? null : prevSibling;
}
- public static PsiElement findFirst(@NotNull final PsiElement root, @NotNull IElementType type) {
+ public static PsiElement findFirst(@Nullable final PsiElement root, @NotNull IElementType type) {
return SyntaxTraverser.psiTraverser(root).filterTypes(elementType -> elementType == type).filter(PsiElement.class).first();
}
diff --git a/src/main/java/net/seesharpsoft/intellij/util/Suspendable.java b/src/main/java/net/seesharpsoft/intellij/util/Suspendable.java
index 3c0c9646..69598516 100644
--- a/src/main/java/net/seesharpsoft/intellij/util/Suspendable.java
+++ b/src/main/java/net/seesharpsoft/intellij/util/Suspendable.java
@@ -28,7 +28,7 @@ default void dispose() {
class SuspensionMonitor {
private final Map suspendableCounterMap = new ConcurrentHashMap<>();
- private Integer getSuspendableCounter(Suspendable suspendable) {
+ private synchronized Integer getSuspendableCounter(Suspendable suspendable) {
if (suspendableCounterMap.containsKey(suspendable)) return suspendableCounterMap.get(suspendable);
return null;
}
diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml
index 50983666..8789c454 100644
--- a/src/main/resources/META-INF/plugin.xml
+++ b/src/main/resources/META-INF/plugin.xml
@@ -6,7 +6,7 @@
Plugin for editing CSV files with a rainbow colored text- & table-editor. It supports are syntax validation, customization, intentions and many more.
+ Plugin for editing CSV files with a rainbow colored table- & text-editor. It provides syntax-validation, highlighting, customization, and plenty more besides.
Features: