@Test public void addDataTypes() { tested.dataTypes = new TreeMap<>(); List<String> dataTypes1 = new ArrayList<>(); dataTypes1.add("test1"); List<String> dataTypes2 = new ArrayList<>(); dataTypes2.add("org.test.test2"); tested.addDataTypes(dataTypes1, false); tested.addDataTypes(dataTypes2, true); assertEquals(2, tested.dataTypes.size()); assertTrue(tested.dataTypes.containsKey("test1")); assertTrue(tested.dataTypes.containsKey("org.test.test2")); assertTrue(tested.dataTypes.containsValue("test1")); assertTrue(tested.dataTypes.containsValue("test2 [org.test]")); }
protected void addDataTypes(List<String> dataTypesList, boolean useDisplayNames) { for (String dataType : dataTypesList) { String displayName = useDisplayNames ? createDataTypeDisplayName(dataType) : dataType; dataTypes.put(dataType, displayName); } }
DefaultImportsEditorWidget extends ImportsEditorWidget<DefaultImport> { protected void addDataTypes(List<String> dataTypesList, boolean useDisplayNames) { for (String dataType : dataTypesList) { String displayName = useDisplayNames ? createDataTypeDisplayName(dataType) : dataType; dataTypes.put(dataType, displayName); } } }
DefaultImportsEditorWidget extends ImportsEditorWidget<DefaultImport> { protected void addDataTypes(List<String> dataTypesList, boolean useDisplayNames) { for (String dataType : dataTypesList) { String displayName = useDisplayNames ? createDataTypeDisplayName(dataType) : dataType; dataTypes.put(dataType, displayName); } } @Inject  DefaultImportsEditorWidget(final SessionManager sessionManager,
                                      final DataTypeNamesService dataTypeNamesService,
                                      final Event<NotificationEvent> notification); }
DefaultImportsEditorWidget extends ImportsEditorWidget<DefaultImport> { protected void addDataTypes(List<String> dataTypesList, boolean useDisplayNames) { for (String dataType : dataTypesList) { String displayName = useDisplayNames ? createDataTypeDisplayName(dataType) : dataType; dataTypes.put(dataType, displayName); } } @Inject  DefaultImportsEditorWidget(final SessionManager sessionManager,
                                      final DataTypeNamesService dataTypeNamesService,
                                      final Event<NotificationEvent> notification); Map<String, String> getDataTypes(); String getDataType(String displayName); @Override DefaultImport createImport(); }
DefaultImportsEditorWidget extends ImportsEditorWidget<DefaultImport> { protected void addDataTypes(List<String> dataTypesList, boolean useDisplayNames) { for (String dataType : dataTypesList) { String displayName = useDisplayNames ? createDataTypeDisplayName(dataType) : dataType; dataTypes.put(dataType, displayName); } } @Inject  DefaultImportsEditorWidget(final SessionManager sessionManager,
                                      final DataTypeNamesService dataTypeNamesService,
                                      final Event<NotificationEvent> notification); Map<String, String> getDataTypes(); String getDataType(String displayName); @Override DefaultImport createImport();  }