Skip to content

Commit 1b9dd69

Browse files
authored
Merge pull request #296 from SeeSharpSoft/master
Release 2.17.0
2 parents d88e66d + cd4bc08 commit 1b9dd69

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2.17.0
2+
Jun 20, 2021
3+
4+
NEW: Plugin name change: CSV
5+
FIX: Null pointer when using csv rendering in Markdown documentation #292
6+
FIX: NullPointerException on startup #295
7+
18
2.16.4
29
May 27, 2021
310

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jacocoTestReport {
2828
}
2929

3030
group 'net.seesharpsoft.intellij.plugins'
31-
version '2.16.4'
31+
version '2.17.0'
3232

3333
apply plugin: 'java'
3434
project.sourceCompatibility = JavaVersion.VERSION_11

src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvStorageHelper.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package net.seesharpsoft.intellij.plugins.csv;
22

3+
import com.intellij.injected.editor.VirtualFileWindow;
34
import com.intellij.openapi.project.Project;
45
import com.intellij.openapi.util.Key;
56
import com.intellij.openapi.util.io.FileUtil;
@@ -17,11 +18,17 @@ public static String getRelativeFilePath(Project project, VirtualFile virtualFil
1718
if (project == null || virtualFile == null) {
1819
return null;
1920
}
21+
if (virtualFile instanceof VirtualFileWindow) {
22+
virtualFile = ((VirtualFileWindow) virtualFile).getDelegate();
23+
}
2024
String filePath = virtualFile.getUserData(RELATIVE_FILE_URL);
2125
if (filePath == null && project.getBasePath() != null) {
26+
String localFilePath = PathUtil.getLocalPath(virtualFile);
27+
if (localFilePath == null) {
28+
return null;
29+
}
2230
String projectDir = PathUtil.getLocalPath(project.getBasePath());
23-
filePath = PathUtil.getLocalPath(virtualFile)
24-
.replaceFirst("^" + Pattern.quote(projectDir), "");
31+
filePath = localFilePath.replaceFirst("^" + Pattern.quote(projectDir), "");
2532
virtualFile.putUserData(RELATIVE_FILE_URL, filePath);
2633
}
2734
return filePath;

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<idea-plugin>
22
<id>net.seesharpsoft.intellij.plugins.csv</id>
3-
<name>CSV Plugin</name>
3+
<name>CSV</name>
44
<vendor url="https://github.com/SeeSharpSoft/intellij-csv-validator">
55
Martin Sommer
66
</vendor>
@@ -50,8 +50,9 @@
5050

5151
<change-notes><![CDATA[
5252
<pre style="font-family: sans-serif">
53-
FIX: fully prevent calculateDistributedColumnWidth on erroneous CSV #283
54-
FIX: Memory leak of PsiFile #284
53+
NEW: Plugin name change: CSV
54+
FIX: Null pointer when using csv rendering in Markdown documentation #292
55+
FIX: NullPointerException on startup #295
5556
</pre>
5657
]]>
5758
</change-notes>

0 commit comments

Comments
 (0)