use of org.jabref.gui.fieldeditors.TextArea in project jabref by JabRef.
the class EntryEditorTest method changingSomeFieldUpdatesAutoCompleter.
@Test
@Ignore
public void changingSomeFieldUpdatesAutoCompleter() {
TestUtils.initJabRef();
BibEntry bibEntry = new BibEntry();
bibEntry.setField("journal", "Testtext");
FieldEditor authorTextField = new TextArea("journal", "New Testtext");
EntryEditor editor = new EntryEditor(JabRefGUI.getMainFrame(), JabRefGUI.getMainFrame().getCurrentBasePanel(), bibEntry);
// perform action ...
editor.getStoreFieldAction().actionPerformed(new ActionEvent(authorTextField, 0, ""));
// test content of stored words in autocompleter ...
AutoCompleter<String> autoCompleter = JabRefGUI.getMainFrame().getCurrentBasePanel().getAutoCompleters().get("journal");
List<String> result = autoCompleter.complete("Ne");
Assert.assertEquals(Arrays.asList("New Testtext"), result);
TestUtils.closeJabRef();
}
use of org.jabref.gui.fieldeditors.TextArea in project jabref by JabRef.
the class EntryEditorTest method changingAuthorUpdatesAutoCompleter.
@Test
@Ignore
public void changingAuthorUpdatesAutoCompleter() {
TestUtils.initJabRef();
BibEntry bibEntry = new BibEntry();
bibEntry.setField("author", "Brigitte Laurant");
FieldEditor authorTextField = new TextArea("author", "Hans Meiser");
EntryEditor editor = new EntryEditor(JabRefGUI.getMainFrame(), JabRefGUI.getMainFrame().getCurrentBasePanel(), bibEntry);
// perform action ...
editor.getStoreFieldAction().actionPerformed(new ActionEvent(authorTextField, 0, ""));
// test content of stored words in autocompleter ...
AutoCompleter<String> autoCompleter = JabRefGUI.getMainFrame().getCurrentBasePanel().getAutoCompleters().get("author");
List<String> result = autoCompleter.complete("Hans");
Assert.assertEquals(Arrays.asList("Hans Meiser"), result);
TestUtils.closeJabRef();
}
Aggregations