Skip to content

Commit 5b1118c

Browse files
committed
[NEW] Support "Comment with line comment" #247
1 parent 26d2e91 commit 5b1118c

File tree

4 files changed

+48
-3
lines changed

4 files changed

+48
-3
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2.14.3
2+
Oct ??, 2020
3+
4+
NEW: Support "Comment with line comment" #247
5+
16
2.14.2
27
Sep 17, 2020
38

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.14.2'
27+
version '2.14.3'
2828

2929
apply plugin: 'java'
3030
sourceCompatibility = javaVersion
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package net.seesharpsoft.intellij.plugins.csv;
2+
3+
import com.intellij.lang.Commenter;
4+
import net.seesharpsoft.intellij.plugins.csv.settings.CsvEditorSettings;
5+
import org.jetbrains.annotations.Nullable;
6+
7+
public class CsvCommenter implements Commenter {
8+
9+
@Nullable
10+
@Override
11+
public String getLineCommentPrefix() {
12+
String commentIndicator = CsvEditorSettings.getInstance().getCommentIndicator();
13+
return commentIndicator == null || commentIndicator.isEmpty() ? null : commentIndicator + " ";
14+
}
15+
16+
@Nullable
17+
@Override
18+
public String getBlockCommentPrefix() {
19+
return null;
20+
}
21+
22+
@Nullable
23+
@Override
24+
public String getBlockCommentSuffix() {
25+
return null;
26+
}
27+
28+
@Nullable
29+
@Override
30+
public String getCommentedBlockCommentPrefix() {
31+
return null;
32+
}
33+
34+
@Nullable
35+
@Override
36+
public String getCommentedBlockCommentSuffix() {
37+
return null;
38+
}
39+
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@
4949

5050
<change-notes><![CDATA[
5151
<pre style="font-family: sans-serif">
52-
FIX: Settings reset every update #245
53-
FIX: Removing comment indicator causes parsing errors
52+
NEW: Support "Comment with line comment" #247
5453
</pre>
5554
]]>
5655
</change-notes>
@@ -168,6 +167,8 @@ FIX: Removing comment indicator causes parsing errors
168167
<todoIndexer implementationClass="net.seesharpsoft.intellij.plugins.csv.CsvTodoIndexer" filetype="PSV" />
169168

170169
<postStartupActivity implementation="net.seesharpsoft.intellij.plugins.csv.CsvPlugin" />
170+
171+
<lang.commenter implementationClass="net.seesharpsoft.intellij.plugins.csv.CsvCommenter" language="csv" />
171172
</extensions>
172173

173174
<actions>

0 commit comments

Comments
 (0)