Browse Source

sql type to language type

tags/v1.1.0
Robin Thoni 7 years ago
parent
commit
dd9b4771ac

+ 64
- 7
src/com/rthoni/intellij/codefromds/business/Generator.java View File

1
 package com.rthoni.intellij.codefromds.business;
1
 package com.rthoni.intellij.codefromds.business;
2
 
2
 
3
 import com.intellij.database.model.DasForeignKey;
3
 import com.intellij.database.model.DasForeignKey;
4
+import com.intellij.database.model.DataType;
4
 import com.intellij.database.model.MultiRef;
5
 import com.intellij.database.model.MultiRef;
5
 import com.intellij.database.psi.DbDataSource;
6
 import com.intellij.database.psi.DbDataSource;
6
 import com.intellij.database.util.DasUtil;
7
 import com.intellij.database.util.DasUtil;
8
 import com.rthoni.intellij.codefromds.dbo.options.ColumnSelection;
9
 import com.rthoni.intellij.codefromds.dbo.options.ColumnSelection;
9
 import com.rthoni.intellij.codefromds.dbo.options.GenerateOptions;
10
 import com.rthoni.intellij.codefromds.dbo.options.GenerateOptions;
10
 import com.rthoni.intellij.codefromds.dbo.options.TableSelection;
11
 import com.rthoni.intellij.codefromds.dbo.options.TableSelection;
12
+import com.rthoni.intellij.codefromds.dbo.options.TypesCastOptions;
11
 import com.rthoni.intellij.codefromds.dbo.template.ColumnDataSourceDbo;
13
 import com.rthoni.intellij.codefromds.dbo.template.ColumnDataSourceDbo;
12
 import com.rthoni.intellij.codefromds.dbo.template.DataSourceDbo;
14
 import com.rthoni.intellij.codefromds.dbo.template.DataSourceDbo;
13
 import com.rthoni.intellij.codefromds.dbo.template.ForeignKeyDbo;
15
 import com.rthoni.intellij.codefromds.dbo.template.ForeignKeyDbo;
14
 import com.rthoni.intellij.codefromds.dbo.template.TableDataSourceDbo;
16
 import com.rthoni.intellij.codefromds.dbo.template.TableDataSourceDbo;
17
+import org.json.JSONArray;
15
 import org.json.JSONObject;
18
 import org.json.JSONObject;
16
 import org.jtwig.JtwigModel;
19
 import org.jtwig.JtwigModel;
17
 import org.jtwig.JtwigTemplate;
20
 import org.jtwig.JtwigTemplate;
44
 
47
 
45
     public static GenerateOptions loadOptions(String configPath) throws Exception
48
     public static GenerateOptions loadOptions(String configPath) throws Exception
46
     {
49
     {
47
-        String data = Files.readAllLines(Paths.get(configPath), StandardCharsets.UTF_8).stream().reduce("", (s1, s2) -> s1 + s2 + "\n");
50
+        String data = Helper.readFile(configPath);
48
 
51
 
49
         JSONObject obj = new JSONObject(data);
52
         JSONObject obj = new JSONObject(data);
50
         String src = obj.getJSONObject("selection").getString("source");
53
         String src = obj.getJSONObject("selection").getString("source");
81
         return dbo;
84
         return dbo;
82
     }
85
     }
83
 
86
 
