Coder Social home page Coder Social logo

seesharpsoft / intellij-csv-validator Goto Github PK

View Code? Open in Web Editor NEW
369.0 6.0 45.0 4.82 MB

CSV validator, highlighter and formatter plugin for JetBrains Intellij IDEA, PyCharm, WebStorm, ...

License: Apache License 2.0

Java 99.22% Lex 0.65% HTML 0.13%
csv intellij csv-plugin csv-validator highlighting jetbrains pycharm webstorm highlighter inspection

intellij-csv-validator's Introduction

Plugin version Build Action Status EAP Status Coverage Status Known Vulnerabilities Codacy Badge

CSV Editor Plugin for JetBrains IDE family

Compatible with IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion Gogland DataGrip Rider MPS Android Studio - 2022.2 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.

CSV Editor Example

Features

  • CSV/TSV/PSV file detection
  • flexible Table Editor
  • customizable text editor
  • customizable column coloring (rainbow coloring)
  • customizable line comment
  • syntax validation
  • syntax highlighting (customizable)
  • content formatting (customizable)
  • quick fix inspections
  • intentions (Alt+Enter), e.g. Quote/Unquote (all), Shift Column Left/Right
  • support for ',', ';', ':', '|' and '↹' as pre-defined value separator
  • support for freely defined value separators
  • support for line comments (# per default, customizable)
  • tab (↹) separator highlighting

(see full changelog)

!!Please note!!

For release 3.*, the plugin got a major overhaul focusing on performance and table editor usage. Some features and settings were removed for simplification and consistency. The previous version (incl README) can still be accessed here and installed manually (see section Installation).

Syntax parser & validation

The CSV syntax parser follows the standard defined in IETF 4180 but tolerates leading and trailing whitespaces of escaped text and accepts basically every literal as text data. This results in a less restrictive checks and contributes to the flexibility of this format. The goal of the plugin is to support editing files in CSV format, not introducing new hurdles.

Being strict, the following CSV snippet is actually incorrect cause of the leading whitespaces. However, it is accepted by the plugins syntax parser implementation:

"firstName", "lastName", "birthday"

Besides the mentioned diversion from the standard definition, syntax errors will be detected and can be inspected. Please note that if a document is syntactically incorrect, other features like the table editor, code formatting or the structure view can not function properly.

Editor with syntax validation and highlighting

Separator

CSV files provide a high degree of flexibility and can be used universally for all kind of data. This led to a variety of CSV derivatives like semicolon or pipe separated values, which share the common format but make use of a different separator.

The plugin supports file-specific separator settings. It comes with a set of predefined separators (Comma (,), semicolon (;), colon (:), tab (↹), pipe (|) and record ('↹'), but can also handle freely chosen separators.

TSV/PSV

A different separator can be chosen for each CSV file.

Additionally, the file types TSV (Tab-Separated-Values) and PSV (Pipe-Separated-Values) were introduced as a kind of CSV language. For TSV and PSV files, the same formatter and code style settings are applied as for CSV itself, but the separator is considered to be a tab or a pipe respectively. All functionality that is available for plain CSV files (table editor, inspections, intentions, etc.) can be used for TSV and PSV as well.

Table Editor

The plugin provides editing of CSV files via a table editor since version 2.0.0. This editor is NOT related to the Edit as table... functionality of IntelliJ IDEA Ultimate/PhpStorm/DataGrip/etc. and does not share any implementation or settings. It is an alternative to the CSV text editor and not meant to replace or mirror the capabilities of the Jetbrains "Data" tab.

!!! IMPORTANT !!!

The table editor requires a syntactically correct formatted CSV file. If the file can't be parsed, the table editor will be not available. The file needs to be fixed first via a text editor before it can be viewed and edited in the table editor.

Table editor

Context menu

A right-click within the table provides a context menu to add/remove rows, right-click on the table header to add/remove columns.

Please note that the actions within the context menu are meant for the current selection of row(s) and column(s), not necessarily for the cell or header where the context menu appears! A right-click does not trigger a selection change by default.

Key bindings

To support working with the table editor fluently, a set of key bindings are available for manipulating and navigating the table view:

  • ARROW KEYS navigate through the table

  • ENTER start/stop editing current cell (NOTE: almost every default key triggers an edit)

  • CTRL+ENTER actual Enter key while editing a cell

  • SHIFT+ENTER stop editing and move to previous row

  • CTRL+SHIFT+ENTER stop editing and move to next row

  • CTRL+SHIFT+LEFT adds a new column before the current cell

  • CTRL+SHIFT+RIGHT adds a new column after the current cell

  • CTRL+SHIFT+DELETE/BACKSPACE deletes the current selected column(s)

  • CTRL+UP adds a new row before the current cell

  • CTRL+DOWN adds a new row after the current cell

  • CTRL+DELETE/BACKSPACE deletes the current selected row(s)

  • DELETE/BACKSPACE clear content of selected cell(s)

Editor Settings

  • File > Settings > Editor > General > CSV/TSV Editor

The plugin introduces an enhanced text editor supporting custom settings - and a table editor. The settings for those can be adjusted in the corresponding CSV/TSV editor settings menu.

Editor settings

General

Editor Usage

The preferred editor usage can be switched between "Text Editor first", "Table Editor first" or "Text Editor only", which has an effect on the editor tab order (or whether the table editor is shown at all). A "Table Editor only" option is not available due to the table editor restrictions when handling erroneous CSV files.

Default Value Separator (CSV only)

The following separators are currently supported: , (Comma), ; (Semicolon), : (Colon), | (Pipe) and (Tab)

since 2.15.0: The default value separator can also be a user defined character sequence.

Default Value Separator defines which separator is used as standard for each newly created or opened CSV file. The separator character can be changed for each file individually in its editors context menu.

Auto Detect

The value separator of a newly opened CSV file can be detected automatically based on the number of predefined separator occurrences.

If Auto Detect is enabled (default), the Default Value Separator setting is only taken into account for newly created files.

Note: This option has no effect on TSV/PSV files, the separator is pre-defined by their file- and language-type.

Default Escape Character

The following escape characters are currently supported: " (Double Quote), \ (Backslash)

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.

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.

Line Comment Indicator

Define the character(s) that should be used to mark a line as a comment within a CSV document.

Column numbering

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

Value coloring

Choose the coloring method of values. Possible options are:

  • Rainbow (Column Color) - values are colored based on their column.
  • Simple (Text Color) - values are colored based on the defined text color.

All colors can be adjusted via CSV Color Scheme settings.

Text Editor

Highlighting
Highlight caret row

The highlighting of the current caret row might interfere with custom background color settings and can be enabled/disabled for CSV/TSV/PSV files here.

Highlight tab separator

Enable/disable highlighting (and choose the highlight color) of tab characters (↹) in their role as value separator (TSV). Tabs as part of a value are therefore not highlighted on purpose.

Others
Show info balloon

Enable/disable the info balloon that appears at the caret position in the text editor.

Use soft wraps

Set whether soft wrapping should be activated for CSV/TSV/PSV. It still can be changed file specific with right-click on the editors left outer margin.

Keep trailing whitespaces

If enabled, it overrides the default editor settings for trailing whitespace handling to always keep them when editing CSV/TSV/PSV.

Note: This setting has no effect on the table editor. Unquoted values will always be trimmed when opening the table editor. When edited in the table editor, values ending or starting with whitespace will be quoted.

Table Editor

Default row height

The default and initial width of each row in the table in px.

Default column width

The default and initial width of a single table column in px.

Maximum column width

The maximum width of a single table column in px, which is used when adjusting the column widths automatically. 0 deactivates the limitation. This value has no effect when sizing the columns manually in the table editor.

Keep/ignore linebreak at file end

If the file ends with a completely empty line (no spaces or tabs either), the table editor will not show this line as empty values but ignore it. When table data is serialized, an existing empty line is kept at the end of the file.

Enforce value quoting

Always quotes a single value on save - even if not required.

Color Scheme

The different symbols of a CSV document, namely the separator (e.g. comma, pipe, semicolon), the quote character, the escaped literals and the text elements itself, are colored based on the CSV color scheme settings:

  • File > Settings > Editor > Color Scheme > CSV/TSV/PSV

Preset colors are based on Jetbrains IDE defaults and support the different UI themes.

Color scheme settings

Column Colors

Besides the colors and font-style variants for the different CSV symbols, the 10 different column rainbow colors can be defined. Column colors are taken into account when Rainbow is selected as Value Coloring option in the Editor Settings.

Formatting

  • File > Settings > Editor > Code Style > CSV

Format settings

Spaces

Formatting CSV is tricky: On one hand it is easy cause the language has only four different symbols and is generally easy to handle. On the other hand, formatting elements like whitespaces and tabs do have a meaning in CSV. However, in reality when parsing CSV, the leading and trailing whitespaces are quite often ignored or trimmed. Formatting can be completely disabled if no option is selected at all at the settings screen.

The formatting is applied to CSV documents as normal code formatting:

  • Code > Reformat code (Ctrl+Alt+L)

The formatting examples are based on the following CSV snippet as input:

"name", "city", "position"
Annasusanna,Amsterdam,1
  Ben  ,  Berlin  , 2
Separator

Adjust spacing around the separator.

Space before separator

"name" , "city" , "position"
Annasusanna ,Amsterdam ,1
  Ben ,  Berlin , 2

Space after separator

"name", "city", "position"
Annasusanna, Amsterdam, 1
  Ben  , Berlin  , 2
Trimming

Trimming can be combined with Space before/after separator.

Trim leading whitespaces

"name","city","position"
Annasusanna,Amsterdam,1
Ben  ,Berlin  ,2

Trim trailing whitespaces

"name", "city", "position"
Annasusanna,Amsterdam,1
  Ben,  Berlin, 2

Actions

File specific value separator & escape character

Context menu

The action to switch the value separator (or escape character) - which is used for CSV syntax validation of a specific file - is part of its editors context menu. Since version 2.11.0, also custom separator setting is available via this action.

Please note: This action defines how the parser/validator/highlighter/etc. behaves. It does intentionally NOT change the file content. To be more precise: It does not replace previous separator/escape characters by new ones or adjust the escaped texts.

Auto-fit columns width (table editor only)

Calculates and sets the maximum width for all table columns based on their content. The maximum table column width can be changed via Editor Settings.

Reset column widths to default (table editor only)

Set the width of all table columns back to default. The default table column width can be changed via Editor Settings.

Inspections

  • File > Settings > Editor > Inspections > CSV

Inspections are an IDE feature that can be used to fix syntax errors. They are accessed via Alt+Enter when the cursor is at an erroneous position. The plugin provides three types of inspections:

  • Surround with quotes Surrounds the current field with quotes and escapes already existing ones
  • Add separator Adds a (missing) separator at the cursor position
  • Add closing quote Adds a (missing) closing quote at the end of the document

Intentions

  • File > Settings > Editor > Intentions > CSV

Intentions are similar to inspections and provide a quick way to automatically adjust the document. They are accessed via Alt+Enter at any time. The shown intentions can vary depending on the cursor position within the document. The plugin provides six types of intentions:

  • Quote All Surrounds all unquoted fields with quotes
  • Quote Value Quotes the currently unquoted value at the cursor position
  • Unquote All Unquotes all quoted fields if possible
  • Unquote Value Unquotes the currently quoted value at the cursor position if possible
  • Shift Column Left Shifts the column at cursor position to the left
  • Shift Column Right Shifts the column at cursor position to the right

Installation

Install it from the Jetbrains plugin repository within your IDE (recommended):

  • File > Settings > Plugins > Browse repositories... > Search 'CSV' > Category 'Editor'

You can also download the JAR package from the Jetbrains plugin repository or from GitHub Releases and add it manually to your plugins:

  • File > Settings > Plugins > Install plugin from disk...

Troubleshooting

CSV Editor doesn't seem to work

Please ensure in the settings that the corresponding files types (csv, tab/tsv, psv) are properly mapped (File > Settings > Editor > File Types).

CSV Editor causes the IDE to stop working properly

Since version 2.14.0, the plugins requires the IntelliJ platform to be executed on JRE11 or higher. If this is not the case, the following error log can be noticed:

com.intellij.diagnostic.PluginException: While loading class <className>: <className> has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 [Plugin: net.seesharpsoft.intellij.plugins.csv]

In some cases the error log doesn't seem to point this out in a noticeable manner, but the IDE doesn't work correctly after enabling the plugin. Always disable the plugin first before continuing with the following steps.

Please read the official instructions on how to switch to a newer JRE, or manually install a prior CSV plugin version.

Features of the CSV Editor are not available

If another plugin for CSV files like Rainbow CSV is enabled, this plugin might not be taken into account for parsing and presenting CSV file content.

Therefore, please ensure in the settings the proper mapping of corresponding files types (File > Settings > Editor > File Types).

Contribution

Contributions are welcome. Please check CONTRIBUTING.md for more information.

Besides source code contributions, feel free to open bug reports or just suggest new features here.

Code/feature contributors

  • zoom table-editor cells with Ctrl+Mouse Wheel @royqh1979

Jetbrains Repository

JetBrains Plugin Repository Link: https://plugins.jetbrains.com/plugin/10037-csv-plugin

intellij-csv-validator's People

Contributors

royqh1979 avatar seesharpsoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

intellij-csv-validator's Issues

Visible tabs in TSV

It would be useful to have visible tabs (but not spaces). I now use a different background for the 'separator' character, but this background disappears for the current line, making it look awkward and eyeballing the correctness of a line requires you to move the cursor to another line.

tsv-invisible-tabs

Search and replace in the table view

Thanks for this plugin, in the first place 👍

I would like to use the text search feature inside the table view. (And ideally also the replace functionality, but this could be a separate ticket.)

Currently, Ctrl-F only works in the text part but not in the table editor. It would be nice if that feature could be added to the table editor as well.

As a first step it would be good if the current line would be synced in both views. So if I move to a specific line in the text part, e.g. using Ctrl-F, and then switch to the table editor, then I stay in the same line.

What do you think?

Performance

Hi - since taking the new table editor version of your plug in I can't load up a CSV with around 2400 rows, about 20 columns, file size 364KB and be able to edit the file. It's very laggy to click anywhere in the file. What I liked about your previous version was column highlighting by selecting a row value.

Do you expect there is performance impacts on a file this large, I'm using this inside Rider and have used your plugin for quite some time, this new version means I've had to disable the plugin.

Please provide change logs

Hello and thanks for this plugin!
I had some trouble to find an overview about the lates changes (change log).
Would be nice to see this prominently on your page and even in the IntelliJ plugin update dialog.
Many thanks, Jörg

Show tooltip also for empty fields

Follow up to #38

Also when I position the cursor on empty value I don't get any tooltip - this actually defeats the main purpose of the tooltip, i.e. to give you a hint what value you are supposed to write.

Multi-line quoted string with empty line causes IDEA error

When a CSV file contains a single string-quote " on a line and is missing the closing quote, and if there are multiple lines below, none of which contain a string-quote, the entire rest of the CSV file becomes a multi-line string field according to the syntax highlighter. When that happens, IDEA gives an error in the lower right corner. I'm posting it here so you can figure out if the bug lies with the plugin or with IDEA.

java.lang.Throwable: Invalid range specified: (-2147483648, 1);
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:134)
at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:233)
at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:228)
at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:224)
at com.intellij.openapi.util.TextRange.(TextRange.java:43)
at com.intellij.openapi.util.TextRange.(TextRange.java:32)
at com.intellij.codeInspection.longLine.LongLineInspection$2.visitElement(LongLineInspection.java:110)
...

