test_class.declarator: view
test_class.modifier: @Mock
test_class.original_string: @Mock
      DropDownEditor.View view;
test_class.type: DropDownEditor.View
test_class.var_name: view
test_class.declarator: liveSearchDropDown
test_class.modifier: @Mock
test_class.original_string: @Mock
      LiveSearchDropDown liveSearchDropDown;
test_class.type: LiveSearchDropDown
test_class.var_name: liveSearchDropDown
test_class.declarator: valueChangeEvent
test_class.modifier: @Mock
test_class.original_string: @Mock
      Event<ValueChangeEvent<String>> valueChangeEvent;
test_class.type: Event<ValueChangeEvent<String>>
test_class.var_name: valueChangeEvent
test_class.declarator: presenter
test_class.original_string: DropDownEditor presenter;
test_class.type: DropDownEditor
test_class.var_name: presenter
test_class.declarator: entries = new ArrayList<>()
test_class.original_string: Collection<DropDownEditor.Entry> entries = new ArrayList<>();
test_class.type: Collection<DropDownEditor.Entry>
test_class.var_name: entries
test_class.file: dashbuilder-client/dashbuilder-common-client/src/test/java/org/dashbuilder/common/client/editor/list/DropDownEditorTest.java
test_class.identifier: DropDownEditorTest
test_case.body: @Test
      public void testSetValue() {
          presenter.setValue("entry2");
          verify(liveSearchDropDown).setSelectedItem("entry2", "Entry 2");
          assertEquals(presenter.getValue(), "entry2");
  
          presenter.setSelectHint("- select - ");
          presenter.setValue(null);
          verify(liveSearchDropDown).setSelectedItem("- select - ", "- select - ");
          assertNull(presenter.getValue());
  
          reset(liveSearchDropDown);
          presenter.clear();
          presenter.setValue("entry2");
          presenter.setEntries(entries);
          verify(liveSearchDropDown).setSelectedItem("entry2", "Entry 2");
  
          reset(liveSearchDropDown);
          presenter.clear();
          presenter.setEntries(entries);
          verify(liveSearchDropDown, never()).setSelectedItem(anyString(), anyString());
      }
test_case.class_method_signature: DropDownEditorTest.testSetValue()
test_case.full_signature: @Test public void testSetValue()
test_case.identifier: testSetValue
test_case.invocations: setValue setSelectedItem verify assertEquals getValue setSelectHint setValue setSelectedItem verify assertNull getValue reset clear setValue setEntries setSelectedItem verify reset clear setEntries setSelectedItem verify never anyString anyString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetValue()
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: dropDown
focal_class.original_string: LiveSearchDropDown dropDown;
focal_class.type: LiveSearchDropDown
focal_class.var_name: dropDown
focal_class.declarator: valueChangeEvent
focal_class.original_string: Event<org.dashbuilder.common.client.event.ValueChangeEvent<String>> valueChangeEvent;
focal_class.type: Event<org.dashbuilder.common.client.event.ValueChangeEvent<String>>
focal_class.var_name: valueChangeEvent
focal_class.declarator: entries = new ArrayList<>()
focal_class.original_string: Collection<Entry> entries = new ArrayList<>();
focal_class.type: Collection<Entry>
focal_class.var_name: entries
focal_class.declarator: selectorHint
focal_class.original_string: String selectorHint;
focal_class.type: String
focal_class.var_name: selectorHint
focal_class.declarator: value
focal_class.original_string: String value;
focal_class.type: String
focal_class.var_name: value
focal_class.file: dashbuilder-client/dashbuilder-common-client/src/main/java/org/dashbuilder/common/client/editor/list/DropDownEditor.java
focal_class.identifier: DropDownEditor
focal_class.interfaces: implements IsWidget, LeafAttributeEditor<String>
focal_class.class_method_signature: DropDownEditor.DropDownEditor(final View view,
                            final LiveSearchDropDown dropDown,
                            final Event<org.dashbuilder.common.client.event.ValueChangeEvent<String>> valueChangeEvent)
focal_class.full_signature: @Inject public  DropDownEditor(final View view,
                            final LiveSearchDropDown dropDown,
                            final Event<org.dashbuilder.common.client.event.ValueChangeEvent<String>> valueChangeEvent)
focal_class.identifier: DropDownEditor
focal_class.modifiers: @Inject public
focal_class.parameters: (final View view,
                            final LiveSearchDropDown dropDown,
                            final Event<org.dashbuilder.common.client.event.ValueChangeEvent<String>> valueChangeEvent)