84
-    public static ColumnDataSourceDbo convertColumn(ColumnSelection columnSelection)
87
+    public static ColumnDataSourceDbo convertColumn(ColumnSelection columnSelection, TypesCastOptions options)
85
     {
88
     {
86
         ColumnDataSourceDbo dbo = new ColumnDataSourceDbo();
89
         ColumnDataSourceDbo dbo = new ColumnDataSourceDbo();
87
         dbo.setName(columnSelection.getColumn().getName());
90
         dbo.setName(columnSelection.getColumn().getName());
88
         dbo.setPrimary(DasUtil.isPrimary(columnSelection.getColumn()));
91
         dbo.setPrimary(DasUtil.isPrimary(columnSelection.getColumn()));
89
         dbo.setSelected(columnSelection.isSelected());
92
         dbo.setSelected(columnSelection.isSelected());
93
+
94
+        DataType type = columnSelection.getColumn().getDataType();
95
+        boolean isArray = type.typeName.endsWith("[]");
96
+        String sqlTypeName = isArray ? type.typeName.substring(0, type.typeName.length() - 2) : type.typeName;
97
+        String typeName = type.typeName;
98
+        HashMap<String, HashMap<String, String>> types = options.getTypes();
99
+
100
+        if (types.containsKey(sqlTypeName)) {
101
+            HashMap<String, String> subtype = types.get(sqlTypeName);
102
+            if (subtype.containsKey(type.vagueArg)) {
103
+                typeName = subtype.get(type.vagueArg);
104
+            }
105
+            else if (subtype.containsKey("*")) {
106
+                typeName = subtype.get("*");
107
+            }
108
+        }
109
+        if (isArray) {
110
+            typeName = options.getArrayTemplate().replace("%t", typeName);
111
+        }
112
+        dbo.setType(typeName);
113
+
90
         return dbo;
114
         return dbo;
91
     }
115
     }
92
 
116
 
93
-    public static TableDataSourceDbo convertTable(TableSelection tableSelection)
117
+    public static TableDataSourceDbo convertTable(TableSelection tableSelection, TypesCastOptions types)
94
     {
118
     {
95
         TableDataSourceDbo dbo = new TableDataSourceDbo();
119
         TableDataSourceDbo dbo = new TableDataSourceDbo();
96
         dbo.setName(tableSelection.getTable().getName());
120
         dbo.setName(tableSelection.getTable().getName());
97
-        dbo.setColumns(tableSelection.getColumns().stream().map(Generator::convertColumn).collect(Collectors.toList()));
121
+        dbo.setColumns(tableSelection.getColumns().stream().map(c -> convertColumn(c, types)).collect(Collectors.toList()));
98
         dbo.setPrimaryKeys(dbo.getColumns().stream().filter(ColumnDataSourceDbo::isPrimary).collect(Collectors.toList()));
122
         dbo.setPrimaryKeys(dbo.getColumns().stream().filter(ColumnDataSourceDbo::isPrimary).collect(Collectors.toList()));
99
         dbo.setHasAny(!tableSelection.hasNone());
123
         dbo.setHasAny(!tableSelection.hasNone());
100
         dbo.setTargetForeignKeys(new Vector<>());
124
         dbo.setTargetForeignKeys(new Vector<>());
101
         return dbo;
125
         return dbo;
102
     }
126
     }
103
 
127
 
104
-    public static DataSourceDbo convertOptions(GenerateOptions options)
128
+    public static DataSourceDbo convertOptions(GenerateOptions options, TypesCastOptions types)
105
     {
129
     {
106
         DataSourceDbo dbo = new DataSourceDbo();
130
         DataSourceDbo dbo = new DataSourceDbo();
107
 
131
 
108
         dbo.setName(options.getSelection().getSource().getName());
132
         dbo.setName(options.getSelection().getSource().getName());
109
-        dbo.setTables(options.getSelection().getTables().stream().map(Generator::convertTable).collect(Collectors.toList()));
133
+        dbo.setTables(options.getSelection().getTables().stream().map(t -> convertTable(t, types)).collect(Collectors.toList()));
110
 
134
 
111
         List<TableDataSourceDbo> tables = dbo.getTables();
135
         List<TableDataSourceDbo> tables = dbo.getTables();
112
         List<TableSelection> tableSelections = options.getSelection().getTables();
136
         List<TableSelection> tableSelections = options.getSelection().getTables();
119
         return dbo;
143
         return dbo;
120
     }
144
     }
121
 
145
 