Can't open a TSV file

Suddenly, I am unable to open most TSV files in IntelliJ. I just click the file in the explorer and nothing happens. Disabling this plugin resolves this issue.

I can open some of the files, but not all of them. Doesn't matter if they are small or large. It seems like the files that I can't open might be ones that I had left open when I last exited IntelliJ.

Highlight Tab Characters

It would be nice to have tab characters in tab separated files coloured according to the colours defined in Color Scheme->CSV->Separators.

Typo inspection hides header tooltip

Follow up to #38

if there's a typo in a word, or for some reason IDEA thinks there's a typo in the word it shows "There's a typo in the word 'XXX'" and hides the header tooltip.

Table Editor: Trailing spaces get lost

First of all thank you for the plugin, the new table editor will come super handy.

We are using TSV files without text delimiters, value separators are TABs of course. However upon opening the editor tab, any trailing spaces get lost. regardless of settings. The file is immediately in a changed state once the Table Editor tab is opened.

Again, thank you for your efforts!

Active column to be colored differently

Hello,

I'd like to propose an improvement. It would be really great if the column you have selected (either in the header or some value) to be colored in a different background color (see screenshots).
color1
color-2

TSV file support

I like the file formatting and syntax highlighting, but most of my files are ".tsv" (tab as separator)
Is it possible to get it working with TSV files also?

