From 6212a9b00d2a3fa311dd849592c4e4ce8d3ca18a Mon Sep 17 00:00:00 2001 From: GeeK Date: Tue, 17 Sep 2019 08:13:14 +0200 Subject: [PATCH] [INTERNAL] Resolve merge conflicts and revert changes towards v2019.2 --- .travis.yml | 10 +- README.md | 2 +- build.gradle | 4 +- .../plugins/csv/CsvFileTypeFactory.java | 12 ++ .../CsvEditorSettingsExternalizable.java | 1 + .../table/swing/MultiLineCellRenderer.java | 45 +++---- .../plugins/psv/PsvFileTypeFactory.java | 12 ++ .../plugins/tsv/TsvFileTypeFactory.java | 12 ++ src/main/resources/META-INF/plugin.xml | 118 +++++++++++++----- .../actions/CsvChangeSeparatorActionTest.java | 4 +- .../plugins/csv/editor/CsvAnnotatorTest.java | 4 +- .../editor/CsvEditorSettingsProviderTest.java | 4 +- .../plugins/csv/editor/CsvFileEditorTest.java | 4 +- .../table/CsvTableEditorProviderTest.java | 4 +- .../editor/table/CsvTableEditorStateTest.java | 4 +- .../table/api/TableDataChangeEventTest.java | 4 +- .../table/api/TableDataHandlerTest.java | 4 +- .../swing/CsvTableEditorSwingTestBase.java | 4 +- .../csv/formatter/CsvFormatterTest.java | 4 +- .../CsvHighlightUsagesHandlerTest.java | 4 +- .../csv/inspection/CsvInspectionTest.java | 4 +- .../csv/intention/CsvIntentionTest.java | 4 +- .../settings/CsvCodeStyleSettingsTest.java | 4 +- .../structureview/CsvStructureViewTest.java | 4 +- .../tsv/inspection/TsvInspectionTest.java | 4 +- 25 files changed, 190 insertions(+), 90 deletions(-) create mode 100644 src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvFileTypeFactory.java create mode 100644 src/main/java/net/seesharpsoft/intellij/plugins/psv/PsvFileTypeFactory.java create mode 100644 src/main/java/net/seesharpsoft/intellij/plugins/tsv/TsvFileTypeFactory.java diff --git a/.travis.yml b/.travis.yml index 4f4fbabb..62998912 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,10 @@ jdk: - openjdk8 env: - - IDEA_VERSION=IC-192.5728.98 GRAMMAR_KIT_VERSION=2017.1.6 - - IDEA_VERSION=PC-LATEST-EAP-SNAPSHOT GRAMMAR_KIT_VERSION=2017.1.6 + - 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.1.3 GRAMMAR_KIT_VERSION=2017.1.7 + - IDEA_VERSION=PC-LATEST-EAP-SNAPSHOT GRAMMAR_KIT_VERSION=07f30a1e7666f36ae780f614b6bbc89690ba36c3 script: xvfb-run gradle check @@ -14,9 +16,9 @@ after_success: jobs: include: - if: (branch = master AND type = push) OR (type = pull_request) - env: IDEA_VERSION=IC-192.5728.98 GRAMMAR_KIT_VERSION=2017.1.6 + env: IDEA_VERSION=IC-191.5701.16 GRAMMAR_KIT_VERSION=2017.1.7 script: xvfb-run gradle check verifyPlugin - stage: deploy if: branch IN (Testing, Staging, Stable) AND type = push - env: IDEA_VERSION=IC-192.5728.98 GRAMMAR_KIT_VERSION=2017.1.6 JI_CHANNELS=$TRAVIS_BRANCH + env: IDEA_VERSION=IC-191.5701.16 GRAMMAR_KIT_VERSION=2017.1.7 JI_CHANNELS=$TRAVIS_BRANCH script: xvfb-run gradle publishPlugin diff --git a/README.md b/README.md index e6a4533a..68549166 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ # 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. diff --git a/build.gradle b/build.gradle index 939809a6..502fc864 100644 --- a/build.gradle +++ b/build.gradle @@ -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.5728.98') + 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', '') diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvFileTypeFactory.java b/src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvFileTypeFactory.java new file mode 100644 index 00000000..53f851f6 --- /dev/null +++ b/src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvFileTypeFactory.java @@ -0,0 +1,12 @@ +package net.seesharpsoft.intellij.plugins.csv; + +import com.intellij.openapi.fileTypes.FileTypeConsumer; +import com.intellij.openapi.fileTypes.FileTypeFactory; +import org.jetbrains.annotations.NotNull; + +public class CsvFileTypeFactory extends FileTypeFactory { + @Override + public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) { + fileTypeConsumer.consume(CsvFileType.INSTANCE, String.join(FileTypeConsumer.EXTENSION_DELIMITER, new String[] {"csv"})); + } +} \ No newline at end of file diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvEditorSettingsExternalizable.java b/src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvEditorSettingsExternalizable.java index 6fd205e9..b029937b 100644 --- a/src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvEditorSettingsExternalizable.java +++ b/src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvEditorSettingsExternalizable.java @@ -243,6 +243,7 @@ public void setTableAutoColumnWidthOnOpen(boolean tableAutoColumnWidthOnOpen) { public boolean isAdvancedFontHandling() { return getState().ADVANCED_FONT_HANDLING; } + public void setAdvancedFontHandling(boolean advancedFontHandling) { getState().ADVANCED_FONT_HANDLING = advancedFontHandling; } diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table/swing/MultiLineCellRenderer.java b/src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table/swing/MultiLineCellRenderer.java index 39f15561..81adf36c 100644 --- a/src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table/swing/MultiLineCellRenderer.java +++ b/src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table/swing/MultiLineCellRenderer.java @@ -9,6 +9,7 @@ import com.intellij.util.ui.UIUtil; import net.seesharpsoft.intellij.plugins.csv.editor.CsvEditorSettingsExternalizable; import net.seesharpsoft.intellij.plugins.csv.settings.CsvColorSettings; +import org.jetbrains.annotations.NotNull; import javax.swing.*; import javax.swing.border.EmptyBorder; @@ -80,13 +81,13 @@ public Component getTableCellRendererComponent(JTable table, Object value, boole myTextArea.setBorder(new EmptyBorder(1, 2, 1, 2)); } + this.setText(value == null ? "" : value.toString()); + final int columnWidth = table.getColumnModel().getColumn(column).getWidth(); final int rowHeight = table.getRowHeight(row); - this.setFont(table.getFont()); + this.setSize(columnWidth, rowHeight); this.validate(); - myTextArea.setText((value == null) ? "" : value.toString()); - myTextArea.setFont(table.getFont()); myTextArea.setSize(columnWidth, rowHeight); myTextArea.validate(); @@ -118,30 +119,30 @@ public Object getCellEditorValue() { return myTextArea.getText(); } - @Override - public void setText(String text) { - if (CsvEditorSettingsExternalizable.getInstance().isAdvancedFontHandling()) { - setFont(determineFont(text)); - } - super.setText(text); + protected void setText(@NotNull String text) { + Font font = determineFont(text); + this.setFont(font); + myTextArea.setFont(font); + myTextArea.setText(text); } - public Font determineFont(String text) { - Font baseFont = UIUtil.getFontWithFallback(EditorColorsManager.getInstance().getGlobalScheme().getFont(EditorFontType.PLAIN)); - - FontFallbackIterator it = new FontFallbackIterator(); - it.setPreferredFont(baseFont.getFamily(), baseFont.getSize()); - it.setFontStyle(baseFont.getStyle()); - it.start(text, 0, text.length()); + protected Font determineFont(@NotNull String text) { + Font finalFont = UIUtil.getFontWithFallback(EditorColorsManager.getInstance().getGlobalScheme().getFont(EditorFontType.PLAIN)); - Font finalFont = baseFont; - for(; !it.atEnd(); it.advance()) { - Font font = it.getFont(); - if(!font.getFamily().equals(baseFont.getFamily())) { - finalFont = font; - break; + if (CsvEditorSettingsExternalizable.getInstance().isAdvancedFontHandling()) { + FontFallbackIterator it = new FontFallbackIterator(); + it.setPreferredFont(finalFont.getFamily(), finalFont.getSize()); + it.setFontStyle(finalFont.getStyle()); + it.start(text, 0, text.length()); + for (; !it.atEnd(); it.advance()) { + Font font = it.getFont(); + if (!font.getFamily().equals(finalFont.getFamily())) { + finalFont = font; + break; + } } } + return finalFont; } diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/psv/PsvFileTypeFactory.java b/src/main/java/net/seesharpsoft/intellij/plugins/psv/PsvFileTypeFactory.java new file mode 100644 index 00000000..f2f973a8 --- /dev/null +++ b/src/main/java/net/seesharpsoft/intellij/plugins/psv/PsvFileTypeFactory.java @@ -0,0 +1,12 @@ +package net.seesharpsoft.intellij.plugins.psv; + +import com.intellij.openapi.fileTypes.FileTypeConsumer; +import com.intellij.openapi.fileTypes.FileTypeFactory; +import org.jetbrains.annotations.NotNull; + +public class PsvFileTypeFactory extends FileTypeFactory { + @Override + public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) { + fileTypeConsumer.consume(PsvFileType.INSTANCE, String.join(FileTypeConsumer.EXTENSION_DELIMITER, new String[] {"psv"})); + } +} \ No newline at end of file diff --git a/src/main/java/net/seesharpsoft/intellij/plugins/tsv/TsvFileTypeFactory.java b/src/main/java/net/seesharpsoft/intellij/plugins/tsv/TsvFileTypeFactory.java new file mode 100644 index 00000000..1cf16007 --- /dev/null +++ b/src/main/java/net/seesharpsoft/intellij/plugins/tsv/TsvFileTypeFactory.java @@ -0,0 +1,12 @@ +package net.seesharpsoft.intellij.plugins.tsv; + +import com.intellij.openapi.fileTypes.FileTypeConsumer; +import com.intellij.openapi.fileTypes.FileTypeFactory; +import org.jetbrains.annotations.NotNull; + +public class TsvFileTypeFactory extends FileTypeFactory { + @Override + public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) { + fileTypeConsumer.consume(TsvFileType.INSTANCE, String.join(FileTypeConsumer.EXTENSION_DELIMITER, new String[] {"tsv", "tab"})); + } +} \ No newline at end of file diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 6b4aadaa..7acb27f7 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -7,28 +7,27 @@ The Table Editor is a newly introduced feature of CSV Plugin v2.*. Support its ongoing development by reporting issues, providing suggestions, contributing ideas/features or by just giving it a thumbs up.