146
+    public static TypesCastOptions loadTypesCast(String file) throws IOException
147
+    {
148
+        TypesCastOptions dbo = new TypesCastOptions();
149
+        String data = Helper.readFile(file);
150
+
151
+        JSONObject obj = new JSONObject(data);
152
+        JSONObject objTypes = obj.getJSONObject("types");
153
+        HashMap<String, HashMap<String, String>> map = new HashMap<>();
154
+
155
+        for (String key : objTypes.keySet()) {
156
+            HashMap<String, String> typeMap = new HashMap<>();
157
+            String type = objTypes.optString(key);
158
+            JSONObject typeObject = objTypes.optJSONObject(key);
159
+            if (type != null) {
160
+                typeMap.put("*", type);
161
+            }
162
+            else if (typeObject != null) {
163
+                for (String subtype : typeObject.keySet()) {
164
+                    typeMap.put(subtype, typeObject.getString(subtype));
165
+                }
166
+            }
167
+            map.put(key, typeMap);
168
+        }
169
+        dbo.setTypes(map);
170
+
171
+        dbo.setArrayTemplate(obj.getString("arrayTemplate"));
172
+
173
+        return dbo;
174
+    }
175
+
122
     public static void generateFile(String templatePath, String outputFile, DataSourceDbo dataSource, TableDataSourceDbo table) throws IOException
176
     public static void generateFile(String templatePath, String outputFile, DataSourceDbo dataSource, TableDataSourceDbo table) throws IOException
123
     {
177
     {
124
         String data = Helper.readFile(templatePath);
178
         String data = Helper.readFile(templatePath);
138
         String modelsAbsolutePath = Helper.getAbsolutePath(project, options.getModelsRelativePath());
192
         String modelsAbsolutePath = Helper.getAbsolutePath(project, options.getModelsRelativePath());
139
         String dataSourceTemplateAbsolutePath = Helper.getAbsolutePath(project, options.getDataSourceTemplateRelativePath());
193
         String dataSourceTemplateAbsolutePath = Helper.getAbsolutePath(project, options.getDataSourceTemplateRelativePath());
140
         String modelsTemplateAbsolutePath = Helper.getAbsolutePath(project, options.getModelsTemplateRelativePath());
194
         String modelsTemplateAbsolutePath = Helper.getAbsolutePath(project, options.getModelsTemplateRelativePath());
195
+        String typesCastAbsolutePath = Helper.getAbsolutePath(project, options.getCastFileRelativePath());
196
+
197
+        TypesCastOptions types = loadTypesCast(typesCastAbsolutePath);
141
 
198
 
142
-        DataSourceDbo dbo = convertOptions(options);
199
+        DataSourceDbo dbo = convertOptions(options, types);
143
 
200
 
144
         generateFile(dataSourceTemplateAbsolutePath, modelsAbsolutePath + File.separator +
201
         generateFile(dataSourceTemplateAbsolutePath, modelsAbsolutePath + File.separator +
145
                 "Database." + options.getFilesExtension(), dbo, null);
202
                 "Database." + options.getFilesExtension(), dbo, null);

+ 5
- 1
src/com/rthoni/intellij/codefromds/business/Helper.java View File

61
     }
61
     }
62
 
62
 
63
     public static String readFile(String path) throws IOException {
63
     public static String readFile(String path) throws IOException {
64
-        return Files.readAllLines(Paths.get(path), StandardCharsets.UTF_8)
64
+        String data = Files.readAllLines(Paths.get(path), StandardCharsets.UTF_8)
65
                 .stream().reduce("", (s1, s2) -> s1 + s2 + "\n");
65
                 .stream().reduce("", (s1, s2) -> s1 + s2 + "\n");
66
+        if (data.startsWith("\uFEFF")) {
67
+            return data.substring(1);
68
+        }
69
+        return data;
66
     }
70
     }
67
 
71
 
68
     public static String getJsonString(JSONObject obj, String key, String defaultValue)
72
     public static String getJsonString(JSONObject obj, String key, String defaultValue)

+ 16
- 8
src/com/rthoni/intellij/codefromds/dbo/options/GenerateOptions.java View File

1
 package com.rthoni.intellij.codefromds.dbo.options;
1
 package com.rthoni.intellij.codefromds.dbo.options;
2
 
2
 
3
-import com.intellij.database.model.DasTable;
4
 import com.intellij.database.psi.DbDataSource;
3
 import com.intellij.database.psi.DbDataSource;