java.util.ConcurrentModificationException

I received this error when resizing column in the Table Editor tab of this plugin from PyCharm 2018.3.3. One thing to note with this file was I had seen before this error occurred the message that this file was "loaded in the wrong encoding: 'UTF-8'". I had then reloaded to encoding ISO-8859-1. And then, after this exception occurred, I noticed this message occurring again that it was "loaded in the wrong encoding" when switching back to the Text tab of this plugin.

Environment context:
PyCharm 2018.3.3 (Professional Edition)
Build #PY-183.5153.39, built on January 9, 2019
JRE: 1.8.0_152-release-1343-b26 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.2

Not sure if I can reproduce this consistently but below is the exception:

java.util.ConcurrentModificationException
	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437)
	at java.util.HashMap$KeyIterator.next(HashMap.java:1461)
	at java.lang.Iterable.forEach(Iterable.java:74)
	at java.util.Collections$SynchronizedCollection.forEach(Collections.java:2062)
	at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.MultiLineCellRenderer.fireStopCellEditing(MultiLineCellRenderer.java:128)
	at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.MultiLineCellRenderer.stopCellEditing(MultiLineCellRenderer.java:117)
	at javax.swing.JTable.columnMarginChanged(JTable.java:4592)
	at javax.swing.table.DefaultTableColumnModel.fireColumnMarginChanged(DefaultTableColumnModel.java:628)
	at javax.swing.table.DefaultTableColumnModel.propertyChange(DefaultTableColumnModel.java:691)
	at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
	at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:92)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
	at javax.swing.table.TableColumn.firePropertyChange(TableColumn.java:278)
	at javax.swing.table.TableColumn.firePropertyChange(TableColumn.java:284)
	at javax.swing.table.TableColumn.setWidth(TableColumn.java:514)
	at javax.swing.plaf.basic.BasicTableHeaderUI.changeColumnWidth(BasicTableHeaderUI.java:541)
	at javax.swing.plaf.basic.BasicTableHeaderUI.access$500(BasicTableHeaderUI.java:44)
	at javax.swing.plaf.basic.BasicTableHeaderUI$MouseInputHandler.mouseDragged(BasicTableHeaderUI.java:219)
	at java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:319)
	at java.awt.Component.processMouseMotionEvent(Component.java:6596)
	at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3343)
	at java.awt.Component.processEvent(Component.java:6317)
	at java.awt.Container.processEvent(Container.java:2237)
	at java.awt.Component.dispatchEventImpl(Component.java:4903)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Component.dispatchEvent(Component.java:4725)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4543)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
	at java.awt.Container.dispatchEventImpl(Container.java:2281)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4725)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:664)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Feature: Column-wise coloring

