From: KUBO H. <hi...@sf...> - 2005-06-09 09:50:47
|
> > This patch contains a new feature of sorting FileCompletion list by > > filename. > > Sounds cool, we just have to make sure it doesn't become too slow, after all > completion is completely handled in the gui thread right now, and for some > modes this cannot be changed easily. OK, in other words, we have to implement this feature as follows: (1)Start a sorting thread by SwingUtilities.invokeLater. (2)Calling Observer#update to update completion list. "Whenever possible, you should use invokeLater instead of invokeAndWait." http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html#invokeAndWait The current Completion implementation synchronously(blocking method call) updates completion list. We should have internal logic of asynchronous update of completion list in case canceling action by hitting Ctrl-G(like emacs minibuffer) or something. But the external user interface should be synchronous, block user input except with canceling action. Later update of completion list may be troublesome and embarrassing. -- KUBO Hiroya hi...@sf... |