5
-import com.intellij.database.util.DasUtil;
6
 import com.rthoni.intellij.codefromds.business.Helper;
4
 import com.rthoni.intellij.codefromds.business.Helper;
7
 import org.json.JSONObject;
5
 import org.json.JSONObject;
8
 
6
 
9
 import java.io.File;
7
 import java.io.File;
10
 import java.util.HashMap;
8
 import java.util.HashMap;
11
-import java.util.List;
12
-import java.util.Vector;
13
-import java.util.stream.Collectors;
14
 
9
 
15
 /**
10
 /**
16
  * Created by robin on 11/15/16.
11
  * Created by robin on 11/15/16.
29
 
24
 
30
     private String _filesExtension;
25
     private String _filesExtension;
31
 
26
 
27
+    private String _castFileRelativePath;
28
+
32
     public GenerateOptions(DbDataSource source) {
29
     public GenerateOptions(DbDataSource source) {
33
         _modelsRelativePath = "Models";
30
         _modelsRelativePath = "Models";
34
-        _dataSourceTemplateRelativePath = "Templates" + File.separator + "DataSource.twig";
35
-        _modelsTemplateRelativePath = "Templates" + File.separator + "Models.twig";
36
-        _configAbsolutePath = source.getProject().getBasePath() + File.separator + "code-from-ds.json";
31
+        _dataSourceTemplateRelativePath = "code-from-ds" + File.separator + "DataSource.twig";
32
+        _modelsTemplateRelativePath = "code-from-ds" + File.separator + "Models.twig";
33
+        _configAbsolutePath = source.getProject().getBasePath() + File.separator + "code-from-ds" + File.separator + "code-from-ds.json";
37
         _filesExtension = "cs";
34
         _filesExtension = "cs";
35
+        _castFileRelativePath = "code-from-ds" + File.separator + "types-cast.json";
38
         _selection = new DataSourceSelection(source);
36
         _selection = new DataSourceSelection(source);
39
     }
37
     }
40
 
38
 
46
         map.put("dataSourceTemplateRelativePath", _dataSourceTemplateRelativePath);
44
         map.put("dataSourceTemplateRelativePath", _dataSourceTemplateRelativePath);
47
         map.put("modelsTemplateRelativePath", _modelsTemplateRelativePath);
45
         map.put("modelsTemplateRelativePath", _modelsTemplateRelativePath);
48
         map.put("filesExtension", _filesExtension);
46
         map.put("filesExtension", _filesExtension);
47
+        map.put("castFileRelativePath", _castFileRelativePath);
49
         map.put("selection", _selection == null ? null : new JSONObject(_selection.toMap()));
48
         map.put("selection", _selection == null ? null : new JSONObject(_selection.toMap()));
50
 
49
 
51
         return map;
50
         return map;
57
         _dataSourceTemplateRelativePath = Helper.getJsonString(json, "dataSourceTemplateRelativePath");
56
         _dataSourceTemplateRelativePath = Helper.getJsonString(json, "dataSourceTemplateRelativePath");
58
         _modelsTemplateRelativePath = Helper.getJsonString(json, "modelsTemplateRelativePath");
57
         _modelsTemplateRelativePath = Helper.getJsonString(json, "modelsTemplateRelativePath");
59
         _filesExtension = Helper.getJsonString(json, "filesExtension");
58
         _filesExtension = Helper.getJsonString(json, "filesExtension");
59
+        _castFileRelativePath = Helper.getJsonString(json, "castFileRelativePath");
60
         _selection.fromJson(json.getJSONObject("selection"));
60
         _selection.fromJson(json.getJSONObject("selection"));
61
     }
61
     }
62
 
62
 
107
     public void setFilesExtension(String filesExtension) {
107
     public void setFilesExtension(String filesExtension) {
108
         _filesExtension = filesExtension;
108
         _filesExtension = filesExtension;
109
     }
109
     }
110
+
111
+    public String getCastFileRelativePath() {
112
+        return _castFileRelativePath;
113
+    }
114
+
115
+    public void setCastFileRelativePath(String castFileRelativePath) {
116
+        _castFileRelativePath = castFileRelativePath;
117
+    }
110
 }
118
 }

+ 29
- 0
src/com/rthoni/intellij/codefromds/dbo/options/TypesCastOptions.java View File

1
+package com.rthoni.intellij.codefromds.dbo.options;
2
+
3
+import java.util.HashMap;
4
+
5
+/**
6
+ * Created by robin on 11/19/16.
7
+ */
8
+public class TypesCastOptions {
9
+
10
+    private String _arrayTemplate;
11
+
12
+    private HashMap<String, HashMap<String, String>> _types;
13
+
14
+    public String getArrayTemplate() {
15
+        return _arrayTemplate;
16
+    }
17
+
18
+    public void setArrayTemplate(String arrayTemplate) {
19
+        _arrayTemplate = arrayTemplate;
20
+    }
21
+
22
+    public HashMap<String, HashMap<String, String>> getTypes() {
23
+        return _types;
24
+    }
25
+
26
+    public void setTypes(HashMap<String, HashMap<String, String>> types) {
27
+        _types = types;
28
+    }
29
+}