Hey thank you for the cool plugin, if've recently seen a feature in visual studio code were every 10 columns get different colors. In my opinion this should not be to hard to implement and really helps for a quick overview of the data.

(first posted here: #2)

@flomock: Thanks for your input - just created an own issue for that.

Can't place caret on bottom row using mouse

When the file has more lines than fit in the window, aiming the mouse at the bottom row almost immediately (in ~0.25s) pops up a message box, preventing you from clicking on the text to move the caret there. It's really hard to move the mouse cursor over the text and clicking before it pops up.

tsv-annoying-popup

Double quotes break tooltips and colouring

When you have double quotation marks in the middle of a field, they give the error CvsTokenType.CRLF or CsvTokenType.TEXT expected, got '"'. After that, all following fields and rows are broken and count as that one row/field.
image
(example.tsv)

ArrayIndexOutOfBoundsException opening a CSV file with an unexpected separator

Opening a new "*.cvs" file with a comma (while a semicolon is configured) leads to an exception.
Replacing all commas by semicolons works.
Reported by the IDE:

java.lang.ArrayIndexOutOfBoundsException: 0 at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing.generateColumnIdentifiers(CsvTableEditorSwing.java:170) at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing.afterTableComponentUpdate(CsvTableEditorSwing.java:258) at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditor.updateTableComponentData(CsvTableEditor.java:84) at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing.updateUIComponents(CsvTableEditorSwing.java:342) at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditor.selectNotify(CsvTableEditor.java:210) at com.intellij.openapi.fileEditor.impl.EditorComposite$1.lambda$selectionChanged$0(EditorComposite.java:139) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:168) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:154) at com.intellij.openapi.fileEditor.impl.EditorComposite$1.selectionChanged(EditorComposite.java:144) at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117) at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:397) at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:358) at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:347) at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:331) at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:324) at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:29) at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:196) at com.sun.proxy.$Proxy114.selectionChanged(Unknown Source) at com.intellij.openapi.fileEditor.impl.EditorComposite.lambda$fireSelectedEditorChanged$1(EditorComposite.java:212) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$5$1.run(FileEditorManagerImpl.java:1034) at com.intellij.openapi.wm.impl.FocusManagerImpl.lambda$doWhenFocusSettlesDown$3(FocusManagerImpl.java:188) at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:3048) at com.intellij.ide.IdeEventQueue.ifFocusEventsInTheQueue(IdeEventQueue.java:172) at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.java:124) at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:179) at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:185) at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.doWhenFocusSettlesDown(IdeFocusManagerImpl.java:63) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$5.run(FileEditorManagerImpl.java:1031) at com.intellij.openapi.util.BusyObject$Impl$Simple.execute(BusyObject.java:108) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.notifyPublisher(FileEditorManagerImpl.java:1027) at com.intellij.openapi.fileEditor.impl.EditorComposite.fireSelectedEditorChanged(EditorComposite.java:209) at com.intellij.openapi.fileEditor.impl.EditorComposite.access$500(EditorComposite.java:60) at com.intellij.openapi.fileEditor.impl.EditorComposite$MyChangeListener.stateChanged(EditorComposite.java:424) at com.intellij.ui.JBTabsPaneImpl.fireChanged(JBTabsPaneImpl.java:62) at com.intellij.ui.JBTabsPaneImpl.access$100(JBTabsPaneImpl.java:22) at com.intellij.ui.JBTabsPaneImpl$2.selectionChanged(JBTabsPaneImpl.java:48) at com.intellij.ui.tabs.impl.JBTabsImpl.fireSelectionChanged(JBTabsImpl.java:951) at com.intellij.ui.tabs.impl.JBTabsImpl.executeSelectionChange(JBTabsImpl.java:907) at com.intellij.ui.tabs.impl.JBTabsImpl._setSelected(JBTabsImpl.java:871) at com.intellij.ui.tabs.impl.JBTabsImpl.select(JBTabsImpl.java:853) at com.intellij.ui.tabs.impl.TabLabel$1.mousePressed(TabLabel.java:96) at java.awt.Component.processMouseEvent(Component.java:6545) at javax.swing.JComponent.processMouseEvent(JComponent.java:3325) at java.awt.Component.processEvent(Component.java:6313) at java.awt.Container.processEvent(Container.java:2237) at java.awt.Component.dispatchEventImpl(Component.java:4903) at java.awt.Container.dispatchEventImpl(Container.java:2295) at java.awt.Component.dispatchEvent(Component.java:4725) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4523) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467) at java.awt.Container.dispatchEventImpl(Container.java:2281) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4725) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) at java.awt.EventQueue$4.run(EventQueue.java:737) at java.awt.EventQueue$4.run(EventQueue.java:735) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:734) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:664) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Line number feature is gone

