MCPcopy Create free account
hub / github.com/BaseXdb/basex / completeInput

Method completeInput

basex-core/src/main/java/org/basex/gui/GUIInput.java:138–146  ·  view source on GitHub ↗

Completes the input with the current combobox choice.

()

Source from the content-addressed store, hash-verified

136 * Completes the input with the current combobox choice.
137 */
138 private void completeInput() {
139 final String suffix = completions.getSelectedItem();
140 if(suffix.isEmpty()) return;
141 final int pl = prefix.length(), ll = pl > 0 ? prefix.charAt(pl - 1) : ' ';
142 if(Character.isLetter(ll) && Character.isLetter(suffix.charAt(0))) prefix += " ";
143 setText(prefix + suffix);
144 popupMenu();
145 if(gui.gopts.get(GUIOptions.EXECRT) && !cmdMode()) gui.execute();
146 }
147
148 /**
149 * Shows or hides a popup menu with input completions.

Callers 2

GUIInputMethod · 0.95
keyPressedMethod · 0.95

Calls 9

setTextMethod · 0.95
popupMenuMethod · 0.95
cmdModeMethod · 0.95
getSelectedItemMethod · 0.80
charAtMethod · 0.80
getMethod · 0.65
executeMethod · 0.65
isEmptyMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected