Skip to content

Commit 50e5529

Browse files
committed
version 0.9.5
1 parent db6e04d commit 50e5529

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed

resources/META-INF/plugin.xml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
11
<idea-plugin>
22
<id>com.mighty16.json.kotlin.class</id>
33
<name>Generate Kotlin data classes from JSON</name>
4-
<version>0.8.7</version>
4+
<version>0.9.5</version>
55
<vendor email="[email protected]">Mighty16</vendor>
66

7-
<description>Plugin generates Kotlin data classes from JSON text. It can find inner classes in nested JSON. You can disable undesirable fields in class, change field name and type and add Gson annotations.</description>
7+
<description><![CDATA[Plugin generates Kotlin data classes from JSON text.
8+
It can find inner classes in nested JSON. You can disable undesirable fields in class,
9+
change field name, set it's type to optional, specify default value and add annotations for popular json
10+
libraries.<br><br>
811
9-
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
10-
<idea-version since-build="145.0"/>
12+
Features:<br><br>
13+
14+
• json highlight and validation<br>
15+
• nested json parsing<br>
16+
• var/val support<br>
17+
• default value support<br>
18+
• generation to single file<br>
19+
• annotations for Gson, Moshi, Jackson<br><br>
1120
12-
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
13-
on how to target different products -->
14-
<!-- uncomment to enable plugin in all products
15-
<depends>com.intellij.modules.lang</depends>
16-
-->
21+
If you like this plugin please rate it or give it a star on
22+
<a href="https://github.com/Mighty16/JSONToKotlinClass">GitHub page</a>
23+
<br><br>
24+
If you have any questions or suggestions let me know
25+
<a href="mailto:[email protected]">[email protected]</a>]]>
26+
</description>
27+
28+
<idea-version since-build="145.0"/>
1729

1830
<extensions defaultExtensionNs="com.intellij">
19-
<!-- Add your extensions here -->
2031
</extensions>
2132

2233
<actions>

src/com/mighty16/json/ClassFromJSONAction.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ public ClassFromJSONAction() {
4242

4343
@Override
4444
public void actionPerformed(AnActionEvent event) {
45-
4645
languageResolver = new KotlinResolver();
47-
4846
Project project = event.getProject();
4947
if (project == null) return;
5048
dataContext = event.getDataContext();
@@ -53,21 +51,15 @@ public void actionPerformed(AnActionEvent event) {
5351
final Navigatable navigatable = DataKeys.NAVIGATABLE.getData(dataContext);
5452

5553
if (navigatable != null) {
56-
System.out.println("Navigatable: " + navigatable);
5754
if (navigatable instanceof PsiDirectory) {
5855
directory = (PsiDirectory) navigatable;
59-
//System.out.println("Directory: " + directory.getName());
60-
//packages = new ArrayList<>();
61-
//findPackages(directory);
62-
//Collections.sort(packages);
6356
}
6457
}
6558

6659
if (directory == null) {
6760
ModuleRootManager root = ModuleRootManager.getInstance(module);
6861
for (VirtualFile file : root.getSourceRoots()) {
6962
directory = PsiManager.getInstance(project).findDirectory(file);
70-
System.out.println("Directory: " + directory.getName());
7163
}
7264
}
7365

@@ -78,6 +70,7 @@ public void componentMoved(ComponentEvent e) {
7870
}
7971
});
8072
dialog.setSize(640, 480);
73+
dialog.setLocationRelativeTo(null);
8174
dialog.setVisible(true);
8275
}
8376

src/com/mighty16/json/ui/ModelTableDialog.form

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
<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"/>
143143
</constraints>
144144
<properties>
145-
<selected value="true"/>
145+
<selected value="false"/>
146146
<text value="Gson"/>
147147
</properties>
148148
</component>
@@ -175,6 +175,7 @@
175175
<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"/>
176176
</constraints>
177177
<properties>
178+
<selected value="true"/>
178179
<text value="None"/>
179180
</properties>
180181
</component>

0 commit comments

Comments
 (0)