Hello,

In the new version the line number is gone.
It was very useful when you need to go back in text mode to duplicate a line
BTW Thanks for your plugin.

exception when clicking to right of populated columns

java.lang.IllegalArgumentException: Column index out of range
at javax.swing.JTable.boundColumn(JTable.java:2150)
at javax.swing.JTable.addColumnSelectionInterval(JTable.java:2207)
at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing.selectColumn(CsvTableEditorSwing.java:325)
at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorMouseListener.mousePressed(CsvTableEditorMouseListener.java:69)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280)
at java.awt.Component.processMouseEvent(Component.java:6545)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at com.intellij.ui.table.JBTable$JBTableHeader.processMouseEvent(JBTable.java:861)
at java.awt.Component.processEvent(Component.java:6313)
at java.awt.Container.processEvent(Container.java:2237)
at java.awt.Component.dispatchEventImpl(Component.java:4903)
at java.awt.Container.dispatchEventImpl(Container.java:2295)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4523)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
at java.awt.Container.dispatchEventImpl(Container.java:2281)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:664)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Treat fullwidth east asian characters as 2 characters wide in formatter

Expected

Format

汉字,lorem
ipsum,dolor

into

汉字 ,lorem
ipsum,dolor

How this should look like when a proper coding font with CJK support is used:

