175 log.log(Level.SEVERE, "Unable to create an instance of formatter: " + fd.getName(), e); |
175 log.log(Level.SEVERE, "Unable to create an instance of formatter: " + fd.getName(), e); |
176 return false; |
176 return false; |
177 } |
177 } |
178 } |
178 } |
179 |
179 |
180 private void listFormatterProperties() { |
180 private void listFormatterProperties() throws FormatterException, ConfigurationException { |
181 for (String name : options.getFormatterNamesToListProperties()) { |
181 for (String formatterName : options.getFormatterNamesToListProperties()) { |
182 log.log(Level.SEVERE, "TODO: list formatter properties for {0}", name); |
182 listFormatterProperties(formatterName); |
183 } |
183 } |
|
184 } |
|
185 |
|
186 private void listFormatterProperties(String formatterName) throws FormatterException, ConfigurationException { |
|
187 ColumnsHeader header = constructHeader( |
|
188 new HeaderField("name", SQLType.VARCHAR), |
|
189 new HeaderField("type", SQLType.VARCHAR), |
|
190 new HeaderField("default", SQLType.VARCHAR), |
|
191 new HeaderField("description", SQLType.VARCHAR) |
|
192 ); |
|
193 List<Object[]> data = new ArrayList<>(); |
|
194 |
|
195 data.add(new Object[]{"TODO", "a", "b", "c"}); |
|
196 data.add(new Object[]{"TODO", "a", "b", "c"}); |
|
197 data.add(new Object[]{"TODO", "a", "b", "c"}); |
|
198 data.add(new Object[]{"TODO", "a", "b", "c"}); |
|
199 |
|
200 List<Parameter> parameters = new ArrayList<>(); |
|
201 parameters.add(new NamedParameter("formatter", formatterName, SQLType.VARCHAR)); |
|
202 |
|
203 printTable(formatter, header, "-- formatter properties", parameters, data); |
184 } |
204 } |
185 |
205 |
186 private void listTypes() throws FormatterException, ConfigurationException { |
206 private void listTypes() throws FormatterException, ConfigurationException { |
187 ColumnsHeader header = constructHeader(new HeaderField("name", SQLType.VARCHAR), new HeaderField("code", SQLType.INTEGER)); |
207 ColumnsHeader header = constructHeader(new HeaderField("name", SQLType.VARCHAR), new HeaderField("code", SQLType.INTEGER)); |
188 List<Object[]> data = new ArrayList<>(); |
208 List<Object[]> data = new ArrayList<>(); |