test_class.declarator: view
test_class.modifier: @Mock
test_class.original_string: @Mock MapEditor.View view;
test_class.type: MapEditor.View
test_class.var_name: view
test_class.declarator: valueChangeEvent
test_class.modifier: @Mock
test_class.original_string: @Mock EventSourceMock<ValueChangeEvent<Map<String, String>>> valueChangeEvent;
test_class.type: EventSourceMock<ValueChangeEvent<Map<String, String>>>
test_class.var_name: valueChangeEvent
test_class.declarator: presenter
test_class.modifier: private
test_class.original_string: private MapEditor presenter;
test_class.type: MapEditor
test_class.var_name: presenter
test_class.file: dashbuilder-client/dashbuilder-common-client/src/test/java/org/dashbuilder/common/client/editor/map/MapEditorTest.java
test_class.identifier: MapEditorTest
test_class.superclass: extends AbstractEditorTest
test_case.body: @Test
      public void testShowErrors() throws Exception {
          EditorError e1 = mockEditorError(presenter, "m1");
          EditorError e2 = mockEditorError(presenter, "m2");
          List<EditorError> errors = new ArrayList<EditorError>(2);
          errors.add(e1);
          errors.add(e2);
          presenter.showErrors(errors);
          final ArgumentCaptor<SafeHtml> errorSafeHtmlCaptor =  ArgumentCaptor.forClass(SafeHtml.class);
          verify(view, times(1)).showError(errorSafeHtmlCaptor.capture());
          verify(view, times(0)).clearError();
          verify(view, times(0)).init(presenter);
          verify(view, times(0)).setAddText(anyString());
          verify(view, times(0)).setEmptyText(anyString());
          verify(view, times(0)).addButtonColumn(anyInt(), anyString(), anyInt());
          verify(view, times(0)).addTextColumn(anyInt(), anyString(), anyBoolean(), anyInt());
          verify(view, times(0)).setData(anyList());
          verify(view, times(0)).setRowCount(anyInt());
          verify(view, times(0)).removeColumn(anyInt());
          final SafeHtml value = errorSafeHtmlCaptor.getValue();
          Assert.assertEquals("m1\nm2", value.asString());
      }
test_case.class_method_signature: MapEditorTest.testShowErrors()
test_case.full_signature: @Test public void testShowErrors()
test_case.identifier: testShowErrors
test_case.invocations: mockEditorError mockEditorError add add showErrors forClass showError verify times capture clearError verify times init verify times setAddText verify times anyString setEmptyText verify times anyString addButtonColumn verify times anyInt anyString anyInt addTextColumn verify times anyInt anyString anyBoolean anyInt setData verify times anyList setRowCount verify times anyInt removeColumn verify times anyInt getValue assertEquals asString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testShowErrors()
focal_class.declarator: valueChangeEvent
focal_class.original_string: Event<org.dashbuilder.common.client.event.ValueChangeEvent<Map<String, String>>> valueChangeEvent;
focal_class.type: Event<org.dashbuilder.common.client.event.ValueChangeEvent<Map<String, String>>>
focal_class.var_name: valueChangeEvent
focal_class.declarator: view
focal_class.modifier: public
focal_class.original_string: public View view;
focal_class.type: View
focal_class.var_name: view
focal_class.declarator: value
focal_class.original_string: Map<String, String> value;
focal_class.type: Map<String, String>
focal_class.var_name: value
focal_class.file: dashbuilder-client/dashbuilder-common-client/src/main/java/org/dashbuilder/common/client/editor/map/MapEditor.java
focal_class.identifier: MapEditor
focal_class.interfaces: implements IsWidget, LeafAttributeEditor<Map<String, String>>
focal_class.class_method_signature: MapEditor.MapEditor(final View view,
                       final Event<org.dashbuilder.common.client.event.ValueChangeEvent<Map<String, String>>> valueChangeEvent)
focal_class.full_signature: @Inject public  MapEditor(final View view,
                       final Event<org.dashbuilder.common.client.event.ValueChangeEvent<Map<String, String>>> valueChangeEvent)
focal_class.identifier: MapEditor
focal_class.modifiers: @Inject public
focal_class.parameters: (final View view,
                       final Event<org.dashbuilder.common.client.event.ValueChangeEvent<Map<String, String>>> valueChangeEvent)
focal_class.signature:  MapEditor(final View view,
                       final Event<org.dashbuilder.common.client.event.ValueChangeEvent<Map<String, String>>> valueChangeEvent)
