|
@@ -154,7 +154,37 @@ public class SwingInputHandler extends InputHandler implements KeyListener {
|
154
|
154
|
@Override
|
155
|
155
|
protected Object doInBackground() throws Exception {
|
156
|
156
|
localTarget.setEditable(false);
|
157
|
|
- doTabCompletion();
|
|
157
|
+ doTabCompletion(false);
|
|
158
|
+ return null;
|
|
159
|
+ }
|
|
160
|
+
|
|
161
|
+ /** {@inheritDoc} */
|
|
162
|
+ @Override
|
|
163
|
+ protected void done() {
|
|
164
|
+ localTarget.setEditable(true);
|
|
165
|
+ }
|
|
166
|
+ }.execute();
|
|
167
|
+ }
|
|
168
|
+ });
|
|
169
|
+ localTarget.getActionMap().put("insert-shift-tab", new AbstractAction() {
|
|
170
|
+
|
|
171
|
+ /**
|
|
172
|
+ * A version number for this class. It should be changed whenever the class
|
|
173
|
+ * structure is changed (or anything else that would prevent serialized
|
|
174
|
+ * objects being unserialized with the new class).
|
|
175
|
+ */
|
|
176
|
+ private static final long serialVersionUID = 1;
|
|
177
|
+
|
|
178
|
+ /** {@inheritDoc} */
|
|
179
|
+ @Override
|
|
180
|
+ public void actionPerformed(final ActionEvent e) {
|
|
181
|
+ new LoggingSwingWorker() {
|
|
182
|
+
|
|
183
|
+ /** {@inheritDoc} */
|
|
184
|
+ @Override
|
|
185
|
+ protected Object doInBackground() throws Exception {
|
|
186
|
+ localTarget.setEditable(false);
|
|
187
|
+ doTabCompletion(true);
|
158
|
188
|
return null;
|
159
|
189
|
}
|
160
|
190
|
|
|
@@ -168,6 +198,9 @@ public class SwingInputHandler extends InputHandler implements KeyListener {
|
168
|
198
|
});
|
169
|
199
|
localTarget.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).
|
170
|
200
|
put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab");
|
|
201
|
+ localTarget.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).
|
|
202
|
+ put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
|
|
203
|
+ KeyEvent.SHIFT_MASK), "insert-shift-tab");
|
171
|
204
|
}
|
172
|
205
|
|
173
|
206
|
/** {@inheritDoc} */
|