Example expected screenshot

Actual

The example csv above will be formatted into

汉字   ,lorem
ipsum,dolor

screenshot:
Example actual screenshot

Cause

Fullwidth characters (examples including CJK Unified Ideograph "汉", Hiragana "あ", Fullwidth Form "A", CJK Symbol/Punctuation "〄") are treated as halfwidth characters.

However, emojis like "😀" have their widths calculated properly.

Solution

Use ICU4J for finding fullwidth characters. See this StackOverflow question.

I would have made a pull request, but the ******* ISP here won't let me download even a single gradle dependency without experiencing timeout.

Notes

Like the SO question's comment mentioned, super-wide glyphs besides CJK exists (what about this fish-like guy "௵"?). Might also be a related issue.

Some glyphs (like slanted quotes "“”") have different width in different fonts/locales. I have absolutely no idea how to handle this so no comment.

Plugin breaks some functions in PhpStorm 2016.1.2

Hi,
After installing the latest version of the CSV plugin in PhpStorm 2016.1.2 intentions stops working. The bulb stops showing and the Alt+Enter shortcut stops working as well.

Here is a entry from the log:

2018-03-21 09:57:53,195 [ 497514]  ERROR - aemon.impl.PassExecutorService - Either do the specified parameters not match any of the following constructors: [protected net.seesharpsoft.intellij.plugins.csv.intention.CsvShiftColumnLeftIntentionAction()] or the constructors were not accessible for 'class net.seesharpsoft.intellij.plugins.csv.intention.CsvShiftColumnLeftIntentionAction' 
org.picocontainer.PicoInitializationException: Either do the specified parameters not match any of the following constructors: [protected net.seesharpsoft.intellij.plugins.csv.intention.CsvShiftColumnLeftIntentionAction()] or the constructors were not accessible for 'class net.seesharpsoft.intellij.plugins.csv.intention.CsvShiftColumnLeftIntentionAction'
	at com.intellij.util.pico.ConstructorInjectionComponentAdapter.getGreediestSatisfiableConstructor(ConstructorInjectionComponentAdapter.java:118)
	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:210)
	at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
	at com.intellij.util.pico.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:59)
	at com.intellij.openapi.extensions.AbstractExtensionPointBean.instantiate(AbstractExtensionPointBean.java:75)
	at com.intellij.openapi.extensions.AbstractExtensionPointBean.instantiate(AbstractExtensionPointBean.java:68)
	at com.intellij.openapi.extensions.AbstractExtensionPointBean.instantiate(AbstractExtensionPointBean.java:63)
	at com.intellij.openapi.extensions.CustomLoadingExtensionPointBean.instantiateExtension(CustomLoadingExtensionPointBean.java:47)
	at com.intellij.codeInsight.intention.IntentionActionBean.instantiate(IntentionActionBean.java:76)
	at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.getDelegate(IntentionActionWrapper.java:81)
	at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.getFamilyName(IntentionActionWrapper.java:51)
	at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.getFullFamilyName(IntentionActionWrapper.java:73)
	at com.intellij.codeInsight.intention.impl.config.IntentionManagerSettings.a(IntentionManagerSettings.java:129)
	at com.intellij.codeInsight.intention.impl.config.IntentionManagerSettings.isEnabled(IntentionManagerSettings.java:142)
	at com.intellij.codeInsight.intention.impl.config.IntentionManagerImpl.getAvailableIntentionActions(IntentionManagerImpl.java:260)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:302)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:225)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:201)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:444)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1178)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:435)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:446)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:432)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:206)
	at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
	at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
	at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
	at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
	at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)