+

Lightweight plugin for editing CSV/TSV/PSV files with a flexible table editor, syntax validation, structure highlighting, customizable coloring, new intentions and helpful inspections.




- - Lightweight CSV plugin that supports editing files in CSV/TSV format.

Features:
- TSV file support: TSV files are recognized as such but treated as a variant of CSV files, the same syntax highlighting and code style settings are applied. + TSV/PSV file support: TSV/PSV files are recognized as such but treated as a variant of CSV files, the same syntax highlighting and code style settings are applied.

Code formatting: Default code formatting is 'Tabularize'. Can be changed in Settings -> Editor -> Code Style -> CSV

@@ -46,37 +45,24 @@ -FIX: Index out of bound error on multi line clear cells #151 +NEW: add separator selection to table editor #140 +FIX: coloring of table cells (e.g. selection mode) +FIX: enter edit mode via keyboard (e.g. ENTER key in cell) ]]> - + com.intellij.modules.lang - - - + + + @@ -160,6 +146,77 @@ FIX: Index out of bound error on multi line clear cells #151 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/actions/CsvChangeSeparatorActionTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/actions/CsvChangeSeparatorActionTest.java index 29daaac1..e3ca18ab 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/actions/CsvChangeSeparatorActionTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/actions/CsvChangeSeparatorActionTest.java @@ -1,10 +1,10 @@ package net.seesharpsoft.intellij.plugins.csv.actions; import com.intellij.openapi.actionSystem.Presentation; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import net.seesharpsoft.intellij.plugins.csv.settings.CsvCodeStyleSettings; -public class CsvChangeSeparatorActionTest extends BasePlatformTestCase { +public class CsvChangeSeparatorActionTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvAnnotatorTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvAnnotatorTest.java index 7894e252..c08ed0e9 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvAnnotatorTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvAnnotatorTest.java @@ -14,7 +14,7 @@ import com.intellij.psi.search.GlobalSearchScope; import com.intellij.testFramework.EdtTestUtil; import com.intellij.testFramework.ExpectedHighlightingData; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import org.jetbrains.annotations.NotNull; import java.util.Collections; @@ -23,7 +23,7 @@ import static net.seesharpsoft.intellij.plugins.csv.editor.CsvAnnotator.CSV_COLUMN_INFO_SEVERITY; -public class CsvAnnotatorTest extends BasePlatformTestCase { +public class CsvAnnotatorTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvEditorSettingsProviderTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvEditorSettingsProviderTest.java index 5296ce29..dd9ec41b 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvEditorSettingsProviderTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvEditorSettingsProviderTest.java @@ -1,11 +1,11 @@ package net.seesharpsoft.intellij.plugins.csv.editor; import com.intellij.openapi.options.ConfigurationException; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import java.awt.*; -public class CsvEditorSettingsProviderTest extends BasePlatformTestCase { +public class CsvEditorSettingsProviderTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvFileEditorTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvFileEditorTest.java index 61ce6be3..39e18d13 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvFileEditorTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvFileEditorTest.java @@ -4,10 +4,10 @@ import com.intellij.openapi.fileEditor.*; import com.intellij.openapi.fileEditor.ex.FileEditorProviderManager; import com.intellij.openapi.fileEditor.impl.text.TextEditorState; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import org.jdom.Element; -public class CsvFileEditorTest extends BasePlatformTestCase { +public class CsvFileEditorTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableEditorProviderTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableEditorProviderTest.java index ef14562f..8e5a538d 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableEditorProviderTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableEditorProviderTest.java @@ -5,13 +5,13 @@ import com.intellij.openapi.fileEditor.FileEditorProvider; import com.intellij.openapi.fileEditor.FileEditorState; import com.intellij.openapi.fileEditor.ex.FileEditorProviderManager; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import net.seesharpsoft.intellij.plugins.csv.editor.CsvEditorSettingsExternalizable; import org.jdom.Element; import java.util.Objects; -public class CsvTableEditorProviderTest extends BasePlatformTestCase { +public class CsvTableEditorProviderTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableEditorStateTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableEditorStateTest.java index 687e2d76..62db1f80 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableEditorStateTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableEditorStateTest.java @@ -1,10 +1,10 @@ package net.seesharpsoft.intellij.plugins.csv.editor.table; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import net.seesharpsoft.intellij.plugins.csv.editor.CsvEditorSettingsExternalizable; import org.jdom.Element; -public class CsvTableEditorStateTest extends BasePlatformTestCase { +public class CsvTableEditorStateTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/api/TableDataChangeEventTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/api/TableDataChangeEventTest.java index a4f4e812..e8660002 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/api/TableDataChangeEventTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/api/TableDataChangeEventTest.java @@ -1,12 +1,12 @@ package net.seesharpsoft.intellij.plugins.csv.editor.table.api; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import org.junit.Test; import java.util.Arrays; -public class TableDataChangeEventTest extends BasePlatformTestCase { +public class TableDataChangeEventTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/api/TableDataHandlerTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/api/TableDataHandlerTest.java index c9a73a9b..d2e18d29 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/api/TableDataHandlerTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/api/TableDataHandlerTest.java @@ -1,13 +1,13 @@ package net.seesharpsoft.intellij.plugins.csv.editor.table.api; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditor; import net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing; import java.util.Arrays; -public class TableDataHandlerTest extends BasePlatformTestCase { +public class TableDataHandlerTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/swing/CsvTableEditorSwingTestBase.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/swing/CsvTableEditorSwingTestBase.java index d9148248..b2b5b6d1 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/swing/CsvTableEditorSwingTestBase.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/table/swing/CsvTableEditorSwingTestBase.java @@ -1,14 +1,14 @@ package net.seesharpsoft.intellij.plugins.csv.editor.table.swing; import com.intellij.testFramework.exceptionCases.AbstractExceptionCase; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import com.intellij.util.ThrowableRunnable; import net.seesharpsoft.intellij.plugins.csv.CsvHelper; import net.seesharpsoft.intellij.plugins.csv.editor.CsvEditorSettingsExternalizable; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -public abstract class CsvTableEditorSwingTestBase extends BasePlatformTestCase { +public abstract class CsvTableEditorSwingTestBase extends LightPlatformCodeInsightFixtureTestCase { protected CsvTableEditorSwing fileEditor; diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/formatter/CsvFormatterTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/formatter/CsvFormatterTest.java index ee36305f..b09effc7 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/formatter/CsvFormatterTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/formatter/CsvFormatterTest.java @@ -3,7 +3,7 @@ import com.intellij.openapi.command.WriteCommandAction; import com.intellij.psi.codeStyle.CodeStyleManager; import com.intellij.psi.codeStyle.CodeStyleSettingsManager; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import com.intellij.util.containers.ContainerUtil; import net.seesharpsoft.intellij.plugins.csv.settings.CsvCodeStyleSettings; import org.junit.Assert; @@ -12,7 +12,7 @@ import java.time.Instant; import java.util.Properties; -public class CsvFormatterTest extends BasePlatformTestCase { +public class CsvFormatterTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected void setUp() throws Exception { super.setUp(); diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/highlighter/CsvHighlightUsagesHandlerTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/highlighter/CsvHighlightUsagesHandlerTest.java index 80afd912..def94c36 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/highlighter/CsvHighlightUsagesHandlerTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/highlighter/CsvHighlightUsagesHandlerTest.java @@ -6,9 +6,9 @@ import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.markup.RangeHighlighter; import com.intellij.openapi.util.TextRange; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; -public class CsvHighlightUsagesHandlerTest extends BasePlatformTestCase { +public class CsvHighlightUsagesHandlerTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/inspection/CsvInspectionTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/inspection/CsvInspectionTest.java index 8cd09c11..a3d24e9e 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/inspection/CsvInspectionTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/inspection/CsvInspectionTest.java @@ -1,9 +1,9 @@ package net.seesharpsoft.intellij.plugins.csv.inspection; import com.intellij.codeInsight.intention.IntentionAction; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; -public class CsvInspectionTest extends BasePlatformTestCase { +public class CsvInspectionTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvIntentionTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvIntentionTest.java index ec59194b..0d22d0b0 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvIntentionTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvIntentionTest.java @@ -1,9 +1,9 @@ package net.seesharpsoft.intellij.plugins.csv.intention; import com.intellij.codeInsight.intention.IntentionAction; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; -public class CsvIntentionTest extends BasePlatformTestCase { +public class CsvIntentionTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvCodeStyleSettingsTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvCodeStyleSettingsTest.java index e9c8ba91..05ce9f4a 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvCodeStyleSettingsTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvCodeStyleSettingsTest.java @@ -1,8 +1,8 @@ package net.seesharpsoft.intellij.plugins.csv.settings; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; -public class CsvCodeStyleSettingsTest extends BasePlatformTestCase { +public class CsvCodeStyleSettingsTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/csv/structureview/CsvStructureViewTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/csv/structureview/CsvStructureViewTest.java index e0be33eb..b8c7fcd0 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/csv/structureview/CsvStructureViewTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/csv/structureview/CsvStructureViewTest.java @@ -3,10 +3,10 @@ import com.intellij.ide.structureView.StructureViewTreeElement; import com.intellij.ide.util.treeView.smartTree.TreeElement; import com.intellij.navigation.ItemPresentation; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import net.seesharpsoft.intellij.plugins.csv.editor.CsvEditorSettingsExternalizable; -public class CsvStructureViewTest extends BasePlatformTestCase{ +public class CsvStructureViewTest extends LightPlatformCodeInsightFixtureTestCase{ @Override protected String getTestDataPath() { diff --git a/src/test/java/net/seesharpsoft/intellij/plugins/tsv/inspection/TsvInspectionTest.java b/src/test/java/net/seesharpsoft/intellij/plugins/tsv/inspection/TsvInspectionTest.java index ba0d2d83..9240b305 100644 --- a/src/test/java/net/seesharpsoft/intellij/plugins/tsv/inspection/TsvInspectionTest.java +++ b/src/test/java/net/seesharpsoft/intellij/plugins/tsv/inspection/TsvInspectionTest.java @@ -1,10 +1,10 @@ package net.seesharpsoft.intellij.plugins.tsv.inspection; import com.intellij.codeInsight.intention.IntentionAction; -import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import net.seesharpsoft.intellij.plugins.csv.inspection.CsvValidationInspection; -public class TsvInspectionTest extends BasePlatformTestCase { +public class TsvInspectionTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() {