Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .bettercodehub.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
component_depth: 10
component_depth: 8
languages:
- java
- java
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2.3.1
Mar 31, 2019

NEW: use default color scheme font for table editor as well
FIX: ConcurrentModificationException tackled (table editor)

2.3.0
Mar 04, 2019

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://www.jetbrains.com/intellij-repository/snapshots

name='CSV Plugin'
pluginVersion=2.3.0
pluginVersion=2.3.1
javaVersion=1.8
javaTargetVersion=1.8
downloadIntellijSources=false
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.command.CommandProcessor;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.colors.EditorColorsManager;
import com.intellij.openapi.editor.colors.EditorFontType;
import com.intellij.openapi.fileEditor.*;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
Expand All @@ -27,6 +29,7 @@
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.awt.*;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.Collections;
Expand Down Expand Up @@ -295,6 +298,10 @@ public int getRowCount() {
return getDataHandler().getCurrentState().length;
}

public Font getFont() {
return EditorColorsManager.getInstance().getGlobalScheme().getFont(EditorFontType.PLAIN);
}

public int getColumnCount() {
Object[][] currentData = getDataHandler().getCurrentState();
return currentData.length > 0 ? currentData[0].length : 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URI;
import java.util.Vector;

public class CsvTableEditorActions extends CsvTableEditorUtilBase {

Expand Down Expand Up @@ -145,18 +144,6 @@ public void actionPerformed(ActionEvent e) {
}
}

private void removeColumn(DefaultTableModel tableModel, int column) {
int prevColumnCount = tableModel.getColumnCount();

Vector rows = tableModel.getDataVector();
for (Object row : rows) {
((Vector) row).remove(column);
}

tableModel.setColumnCount(prevColumnCount - 1);
tableModel.fireTableStructureChanged();
}

private final class DeleteColumnAction implements ActionListener {
@Override
public void actionPerformed(ActionEvent e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,88 +15,28 @@
<properties/>
<border type="none"/>
<children>
<toolbar id="92f32">
<grid id="911ca" layout-manager="GridBagLayout">
<constraints/>
<properties>
<floatable value="false"/>
</properties>
<properties/>
<border type="none"/>
<children>
<component id="157b0" class="javax.swing.JLabel" binding="lblErrorText">
<constraints/>
<properties>
<font size="12" style="1"/>
<foreground color="-65536"/>
<text value=" ATTENTION: Error while parsing content - please fix issues in text editor!"/>
</properties>
</component>
<component id="c77c9" class="javax.swing.JToolBar$Separator">
<constraints/>
<properties/>
</component>
<component id="8e338" class="com.intellij.ui.components.labels.LinkLabel" binding="lnkTextEditor" custom-create="true">
<constraints/>
<properties>
<horizontalTextPosition value="10"/>
<text value="Open file in text editor"/>
</properties>
</component>
<hspacer id="30d08">
<constraints/>
</hspacer>
<component id="58f74" class="javax.swing.JButton" binding="btnAddRowBefore">
<constraints/>
<constraints>
<grid row="0" column="4" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="0.0"/>
</constraints>
<properties>
<icon value="media/icons/add-row-before.png"/>
<text value=""/>
<toolTipText value="Add row before"/>
<visible value="false"/>
</properties>
</component>
<component id="83d80" class="javax.swing.JCheckBox" binding="cbFixedHeaders">
<constraints/>
<properties>
<contentAreaFilled value="false"/>
<horizontalTextPosition value="10"/>
<label value="Header row fixed:"/>
<text value="Header row fixed:"/>
</properties>
</component>
<component id="af7be" class="javax.swing.JToolBar$Separator">
<constraints/>
<properties/>
</component>
<component id="9bf69" class="javax.swing.JLabel" binding="lblTextlines">
<constraints/>
<properties>
<text value="Text-lines per row: "/>
</properties>
</component>
<component id="65e44" class="javax.swing.JComboBox" binding="comboRowHeight">
<constraints/>
<properties>
<maximumSize width="100" height="32767"/>
<model>
<item value="Auto"/>
<item value="1"/>
<item value="2"/>
<item value="3"/>
<item value="4"/>
<item value="5"/>
<item value="6"/>
<item value="7"/>
<item value="8"/>
<item value="9"/>
<item value="10"/>
</model>
</properties>
</component>
<component id="fb7e0" class="javax.swing.JToolBar$Separator">
<constraints/>
<properties/>
</component>
<component id="bcbc6" class="javax.swing.JButton" binding="btnAddRow">
<constraints/>
<constraints>
<grid row="0" column="5" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="0.0"/>
</constraints>
<properties>
<icon value="media/icons/add-row.png"/>
<maximumSize width="56" height="28"/>
Expand All @@ -107,7 +47,10 @@
</properties>
</component>
<component id="294f4" class="javax.swing.JButton" binding="btnRemoveRow">
<constraints/>
<constraints>
<grid row="0" column="6" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="0.0"/>
</constraints>
<properties>
<icon value="media/icons/remove-row.png"/>
<text value=""/>
Expand All @@ -116,7 +59,10 @@
</properties>
</component>
<component id="cc28c" class="javax.swing.JButton" binding="btnAddColumnBefore">
<constraints/>
<constraints>
<grid row="0" column="7" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="0.0"/>
</constraints>
<properties>
<icon value="media/icons/add-column-before.png"/>
<text value=""/>
Expand All @@ -125,7 +71,10 @@
</properties>
</component>
<component id="7de12" class="javax.swing.JButton" binding="btnAddColumn">
<constraints/>
<constraints>
<grid row="0" column="8" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="0.0"/>
</constraints>
<properties>
<icon value="media/icons/add-column.png"/>
<maximumSize width="56" height="28"/>
Expand All @@ -136,40 +85,119 @@
</properties>
</component>
<component id="a0fe5" class="javax.swing.JButton" binding="btnRemoveColumn">
<constraints/>
<constraints>
<grid row="0" column="9" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="0.0"/>
</constraints>
<properties>
<icon value="media/icons/remove-column.png"/>
<text value=""/>
<toolTipText value="Remove column"/>
<visible value="false"/>
</properties>
</component>
<component id="846c8" class="javax.swing.JToolBar$Separator">
<constraints/>
<grid id="46b01" layout-manager="FlowLayout" hgap="5" vgap="5" flow-align="1">
<constraints>
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="4" fill="0" indent="0" use-parent-layout="false"/>
<gridbag weightx="1.0" weighty="0.0"/>
</constraints>
<properties/>
</component>
<component id="484e4" class="javax.swing.JButton" binding="btnUndo">
<constraints/>
<border type="none"/>
<children>
<component id="83d80" class="javax.swing.JCheckBox" binding="cbFixedHeaders">
<constraints/>
<properties>
<contentAreaFilled value="false"/>
<horizontalTextPosition value="10"/>
<label value="Header row fixed:"/>
<text value="Header row fixed:"/>
</properties>
</component>
<component id="b81ce" class="javax.swing.JToolBar$Separator">
<constraints/>
<properties/>
</component>
<component id="9bf69" class="javax.swing.JLabel" binding="lblTextlines">
<constraints/>
<properties>
<text value="Text-lines per row: "/>
</properties>
</component>
<component id="65e44" class="javax.swing.JComboBox" binding="comboRowHeight">
<constraints/>
<properties>
<maximumSize width="100" height="32767"/>
<model>
<item value="Auto"/>
<item value="1"/>
<item value="2"/>
<item value="3"/>
<item value="4"/>
<item value="5"/>
<item value="6"/>
<item value="7"/>
<item value="8"/>
<item value="9"/>
<item value="10"/>
</model>
</properties>
</component>
<component id="8daaf" class="javax.swing.JToolBar$Separator">
<constraints/>
<properties/>
</component>
<component id="484e4" class="javax.swing.JButton" binding="btnUndo">
<constraints/>
<properties>
<icon value="actions/undo.png"/>
<maximumSize width="56" height="28"/>
<minimumSize width="56" height="28"/>
<preferredSize width="56" height="28"/>
<toolTipText value="Undo"/>
</properties>
</component>
<component id="e3fa2" class="javax.swing.JButton" binding="btnRedo">
<constraints/>
<properties>
<icon value="actions/redo.png"/>
<maximumSize width="56" height="28"/>
<minimumSize width="56" height="28"/>
<preferredSize width="56" height="28"/>
<toolTipText value="Redo"/>
</properties>
</component>
</children>
</grid>
<component id="8e338" class="com.intellij.ui.components.labels.LinkLabel" binding="lnkTextEditor" custom-create="true">
<constraints>
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
<gridbag weightx="0.0" weighty="0.0"/>
</constraints>
<properties>
<icon value="actions/undo.png"/>
<maximumSize width="56" height="28"/>
<minimumSize width="56" height="28"/>
<preferredSize width="56" height="28"/>
<toolTipText value="Undo"/>
<horizontalTextPosition value="10"/>
<text value="Open file in text editor"/>
</properties>
</component>
<component id="e3fa2" class="javax.swing.JButton" binding="btnRedo">
<constraints/>
<component id="157b0" class="javax.swing.JLabel" binding="lblErrorText">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
<gridbag weightx="0.0" weighty="0.0"/>
</constraints>
<properties>
<icon value="actions/redo.png"/>
<maximumSize width="56" height="28"/>
<minimumSize width="56" height="28"/>
<preferredSize width="56" height="28"/>
<toolTipText value="Redo"/>
<font size="12" style="1"/>
<foreground color="-65536"/>
<text value=" ATTENTION: Error while parsing content - please fix issues in text editor!"/>
</properties>
</component>
<component id="d8426" class="javax.swing.JToolBar$Separator">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<gridbag weightx="0.0" weighty="0.0"/>
</constraints>
<properties/>
</component>
</children>
</toolbar>
</grid>
</children>
</scrollpane>
<scrollpane id="6b9c5">
Expand Down
Loading