After uninstalling the plugin it works again.

Uncaught Exception

Hi

The CSV plugin throws an Exception in Version v2.0.0.

Plugin Version

v2.0.0

IDE Environment

PhpStorm 2018.2.2
Build #PS-182.4129.45, built on August 22, 2018
Licensed to XXX
Subscription is active until XXX
For educational use only.
JRE: 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Details

This has happened multiple times since I updated to v2.0.0 of your plugin.

Stacktrace

java.lang.ClassCastException: com.intellij.psi.impl.source.PsiPlainTextFileImpl cannot be cast to net.seesharpsoft.intellij.plugins.csv.psi.CsvFile
	at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditor.<init>(CsvTableEditor.java:57)
	at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing.<init>(CsvTableEditorSwing.java:61)
	at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditorProvider$1.build(CsvTableEditorProvider.java:71)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.a(FileEditorManagerImpl.java:857)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
	at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:156)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:447)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:431)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:415)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
	at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:781)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:722)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
	at com.intellij.ide.IdeEventQueue.pumpEventsForHierarchy(IdeEventQueue.java:864)
	at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:205)
	at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:191)
	at com.intellij.openapi.application.impl.ApplicationImpl.runProcessWithProgressSynchronously(ApplicationImpl.java:588)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:446)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:109)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:250)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:203)
	at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:439)
	at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(ProjectManagerImpl.java:414)
	at com.intellij.platform.PlatformProjectOpenProcessor.doOpenProject(PlatformProjectOpenProcessor.java:245)
	at com.intellij.ide.RecentProjectsManagerBase.doOpenProject(RecentProjectsManagerBase.java:579)
	at com.intellij.ide.RecentProjectsManagerBase.doReopenLastProject(RecentProjectsManagerBase.java:706)
	at com.intellij.ide.RecentProjectsManagerBase$MyAppLifecycleListener.appStarting(RecentProjectsManagerBase.java:748)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
	at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:426)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:387)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:376)
	at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:357)
	at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:43)
	at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:208)
	at com.sun.proxy.$Proxy50.appStarting(Unknown Source)
	at com.intellij.idea.IdeaApplication$IdeStarter.a(IdeaApplication.java:374)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:88)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:111)
	at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
	at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
	at com.intellij.idea.IdeaApplication$IdeStarter.main(IdeaApplication.java:372)
	at com.intellij.idea.IdeaApplication.a(IdeaApplication.java:212)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195)
	at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:212)
	at com.intellij.idea.IdeaApplication.a(IdeaApplication.java:75)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:361)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Unexpected/unwanted hightlighting

Hey, I think since recent update (1.7.0), when the cursor is at any row except the last on, I get all rows of the csv file highlighted with magenta-like color, making it difficult to see other highlights. See attached screenshots:

Cursor at line before the last one - everything highlighted, annoying:
csv_plugin_1
Cursor at the last line - no highlighting, everything fine:
csv_plugin_2

Moreover, all rows are also highlighted same way in git diff panel, which makes it difficult to spot the changes.

Add button to execute/import csv

Most CSV files are used to import data into some system.
It would be super nice if there was a way to directly execute CSV files while writing it (see screenshot).

image 1

Also if this is implemented we might need a textarea in the settings where the user can write some groovy code what should happen when the button is clicked (in our case it makes POST request to https://localhost:8112/storefront/platform/csv/import)

Adding column Version 2.2.1 is very slow

I have a CSV with 3 rows, 15 columns. Trying to add a new column works, but there's a delay of a minute or two. In previous versions this was pretty snappy. After this, tables don't display properly, and IntelliJ is slow and unresponsive. I find I need to exit and restart to get back to normal.

Add tooltip to show header value when you have scrolled further down.

Hello,
here's a feature i wish was implemented. My CSV files are huge and when I scroll several pages down the file and decide to add new row I start typing commas, but I can't remember which column was first and which one was second, etc. so I always have to scroll to the top of page to see the csv header. It would be really awesome if the plugin was showing me in a tooltip what is the current column from the header. For example:

id,name,description, ..... some-column10001,some-column-10002,

[several-pages-of-csv-lines]
1,myname,mydescription,....value-10001,value-10002

So when I type 1, a tooltip would be shown saying name.

Thank you and keep up the good work.

Header tooltip shows wrong values when csv has multiple header blocks

Hello,
I tested the latest SNAPSHOT regarding #23 and the tooltip shows wrong values if there's more than one header in the file
wrong-header

Further more if there's a typo in a word, or for some reason IDEA thinks there's a typo in the word it shows "There's a typo in the word 'XXX'" and hides the header tooltip.

Also when I position the cursor on empty value I don't get any tooltip - this actually defeats the main purpose of the tooltip, i.e. to give you a hint what value you are supposed to write.

Last but not least when selecting a value seems like all the columns and headers are marked as purple - regardless of the fact that they belong to separate blocks with separate headers (see screenshot).

All in all I think these issues can be addressed if the users were able to specify a list of block delimiters (like empty line, or the word COMMIT, or END).

Thank you for your hard work - I think this plugin is getting very nice :))

Foreground color change

Hi. I can't change foreground color for CSV file in Settings/Editor/Color Scheme/CSV. Only background color is allowed for change. Scheme is "Darcula". Any "untick inherited" for column 1-10. Help me please. Tom.

Window cannot be resized

When I split a window and open a csv file with CSV Editor on the right pane, I can't make the CSV Editor pane smaller. I can make the pane larger however. I am using GoLand on Debian.

This is what the editor looks like when I am unable to resize the pane.
CSV Editor

Indentation settings problem

I've already discussed this issue on the PhpStorms issue tracker before pinpointing the problem to this plugin, so i'll just do a very quick recap.

When setting the Tab Size/Indent to the default (4), PhpStorm will use the default value upon the next restart. But it seems like your plugin changes that default indentation size from 4 to 1, which means that I have to set those settings again on every startup.

These lines seem to be the cause, and i can understand what you wanted to do, but it sadly has the side effect that it also changes those settings for other files, e.g. smarty templates, which i edit on a daily basis.

Another seperator

Could you add a configuration item for another seperator? In my case a semicolon is needed.

Table Editor Headers

It would be nice if the Table-Editor's header (A,B,C,D...) would be replaced with the actual csv header

Missing dontate option

Sadly there is to method to apply dontations or wuerde to the author. Please provide option.

Escaped quotes

Escaped quotes produce a syntax error with this plugin.

0,"Hello \"World\"!",1

PhpStorm Issue

Hi, I have an issue in PHP Storm:
java.lang.NoClassDefFoundError: com/intellij/psi/PsiElementFactory$SERVICE

Thanks in advance for every kind of support.
Have a nice day!

Columns starting with =" cause validation error

I frequently need to edit the CSV files in Excel and for long numbers, ex 6006499647128636419, these show in Excel as 6.0065E+18.

In order to force Excel to interpret those numbers as text, the easiest way is to have them as ="6006499647128636419". Another way is to import the data in Excel → Data → Get external data, but that's too hard.. (more details here).

However, when I set the value as ="6006499647128636419" (with ="), there's a validation error in PyCharm (I imagine the same thing will happen in IntelliJ).

Could this be fixed and allow for ="<value>" entries?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.