Skip to content

Commit

Permalink
Merge 6447db9 into ef2d7d3
Browse files Browse the repository at this point in the history
  • Loading branch information
SeeSharpSoft committed Oct 8, 2019
2 parents ef2d7d3 + 6447db9 commit 92f3317
Show file tree
Hide file tree
Showing 9 changed files with 232 additions and 147 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Expand Up @@ -3,10 +3,9 @@ jdk:
- openjdk8

env:
- IDEA_VERSION=IC-2016.3.2 GRAMMAR_KIT_VERSION=1.4.3
- IDEA_VERSION=IC-2017.3.2 GRAMMAR_KIT_VERSION=2017.1.2
- IDEA_VERSION=IC-2017.3.1 GRAMMAR_KIT_VERSION=2017.1.2
- IDEA_VERSION=IC-2018.3.2 GRAMMAR_KIT_VERSION=2017.1.7
- IDEA_VERSION=IC-2019.2.3 GRAMMAR_KIT_VERSION=2017.1.7
- IDEA_VERSION=IC-2019.1.3 GRAMMAR_KIT_VERSION=2017.1.7
# - IDEA_VERSION=PC-LATEST-EAP-SNAPSHOT GRAMMAR_KIT_VERSION=07f30a1e7666f36ae780f614b6bbc89690ba36c3

script: xvfb-run gradle check
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG
@@ -1,3 +1,11 @@
2.8.0
???

NEW: improved font handling in table editor #122
FIX: proper font handling in balloon tooltips

NOTE: IDE versions older than 2017.3.* are no longer supported!

2.7.1
Sep 26, 2019

Expand Down
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -4,11 +4,10 @@
[![Known Vulnerabilities](https://snyk.io/test/github/SeeSharpSoft/intellij-csv-validator/badge.svg?targetFile=build.gradle)](https://snyk.io/test/github/SeeSharpSoft/intellij-csv-validator?targetFile=build.gradle)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/97769359388e44bfb7101346d510fccf)](https://www.codacy.com/app/github_124/intellij-csv-validator?utm_source=github.com&utm_medium=referral&utm_content=SeeSharpSoft/intellij-csv-validator&utm_campaign=Badge_Grade)
[![BCH compliance](https://bettercodehub.com/edge/badge/SeeSharpSoft/intellij-csv-validator?branch=master)](https://bettercodehub.com/results/SeeSharpSoft/intellij-csv-validator/)
[![Donate](https://img.shields.io/badge/Paypal-Donate-yellow)](https://paypal.me/knerzbert)

# Lightweight CSV Plugin for JetBrains IDE family

Compatible with _IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion Gogland DataGrip Rider MPS Android Studio_ - __2016.3.2 and newer__
Compatible with _IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion Gogland DataGrip Rider MPS Android Studio_ - __2017.3.1 and newer__

This plugin introduces CSV (_Comma-Separated Values_) as a language to Jetbrains IDE with a syntax definition, structured language elements and associated file types (.csv/.tsv/.psv).
This enables default editor features like syntax validation, highlighting and inspections for CSV-alike files.
Expand All @@ -18,6 +17,7 @@ This enables default editor features like syntax validation, highlighting and in
- CSV/TSV/PSV file detection
- table editor
- customizable text editor
- customizable column coloring
- syntax validation
- syntax highlighting (customizable)
- content formatting (customizable)
Expand All @@ -26,7 +26,6 @@ This enables default editor features like syntax validation, highlighting and in
- structure view (header-entry layout)
- support for ',', ';', '|' and '↹' as value separator
- highlight of active column values
- customizable column coloring
- tab (↹) separator highlighting

(see [full changelog](./CHANGELOG))
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Expand Up @@ -11,7 +11,7 @@ buildscript {

plugins {
// https://github.com/JetBrains/gradle-intellij-plugin
id 'org.jetbrains.intellij' version '0.4.9'
id 'org.jetbrains.intellij' version '0.4.10'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.8.2'
id "com.github.ManifestClasspath" version "0.1.0-RELEASE"
Expand All @@ -24,7 +24,7 @@ jacocoTestReport {
}

group 'net.seesharpsoft.intellij.plugins'
version '2.7.1'
version '2.8.0'

apply plugin: 'java'
sourceCompatibility = javaVersion
Expand Down Expand Up @@ -71,11 +71,11 @@ idea {
apply plugin: 'org.jetbrains.intellij'
intellij {
// IDE version - https://www.jetbrains.com/intellij-repository/releases
version = System.getenv().getOrDefault('IDEA_VERSION', 'IC-192.6817.14')
version = System.getenv().getOrDefault('IDEA_VERSION', 'IC-191.5701.16')
pluginName = 'CSV Plugin'
instrumentCode = true
updateSinceUntilBuild = false
downloadSources = false
downloadSources = true
}
publishPlugin {
token = System.getenv().getOrDefault('JI_TOKEN', '')
Expand Down
Expand Up @@ -4,6 +4,7 @@
import com.intellij.openapi.editor.markup.TextAttributes;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.TextRange;
import com.intellij.openapi.vcs.ui.FontUtil;
import com.intellij.psi.PsiElement;
import com.intellij.psi.tree.IElementType;
import com.intellij.xml.util.XmlStringUtil;
Expand Down Expand Up @@ -43,12 +44,16 @@ public void annotate(@NotNull final PsiElement element, @NotNull final Annotatio

if (columnInfo != null) {
PsiElement headerElement = columnInfo.getHeaderElement();
String message = XmlStringUtil.escapeString(headerElement == null ? "" : headerElement.getText(), true);
String message = FontUtil.getHtmlWithFonts(
XmlStringUtil.escapeString(headerElement == null ? "" : headerElement.getText(), true)
);
String tooltip = null;
if (showInfoBalloon(holder.getCurrentAnnotationSession())) {
tooltip = XmlStringUtil.wrapInHtml(
String.format("%s<br /><br />Header: %s<br />Index: %d",
XmlStringUtil.escapeString(element.getText(), true),
FontUtil.getHtmlWithFonts(
XmlStringUtil.escapeString(element.getText(), true)
),
message,
columnInfo.getColumnIndex() + (CsvEditorSettingsExternalizable.getInstance().isZeroBasedColumnNumbering() ? 0 : 1)
)
Expand Down Expand Up @@ -104,6 +109,4 @@ protected boolean handleSeparatorElement(@NotNull PsiElement element, @NotNull A
}
return false;
}


}
}

0 comments on commit 92f3317

Please sign in to comment.