Skip to content

Commit ae8410c

Browse files
authored
Merge pull request #183 from SeeSharpSoft/master
Release 2.9.1
2 parents 6019aae + b5f8712 commit ae8410c

File tree

7 files changed

+29
-10
lines changed

7 files changed

+29
-10
lines changed

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2.9.1
2+
Feb 15, 2020
3+
4+
FIX: update failed for AnAction #181
5+
FIX: selection indicator for default separator action
6+
17
2.9.0
28
Feb 07, 2020
39

README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,22 @@ The preferred editor usage can be switched between "Text Editor first", "Table E
122122

123123
Enable zero-based column numbering. This affects the tooltip info of the text editor as well as column numbering of the table editor.
124124

125+
##### Default Value Separator (CSV only)
126+
127+
The following separators are currently supported: **,** (Comma), **;** (Semicolon), **|** (Pipe) and **↹** (Tab)
128+
129+
_Default Value Separator_ defines which separator is used as standard for each newly opened CSV file. The separator character can be changed for each file individually in its editors context menu.
130+
131+
This option has no effect on TSV/PSV files, the separator is pre-defined by their file- and language-type.
132+
133+
##### Default Escape Character
134+
135+
The following escape characters are currently supported: **"** (Double Quote), **\\** (Backslash)
136+
137+
Within quoted values (fields starting and ending with a double quote), the double quote character must be escaped to be parsed as part of its value and not to be treated as the closing quote.
138+
139+
_Default Escape Character_ defines which escape character is used as standard for each newly opened CSV/TSV/PSV file. The escape character can be changed for each file individually in its editors context menu.
140+
125141
#### Text Editor
126142

127143
##### Highlighting
@@ -223,11 +239,7 @@ Annasusanna,Amsterdam,1
223239

224240
##### Separator
225241

226-
The following separators are currently supported: **,** (Comma), **;** (Semicolon), **|** (Pipe) and **↹** (Tab)
227-
228-
_Value separator (default)_ defines which separator is used by default. The separator character can be changed for each CSV file individually.
229-
230-
When changing the separator, press the apply button to refresh the preview window properly.
242+
Adjust spacing around the separator.
231243

232244
_Space before separator_
233245

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jacocoTestReport {
2424
}
2525

2626
group 'net.seesharpsoft.intellij.plugins'
27-
version '2.9.0'
27+
version '2.9.1'
2828

2929
apply plugin: 'java'
3030
sourceCompatibility = javaVersion

docs/editorsettings.png

0 Bytes
Loading

src/main/java/net/seesharpsoft/intellij/plugins/csv/actions/CsvDefaultSeparatorAction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public boolean isSelected(@NotNull AnActionEvent anActionEvent) {
2222
if (psiFile == null) {
2323
return false;
2424
}
25-
return CsvHelper.getValueSeparator(psiFile) == null;
25+
return !CsvHelper.hasValueSeparatorAttribute(psiFile);
2626
}
2727

2828
@Override
@@ -31,7 +31,6 @@ public void setSelected(@NotNull AnActionEvent anActionEvent, boolean selected)
3131
if (psiFile == null) {
3232
return;
3333
}
34-
3534
CsvFileAttributes.getInstance(psiFile.getProject()).resetValueSeparator(psiFile);
3635
FileContentUtilCore.reparseFiles(psiFile.getVirtualFile());
3736

src/main/java/net/seesharpsoft/intellij/plugins/csv/components/CsvFileAttributes.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,9 @@ public void resetValueSeparator(@NotNull PsiFile psiFile) {
120120

121121
public @NotNull
122122
CsvValueSeparator getValueSeparator(Project project, VirtualFile virtualFile) {
123-
if (project == null || virtualFile == null) {
123+
if (project == null || virtualFile == null || !(virtualFile.getFileType() instanceof LanguageFileType)) {
124124
return CsvEditorSettings.getInstance().getDefaultValueSeparator();
125125
}
126-
assert(virtualFile.getFileType() instanceof LanguageFileType);
127126
Language language = ((LanguageFileType) virtualFile.getFileType()).getLanguage();
128127
if (language instanceof CsvSeparatorHolder) {
129128
return ((CsvSeparatorHolder) language).getSeparator();

src/main/resources/META-INF/plugin.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
NEW: customizable escape character #159
5252
NEW: value separator setting moved from 'Code Style' to 'General'
5353
+ lots of code cleanup & rework
54+
55+
FIX: update failed for AnAction #181
56+
FIX: selection indicator for default separator action
5457
</pre>
5558
]]>
5659
</change-notes>

0 commit comments

Comments
 (0)