focal_class.signature:  DropDownEditor(final View view,
                            final LiveSearchDropDown dropDown,
                            final Event<org.dashbuilder.common.client.event.ValueChangeEvent<String>> valueChangeEvent)
focal_class.class_method_signature: DropDownEditor.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: DropDownEditor.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: DropDownEditor.getDropDownEntries(String pattern, int maxResults, LiveSearchCallback callback)
focal_class.full_signature: public void getDropDownEntries(String pattern, int maxResults, LiveSearchCallback callback)
focal_class.identifier: getDropDownEntries
focal_class.modifiers: public
focal_class.parameters: (String pattern, int maxResults, LiveSearchCallback callback)
focal_class.return: void
focal_class.signature: void getDropDownEntries(String pattern, int maxResults, LiveSearchCallback callback)
focal_class.class_method_signature: DropDownEditor.onEntrySelected()
focal_class.full_signature: public void onEntrySelected()
focal_class.identifier: onEntrySelected
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onEntrySelected()
focal_class.class_method_signature: DropDownEditor.getSelectedValue()
focal_class.full_signature: public String getSelectedValue()
focal_class.identifier: getSelectedValue
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getSelectedValue()
focal_class.class_method_signature: DropDownEditor.getEntryByHint(String hint)
focal_class.full_signature: private Entry getEntryByHint(String hint)
focal_class.identifier: getEntryByHint
focal_class.modifiers: private
focal_class.parameters: (String hint)
focal_class.return: Entry
focal_class.signature: Entry getEntryByHint(String hint)
focal_class.class_method_signature: DropDownEditor.getEntryByValue(String value)
focal_class.full_signature: private Entry getEntryByValue(String value)
focal_class.identifier: getEntryByValue
focal_class.modifiers: private
focal_class.parameters: (String value)
focal_class.return: Entry
focal_class.signature: Entry getEntryByValue(String value)
focal_class.class_method_signature: DropDownEditor.setSelectHint(String hint)
focal_class.full_signature: public void setSelectHint(String hint)
focal_class.identifier: setSelectHint
focal_class.modifiers: public
focal_class.parameters: (String hint)
focal_class.return: void
focal_class.signature: void setSelectHint(String hint)
focal_class.class_method_signature: DropDownEditor.newEntry(final String value, String hint)
focal_class.full_signature: public Entry newEntry(final String value, String hint)
focal_class.identifier: newEntry
focal_class.modifiers: public
focal_class.parameters: (final String value, String hint)
focal_class.return: Entry
focal_class.signature: Entry newEntry(final String value, String hint)
focal_class.class_method_signature: DropDownEditor.setEntries(final Collection<Entry> entries)
focal_class.full_signature: public void setEntries(final Collection<Entry> entries)
focal_class.identifier: setEntries
focal_class.modifiers: public
focal_class.parameters: (final Collection<Entry> entries)
focal_class.return: void
focal_class.signature: void setEntries(final Collection<Entry> entries)
focal_class.class_method_signature: DropDownEditor.addHelpContent(final String title, final String content, final Placement placement)
focal_class.full_signature: public void addHelpContent(final String title, final String content, final Placement placement)
focal_class.identifier: addHelpContent
focal_class.modifiers: public
focal_class.parameters: (final String title, final String content, final Placement placement)
focal_class.return: void
focal_class.signature: void addHelpContent(final String title, final String content, final Placement placement)
focal_class.class_method_signature: DropDownEditor.clear()
focal_class.full_signature: public void clear()
focal_class.identifier: clear
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: DropDownEditor.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: DropDownEditor.getValue()
focal_class.full_signature: @Override public String getValue()
focal_class.identifier: getValue
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getValue()
focal_class.class_method_signature: DropDownEditor.setValue(final String value)
focal_class.full_signature: @Override public void setValue(final String value)
focal_class.identifier: setValue
focal_class.modifiers: @Override public
focal_class.parameters: (final String value)
focal_class.return: void
focal_class.signature: void setValue(final String value)
focal_method.body: @Override
      public void setValue(final String value) {
          this.value = value;
          Entry entry = getEntryByValue(value);
          if (entry != null) {
              this.dropDown.setSelectedItem(value, entry.getHint());
          } else {
              this.dropDown.setSelectedItem(selectorHint, selectorHint);
          }
      }
focal_method.class_method_signature: DropDownEditor.setValue(final String value)
focal_method.full_signature: @Override public void setValue(final String value)
focal_method.identifier: setValue
focal_method.invocations: getEntryByValue setSelectedItem getHint setSelectedItem
focal_method.modifiers: @Override public
focal_method.parameters: (final String value)
focal_method.return: void
focal_method.signature: void setValue(final String value)