+ 10
- 0
src/com/rthoni/intellij/codefromds/dbo/template/ColumnDataSourceDbo.java View File

11
 
11
 
12
     private boolean _isSelected;
12
     private boolean _isSelected;
13
 
13
 
14
+    private String _type;
15
+
14
     public String getName() {
16
     public String getName() {
15
         return _name;
17
         return _name;
16
     }
18
     }
34
     public void setSelected(boolean selected) {
36
     public void setSelected(boolean selected) {
35
         _isSelected = selected;
37
         _isSelected = selected;
36
     }
38
     }
39
+
40
+    public String getType() {
41
+        return _type;
42
+    }
43
+
44
+    public void setType(String type) {
45
+        _type = type;
46
+    }
37
 }
47
 }

+ 19
- 6
src/com/rthoni/intellij/codefromds/ui/dialogs/GenerateDialog.java View File

46
     private JLabel _lblDataSourceTemplatePath;
46
     private JLabel _lblDataSourceTemplatePath;
47
     private JLabel _lblModelsPath;
47
     private JLabel _lblModelsPath;
48
     private JLabel _lblModelsTemplatePath;
48
     private JLabel _lblModelsTemplatePath;
49
+    private TextFieldWithBrowseButton _textCastFile;
50
+    private JLabel _lblCastFile;
49
 
51
 
50
     private GenerateOptions _options;
52
     private GenerateOptions _options;
51
 
53
 
71
             _textDataSourceTemplate.setText(Helper.getAbsolutePath(_project, _options.getDataSourceTemplateRelativePath()));
73
             _textDataSourceTemplate.setText(Helper.getAbsolutePath(_project, _options.getDataSourceTemplateRelativePath()));
72
             _textModelsTemplate.setText(Helper.getAbsolutePath(_project, _options.getModelsTemplateRelativePath()));
74
             _textModelsTemplate.setText(Helper.getAbsolutePath(_project, _options.getModelsTemplateRelativePath()));
73
             _textFilesExtension.setText(_options.getFilesExtension());
75
             _textFilesExtension.setText(_options.getFilesExtension());
76
+            _textCastFile.setText(Helper.getAbsolutePath(_project, _options.getCastFileRelativePath()));
74
             _textConfigPath.setText(_options.getConfigAbsolutePath());
77
             _textConfigPath.setText(_options.getConfigAbsolutePath());
75
         }
78
         }
76
         else {
79
         else {
79
             _textDataSourceTemplate.setText("");
82
             _textDataSourceTemplate.setText("");
80
             _textModelsTemplate.setText("");
83
             _textModelsTemplate.setText("");
81
             _textFilesExtension.setText("");
84
             _textFilesExtension.setText("");
85
+            _textCastFile.setText("");
82
             _textConfigPath.setText("");
86
             _textConfigPath.setText("");
83
         }
87
         }
84
     }
88
     }
93
         File configPath = _options == null ? null : new File(_options.getConfigAbsolutePath());
97
         File configPath = _options == null ? null : new File(_options.getConfigAbsolutePath());
