Skip to content

Commit

Permalink
Merge pull request #296 from SeeSharpSoft/master
Browse files Browse the repository at this point in the history
Release 2.17.0
  • Loading branch information
SeeSharpSoft authored Jun 21, 2021
2 parents d88e66d + cd4bc08 commit 1b9dd69
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2.17.0
Jun 20, 2021

NEW: Plugin name change: CSV
FIX: Null pointer when using csv rendering in Markdown documentation #292
FIX: NullPointerException on startup #295

2.16.4
May 27, 2021

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jacocoTestReport {
}

group 'net.seesharpsoft.intellij.plugins'
version '2.16.4'
version '2.17.0'

apply plugin: 'java'
project.sourceCompatibility = JavaVersion.VERSION_11
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.seesharpsoft.intellij.plugins.csv;

import com.intellij.injected.editor.VirtualFileWindow;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.io.FileUtil;
Expand All @@ -17,11 +18,17 @@ public static String getRelativeFilePath(Project project, VirtualFile virtualFil
if (project == null || virtualFile == null) {
return null;
}
if (virtualFile instanceof VirtualFileWindow) {
virtualFile = ((VirtualFileWindow) virtualFile).getDelegate();
}
String filePath = virtualFile.getUserData(RELATIVE_FILE_URL);
if (filePath == null && project.getBasePath() != null) {
String localFilePath = PathUtil.getLocalPath(virtualFile);
if (localFilePath == null) {
return null;
}
String projectDir = PathUtil.getLocalPath(project.getBasePath());
filePath = PathUtil.getLocalPath(virtualFile)
.replaceFirst("^" + Pattern.quote(projectDir), "");
filePath = localFilePath.replaceFirst("^" + Pattern.quote(projectDir), "");
virtualFile.putUserData(RELATIVE_FILE_URL, filePath);
}
return filePath;
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<idea-plugin>
<id>net.seesharpsoft.intellij.plugins.csv</id>
<name>CSV Plugin</name>
<name>CSV</name>
<vendor url="https://github.com/SeeSharpSoft/intellij-csv-validator">
Martin Sommer
</vendor>
Expand Down Expand Up @@ -50,8 +50,9 @@

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

0 comments on commit 1b9dd69

Please sign in to comment.