focal_class.class_method_signature: MapEditor.init()
focal_class.full_signature: @PostConstruct public void init()
focal_class.identifier: init
focal_class.modifiers: @PostConstruct public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void init()
focal_class.class_method_signature: MapEditor.showErrors(final List<EditorError> errors)
focal_class.full_signature: @Override public void showErrors(final List<EditorError> errors)
focal_class.identifier: showErrors
focal_class.modifiers: @Override public
focal_class.parameters: (final List<EditorError> errors)
focal_class.return: void
focal_class.signature: void showErrors(final List<EditorError> errors)
focal_class.class_method_signature: MapEditor.asWidget()
focal_class.full_signature: @Override public Widget asWidget()
focal_class.identifier: asWidget
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Widget
focal_class.signature: Widget asWidget()
focal_class.class_method_signature: MapEditor.setValue(final Map<String, String> value)
focal_class.full_signature: @Override public void setValue(final Map<String, String> value)
focal_class.identifier: setValue
focal_class.modifiers: @Override public
focal_class.parameters: (final Map<String, String> value)
focal_class.return: void
focal_class.signature: void setValue(final Map<String, String> value)
focal_class.class_method_signature: MapEditor.getValue()
focal_class.full_signature: @Override public Map<String, String> getValue()
focal_class.identifier: getValue
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> getValue()
focal_class.class_method_signature: MapEditor.addEntry()
focal_class.full_signature:  void addEntry()
focal_class.identifier: addEntry
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void addEntry()
focal_class.class_method_signature: MapEditor.getValue(final int columnIndex, final Map.Entry<String, String> object)
focal_class.full_signature:  String getValue(final int columnIndex, final Map.Entry<String, String> object)
focal_class.identifier: getValue
focal_class.parameters: (final int columnIndex, final Map.Entry<String, String> object)
focal_class.return: String
focal_class.signature: String getValue(final int columnIndex, final Map.Entry<String, String> object)
focal_class.class_method_signature: MapEditor.update(final int columnIndex, final int index, final Map.Entry<String, String> object, final String value)
focal_class.full_signature:  void update(final int columnIndex, final int index, final Map.Entry<String, String> object, final String value)
focal_class.identifier: update
focal_class.parameters: (final int columnIndex, final int index, final Map.Entry<String, String> object, final String value)
focal_class.return: void
focal_class.signature: void update(final int columnIndex, final int index, final Map.Entry<String, String> object, final String value)
focal_class.class_method_signature: MapEditor.onKeyUpdated(final int index, final Map.Entry<String, String> object, final String value)
focal_class.full_signature: private void onKeyUpdated(final int index, final Map.Entry<String, String> object, final String value)
focal_class.identifier: onKeyUpdated
focal_class.modifiers: private
focal_class.parameters: (final int index, final Map.Entry<String, String> object, final String value)
focal_class.return: void
focal_class.signature: void onKeyUpdated(final int index, final Map.Entry<String, String> object, final String value)
focal_class.class_method_signature: MapEditor.onValueUpdated(final int index, final Map.Entry<String, String> object, final String value)
focal_class.full_signature: private void onValueUpdated(final int index, final Map.Entry<String, String> object, final String value)
focal_class.identifier: onValueUpdated
focal_class.modifiers: private
focal_class.parameters: (final int index, final Map.Entry<String, String> object, final String value)
focal_class.return: void
focal_class.signature: void onValueUpdated(final int index, final Map.Entry<String, String> object, final String value)
focal_class.class_method_signature: MapEditor.onRemoveEntry(final Map.Entry<String, String> object)
focal_class.full_signature: private void onRemoveEntry(final Map.Entry<String, String> object)
focal_class.identifier: onRemoveEntry
focal_class.modifiers: private
focal_class.parameters: (final Map.Entry<String, String> object)
focal_class.return: void
focal_class.signature: void onRemoveEntry(final Map.Entry<String, String> object)
focal_class.class_method_signature: MapEditor.onAddEntry()
focal_class.full_signature: private void onAddEntry()
focal_class.identifier: onAddEntry
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onAddEntry()
focal_class.class_method_signature: MapEditor.setValue(final Map<String, String> value, final boolean fireEvents)
focal_class.full_signature: private void setValue(final Map<String, String> value, final boolean fireEvents)
focal_class.identifier: setValue
focal_class.modifiers: private
focal_class.parameters: (final Map<String, String> value, final boolean fireEvents)
focal_class.return: void
focal_class.signature: void setValue(final Map<String, String> value, final boolean fireEvents)
focal_class.class_method_signature: MapEditor.initDataGrid()
focal_class.full_signature: private void initDataGrid()
focal_class.identifier: initDataGrid
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initDataGrid()
focal_class.class_method_signature: MapEditor.addColumns()
focal_class.full_signature: private void addColumns()
focal_class.identifier: addColumns
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void addColumns()
focal_class.class_method_signature: MapEditor.getKeyParameter(final int index)
focal_class.full_signature: private String getKeyParameter(final int index)
focal_class.identifier: getKeyParameter
focal_class.modifiers: private
focal_class.parameters: (final int index)
focal_class.return: String
focal_class.signature: String getKeyParameter(final int index)
focal_class.class_method_signature: MapEditor.redraw()
focal_class.full_signature: private void redraw()
focal_class.identifier: redraw
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void redraw()
focal_method.body: @Override
      public void showErrors(final List<EditorError> errors) {
          StringBuilder sb = new StringBuilder();
          for (EditorError error : errors) {
  
              if (error.getEditor() == this) {
                  sb.append("\n").append(error.getMessage());
              }
          }
  
          boolean hasErrors = sb.length() > 0;
          if (!hasErrors) {
              view.clearError();
              return;
          }
  
          // Show the errors.
          view.showError(new SafeHtmlBuilder().appendEscaped(sb.substring(1)).toSafeHtml());
      }
focal_method.class_method_signature: MapEditor.showErrors(final List<EditorError> errors)
focal_method.full_signature: @Override public void showErrors(final List<EditorError> errors)
focal_method.identifier: showErrors
focal_method.invocations: getEditor append append getMessage length clearError showError toSafeHtml appendEscaped substring
focal_method.modifiers: @Override public
focal_method.parameters: (final List<EditorError> errors)
focal_method.return: void
focal_method.signature: void showErrors(final List<EditorError> errors)