94
         File configDir = _options == null ? null : new File(configPath.getParent());
98
         File configDir = _options == null ? null : new File(configPath.getParent());
95
         String extension = _options == null ? null : _options.getFilesExtension();
99
         String extension = _options == null ? null : _options.getFilesExtension();
100
+        File castFilePath = _options == null ? null : new File(Helper.getAbsolutePath(_project, _options.getCastFileRelativePath()));
96
         if (_options == null) {
101
         if (_options == null) {
97
             info = new ValidationInfo("No Data Source Selected", _listDatasources);
102
             info = new ValidationInfo("No Data Source Selected", _listDatasources);
98
         }
103
         }
114
         else if (extension.startsWith(".")) {
119
         else if (extension.startsWith(".")) {
115
             info = new ValidationInfo("Files extension must not include dot (.)", _textFilesExtension);
120
             info = new ValidationInfo("Files extension must not include dot (.)", _textFilesExtension);
116
         }
121
         }
122
+        else if (!castFilePath.exists() || !castFilePath.isFile()) {
123
+            info = new ValidationInfo("Cast file does not exists", _textCastFile.getTextField());
124
+        }
117
 
125
 
118
         return info;
126
         return info;
119
     }
127
     }
148
             }
156
             }
149
         });
157
         });
150
 
158
 
151
-        setupTextField(_textModels, null, true);
152
-        setupTextField(_textDataSourceTemplate, null, false);
153
-        setupTextField(_textModelsTemplate, null, false);
154
-        setupTextField(_textConfigPath, null, false);
159
+        setupTextField(_textModels, null, true, "Models");
160
+        setupTextField(_textDataSourceTemplate, null, false, "Data Source Template");
161
+        setupTextField(_textModelsTemplate, null, false, "Models Template");
162
+        setupTextField(_textConfigPath, null, false, "Configuration");
163
+        setupTextField(_textCastFile, null, false, "Types Cast");
155
 
164
 
156
         setupTextFieldListener(_textModels.getTextField(), s -> {
165
         setupTextFieldListener(_textModels.getTextField(), s -> {
157
             _options.setModelsRelativePath(Helper.getRelativePath(_project, s));
166
             _options.setModelsRelativePath(Helper.getRelativePath(_project, s));
167
         });
176
         });
168
         setupTextFieldListener(_textFilesExtension, s -> _options.setFilesExtension(s));
177
         setupTextFieldListener(_textFilesExtension, s -> _options.setFilesExtension(s));
169
         setupTextFieldListener(_textConfigPath.getTextField(), s -> _options.setConfigAbsolutePath(s));
178
         setupTextFieldListener(_textConfigPath.getTextField(), s -> _options.setConfigAbsolutePath(s));
179
+        setupTextFieldListener(_textCastFile.getTextField(), s -> {
180
+            _options.setCastFileRelativePath(Helper.getRelativePath(_project, s));
181
+            _lblCastFile.setText("$ProjectRoot/" + _options.getCastFileRelativePath());
182
+        });
170
 
183
 
171
         _listTables.setCellRenderer(new ColoredListCellRenderer() {
184
         _listTables.setCellRenderer(new ColoredListCellRenderer() {
172
             @Override
185
             @Override
216
         });
229
         });
217
     }
230
     }
218
 
231
 
219
-    private void setupTextField(TextFieldWithBrowseButton field, Project project, boolean dirsOnly)
232
+    private void setupTextField(TextFieldWithBrowseButton field, Project project, boolean dirsOnly, String title)
220
     {
233
     {
221
         for (ActionListener l : field.getButton().getActionListeners()) {
234
         for (ActionListener l : field.getButton().getActionListeners()) {
222
             field.getButton().removeActionListener(l);
235
             field.getButton().removeActionListener(l);
223
         }
236
         }
224
-        field.addBrowseFolderListener("Choose Models Destination Folder", "Choose folder", project,
237
+        field.addBrowseFolderListener("Choose " + title + " " + (dirsOnly ? "Folder" : "File"), "Choose " + (dirsOnly ? "Folder" : "File"), project,
225
                 dirsOnly ? FileChooserDescriptorFactory.createSingleFolderDescriptor() : FileChooserDescriptorFactory.createSingleFileDescriptor());
238
                 dirsOnly ? FileChooserDescriptorFactory.createSingleFolderDescriptor() : FileChooserDescriptorFactory.createSingleFileDescriptor());
226
     }
239
     }
