Skip to content

Commit bc4e708

Browse files
authoredDec 29, 2024
Merge pull request #891 from SeeSharpSoft/feat_402
Release 4.0.2
2 parents 267bf37 + 19989e8 commit bc4e708

File tree

9 files changed

+66
-42
lines changed

9 files changed

+66
-42
lines changed
 

‎CHANGELOG.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,18 @@
1010

1111
### Fixed
1212

13-
## [4.0.1] - Dec 08, 2024
13+
## [4.0.2] - Dec 29, 2024
14+
15+
### Added
16+
17+
- Localization support for actions
18+
19+
### Fixed
20+
21+
- Usage of correct resource bundle
22+
- NotNull parameter 'parent' of getFirstChildOfType #886
23+
24+
## 4.0.1 - Dec 08, 2024
1425

1526
### Added
1627

‎gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
pluginName=CSV Editor
66
pluginId=net.seesharpsoft.intellij.plugins.csv
7-
pluginVersion=4.0.1
7+
pluginVersion=4.0.2
88

99
pluginSinceBuild=242
1010

‎src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvPlugin.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package net.seesharpsoft.intellij.plugins.csv;
22

3+
import com.intellij.DynamicBundle;
34
import com.intellij.ide.BrowserUtil;
45
import com.intellij.ide.actions.ShowSettingsUtilImpl;
56
import com.intellij.ide.plugins.IdeaPluginDescriptor;
67
import com.intellij.ide.plugins.PluginManagerCore;
8+
import com.intellij.lang.properties.ResourceBundleManager;
79
import com.intellij.notification.*;
810
import com.intellij.openapi.extensions.PluginId;
911
import com.intellij.openapi.progress.ProgressIndicator;
@@ -114,7 +116,7 @@ public void run(@NotNull ProgressIndicator progressIndicator) {
114116

115117
public static ResourceBundle getResourceBundle() {
116118
if (_resourceBundle == null) {
117-
_resourceBundle = ResourceBundle.getBundle("i18n/CSVEditorResources");
119+
_resourceBundle = DynamicBundle.getPluginBundle(getPluginDescriptor()); //ResourceBundle.getBundle("localization/CSVEditorResources", DynamicBundle.getLocale());
118120
}
119121
return _resourceBundle;
120122
}

‎src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table/CsvTableModelBase.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ private void resetCachedValues() {
9292
}
9393

9494
private void resetPointer() {
95-
myPointedRecord = PsiHelper.getFirstChildOfType(getPsiFile(), CsvRecord.class);
95+
PsiFile psiFile = getPsiFile();
96+
myPointedRecord = psiFile == null ? null : PsiHelper.getFirstChildOfType(psiFile, CsvRecord.class);
9697
myPointedRow = 0;
9798
}
9899

‎src/main/java/net/seesharpsoft/intellij/plugins/csv/editor/table/swing/CsvTableEditorSwing.form

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</constraints>
2727
<properties>
2828
<horizontalTextPosition value="10"/>
29-
<text resource-bundle="i18n/CSVEditorResources" key="open.file.in.text.editor"/>
29+
<text resource-bundle="localization/CsvEditorResources" key="open.file.in.text.editor"/>
3030
</properties>
3131
</component>
3232
<component id="157b0" class="javax.swing.JLabel" binding="lblErrorText">
@@ -37,7 +37,7 @@
3737
<properties>
3838
<font size="12" style="1"/>
3939
<foreground color="-65536"/>
40-
<text resource-bundle="i18n/CSVEditorResources" key="error.while.parsing.content.please.fix.issues.in.text.editor"/>
40+
<text resource-bundle="localization/CsvEditorResources" key="error.while.parsing.content.please.fix.issues.in.text.editor"/>
4141
</properties>
4242
</component>
4343
<component id="d8426" class="javax.swing.JToolBar$Separator">

‎src/main/java/net/seesharpsoft/intellij/plugins/csv/settings/CsvEditorSettingsProvider.form

+23-23
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@
1919
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
2020
</constraints>
2121
<properties/>
22-
<border type="line" title-resource-bundle="i18n/CSVEditorResources" title-key="text.editor"/>
22+
<border type="line" title-resource-bundle="localization/CsvEditorResources" title-key="text.editor"/>
2323
<children>
2424
<grid id="d2422" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
2525
<margin top="10" left="10" bottom="10" right="10"/>
2626
<constraints>
2727
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
2828
</constraints>
2929
<properties/>
30-
<border type="etched" title-resource-bundle="i18n/CSVEditorResources" title-key="highlighting"/>
30+
<border type="etched" title-resource-bundle="localization/CsvEditorResources" title-key="highlighting"/>
3131
<children>
3232
<component id="a9e55" class="javax.swing.JCheckBox" binding="cbCaretRowShown">
3333
<constraints>
3434
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
3535
</constraints>
3636
<properties>
37-
<text resource-bundle="i18n/CSVEditorResources" key="highlight.caret.row"/>
37+
<text resource-bundle="localization/CsvEditorResources" key="highlight.caret.row"/>
3838
</properties>
3939
</component>
4040
<component id="57ffb" class="com.intellij.ui.CheckBoxWithColorChooser" binding="cbTabHighlightColor" custom-create="true">
@@ -51,14 +51,14 @@
5151
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
5252
</constraints>
5353
<properties/>
54-
<border type="etched" title-resource-bundle="i18n/CSVEditorResources" title-key="others"/>
54+
<border type="etched" title-resource-bundle="localization/CsvEditorResources" title-key="others"/>
5555
<children>
5656
<component id="6fb36" class="javax.swing.JCheckBox" binding="cbUseSoftWraps">
5757
<constraints>
5858
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
5959
</constraints>
6060
<properties>
61-
<text resource-bundle="i18n/CSVEditorResources" key="use.soft.wraps"/>
61+
<text resource-bundle="localization/CsvEditorResources" key="use.soft.wraps"/>
6262
</properties>
6363
</component>
6464
<hspacer id="d39ae">
@@ -71,15 +71,15 @@
7171
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
7272
</constraints>
7373
<properties>
74-
<text resource-bundle="i18n/CSVEditorResources" key="show.info.balloon"/>
74+
<text resource-bundle="localization/CsvEditorResources" key="show.info.balloon"/>
7575
</properties>
7676
</component>
7777
<component id="8ed01" class="javax.swing.JCheckBox" binding="cbKeepTrailingWhitespaces">
7878
<constraints>
7979
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
8080
</constraints>
8181
<properties>
82-
<text resource-bundle="i18n/CSVEditorResources" key="keep.trailing.whitespaces.if.unchecked.general.editor.setting.apply"/>
82+
<text resource-bundle="localization/CsvEditorResources" key="keep.trailing.whitespaces.if.unchecked.general.editor.setting.apply"/>
8383
</properties>
8484
</component>
8585
</children>
@@ -92,14 +92,14 @@
9292
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
9393
</constraints>
9494
<properties/>
95-
<border type="line" title-resource-bundle="i18n/CSVEditorResources" title-key="table.editor"/>
95+
<border type="line" title-resource-bundle="localization/CsvEditorResources" title-key="table.editor"/>
9696
<children>
9797
<component id="d6a8e" class="javax.swing.JCheckBox" binding="cbQuotingEnforced">
9898
<constraints>
9999
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
100100
</constraints>
101101
<properties>
102-
<text resource-bundle="i18n/CSVEditorResources" key="enforce.value.quoting"/>
102+
<text resource-bundle="localization/CsvEditorResources" key="enforce.value.quoting"/>
103103
</properties>
104104
</component>
105105
<grid id="8ebb6" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
@@ -116,7 +116,7 @@
116116
</constraints>
117117
<properties>
118118
<labelFor value="c75c8"/>
119-
<text resource-bundle="i18n/CSVEditorResources" key="default.row.height.in.px"/>
119+
<text resource-bundle="localization/CsvEditorResources" key="default.row.height.in.px"/>
120120
</properties>
121121
</component>
122122
<hspacer id="48a70">
@@ -148,7 +148,7 @@
148148
</constraints>
149149
<properties>
150150
<labelFor value="15921"/>
151-
<text resource-bundle="i18n/CSVEditorResources" key="default.column.width.in.px"/>
151+
<text resource-bundle="localization/CsvEditorResources" key="default.column.width.in.px"/>
152152
</properties>
153153
</component>
154154
<component id="15921" class="javax.swing.JFormattedTextField" binding="tfDefaultColumnWidth" custom-create="true">
@@ -180,7 +180,7 @@
180180
</constraints>
181181
<properties>
182182
<labelFor value="8554c"/>
183-
<text resource-bundle="i18n/CSVEditorResources" key="maximum.column.width.in.px"/>
183+
<text resource-bundle="localization/CsvEditorResources" key="maximum.column.width.in.px"/>
184184
</properties>
185185
</component>
186186
<component id="8554c" class="javax.swing.JFormattedTextField" binding="tfMaxColumnWidth" custom-create="true">
@@ -211,7 +211,7 @@
211211
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
212212
</constraints>
213213
<properties/>
214-
<border type="line" title-resource-bundle="i18n/CSVEditorResources" title-key="general"/>
214+
<border type="line" title-resource-bundle="localization/CsvEditorResources" title-key="general"/>
215215
<children>
216216
<grid id="95245" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
217217
<margin top="0" left="0" bottom="0" right="0"/>
@@ -227,7 +227,7 @@
227227
</constraints>
228228
<properties>
229229
<labelFor value="a6cd2"/>
230-
<text resource-bundle="i18n/CSVEditorResources" key="editor.usage"/>
230+
<text resource-bundle="localization/CsvEditorResources" key="editor.usage"/>
231231
</properties>
232232
</component>
233233
<hspacer id="7d495">
@@ -249,7 +249,7 @@
249249
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
250250
</constraints>
251251
<properties>
252-
<toolTipText resource-bundle="i18n/CSVEditorResources" key="can.be.adjusted.per.file.in.editor.context.menu"/>
252+
<toolTipText resource-bundle="localization/CsvEditorResources" key="can.be.adjusted.per.file.in.editor.context.menu"/>
253253
</properties>
254254
<border type="none"/>
255255
<children>
@@ -259,7 +259,7 @@
259259
</constraints>
260260
<properties>
261261
<labelFor value="65f7"/>
262-
<text resource-bundle="i18n/CSVEditorResources" key="default.value.separator.csv.only"/>
262+
<text resource-bundle="localization/CsvEditorResources" key="default.value.separator.csv.only"/>
263263
</properties>
264264
</component>
265265
<hspacer id="f2aa1">
@@ -280,7 +280,7 @@
280280
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
281281
</constraints>
282282
<properties>
283-
<text resource-bundle="i18n/CSVEditorResources" key="auto.detect.initially"/>
283+
<text resource-bundle="localization/CsvEditorResources" key="auto.detect.initially"/>
284284
</properties>
285285
</component>
286286
</children>
@@ -291,7 +291,7 @@
291291
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
292292
</constraints>
293293
<properties>
294-
<toolTipText resource-bundle="i18n/CSVEditorResources" key="can.be.adjusted.per.file.in.editor.context.menu"/>
294+
<toolTipText resource-bundle="localization/CsvEditorResources" key="can.be.adjusted.per.file.in.editor.context.menu"/>
295295
</properties>
296296
<border type="none"/>
297297
<children>
@@ -301,7 +301,7 @@
301301
</constraints>
302302
<properties>
303303
<labelFor value="667ea"/>
304-
<text resource-bundle="i18n/CSVEditorResources" key="default.escape.character"/>
304+
<text resource-bundle="localization/CsvEditorResources" key="default.escape.character"/>
305305
</properties>
306306
</component>
307307
<hspacer id="e381f">
@@ -331,7 +331,7 @@
331331
</constraints>
332332
<properties>
333333
<labelFor value="a30e"/>
334-
<text resource-bundle="i18n/CSVEditorResources" key="line.comment.indicator"/>
334+
<text resource-bundle="localization/CsvEditorResources" key="line.comment.indicator"/>
335335
</properties>
336336
</component>
337337
<component id="a30e" class="javax.swing.JTextField" binding="tfCommentIndicator">
@@ -362,7 +362,7 @@
362362
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
363363
</constraints>
364364
<properties>
365-
<text resource-bundle="i18n/CSVEditorResources" key="column.numbering"/>
365+
<text resource-bundle="localization/CsvEditorResources" key="column.numbering"/>
366366
</properties>
367367
</component>
368368
<hspacer id="c1561">
@@ -375,7 +375,7 @@
375375
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
376376
</constraints>
377377
<properties>
378-
<text resource-bundle="i18n/CSVEditorResources" key="zero.based"/>
378+
<text resource-bundle="localization/CsvEditorResources" key="zero.based"/>
379379
</properties>
380380
</component>
381381
</children>
@@ -394,7 +394,7 @@
394394
</constraints>
395395
<properties>
396396
<labelFor value="2e9e9"/>
397-
<text resource-bundle="i18n/CSVEditorResources" key="value.coloring"/>
397+
<text resource-bundle="localization/CsvEditorResources" key="value.coloring"/>
398398
</properties>
399399
</component>
400400
<component id="2e9e9" class="javax.swing.JComboBox" binding="comboValueColoring" custom-create="true">

0 commit comments

Comments
 (0)