227
 
240
 

+ 27
- 5
src/com/rthoni/intellij/codefromds/ui/forms/GenerateForm.form View File

13
           <grid row="3" column="0" row-span="1" col-span="2" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
13
           <grid row="3" column="0" row-span="1" col-span="2" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
14
         </constraints>
14
         </constraints>
15
       </vspacer>
15
       </vspacer>
16
-      <grid id="6946b" layout-manager="GridLayoutManager" row-count="8" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
16
+      <grid id="6946b" layout-manager="GridLayoutManager" row-count="10" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
17
         <margin top="0" left="0" bottom="0" right="0"/>
17
         <margin top="0" left="0" bottom="0" right="0"/>
18
         <constraints>
18
         <constraints>
19
           <grid row="2" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
19
           <grid row="2" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
65
           </component>
65
           </component>
66
           <component id="22d0d" class="javax.swing.JLabel">
66
           <component id="22d0d" class="javax.swing.JLabel">
67
             <constraints>
67
             <constraints>
68
-              <grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
68
+              <grid row="9" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
69
             </constraints>
69
             </constraints>
70
             <properties>
70
             <properties>
71
               <text value="Configuration File:"/>
71
               <text value="Configuration File:"/>
73
           </component>
73
           </component>
74
           <component id="4c3cb" class="com.intellij.openapi.ui.TextFieldWithBrowseButton" binding="_textConfigPath">
74
           <component id="4c3cb" class="com.intellij.openapi.ui.TextFieldWithBrowseButton" binding="_textConfigPath">
75
             <constraints>
75
             <constraints>
76
-              <grid row="7" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
76
+              <grid row="9" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
77
             </constraints>
77
             </constraints>
78
             <properties/>
78
             <properties/>
79
           </component>
79
           </component>
103
           </component>
103
           </component>
104
           <component id="c0c9e" class="javax.swing.JLabel">
104
           <component id="c0c9e" class="javax.swing.JLabel">
105
             <constraints>
105
             <constraints>
106
-              <grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
106
+              <grid row="8" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
107
             </constraints>
107
             </constraints>
108
             <properties>
108
             <properties>
109
               <text value="Files extension:"/>
109
               <text value="Files extension:"/>
111
           </component>
111
           </component>
112
           <component id="880ce" class="javax.swing.JTextField" binding="_textFilesExtension">
112
           <component id="880ce" class="javax.swing.JTextField" binding="_textFilesExtension">
113
             <constraints>
113
             <constraints>
114
-              <grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
114
+              <grid row="8" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
115
                 <preferred-size width="150" height="-1"/>
115
                 <preferred-size width="150" height="-1"/>
116
               </grid>
116
               </grid>
117
             </constraints>
117
             </constraints>
118
             <properties/>
118
             <properties/>
119
           </component>
119
           </component>
120
+          <component id="3cbf6" class="javax.swing.JLabel">
121
+            <constraints>
122
+              <grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
123
+            </constraints>
124
+            <properties>
125
+              <text value="Type Cast File:"/>
126
+            </properties>
127
+          </component>
128
+          <component id="853dd" class="com.intellij.openapi.ui.TextFieldWithBrowseButton" binding="_textCastFile">
129
+            <constraints>
130
+              <grid row="6" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
131
+            </constraints>
132
+            <properties/>
133
+          </component>
134
+          <component id="8682b" class="javax.swing.JLabel" binding="_lblCastFile">
135
+            <constraints>
136
+              <grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
137
+            </constraints>
138
+            <properties>
139
+              <text value="$ProjectRoot/"/>
140
+            </properties>
141
+          </component>
120
         </children>
142
         </children>
121
       </grid>
143
       </grid>
122
       <grid id="39adc" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
144
       <grid id="39adc" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">

Loading…
Cancel
Save