tailieunhanh - Professional Eclipse 3 for Java Developers 2006 phần 9

Với chức năng Window Show View khác . bạn có thể chọn xem mới trong danh mục Videoclips và mở nó. Điều này cung cấp cho bạn một cái nhìn tương đối tốt-instrumented dựa trên cây, như thể hiện trong hình 11,11. Những gì còn lại là trang bị với một miền ứng dụng cụ thể | Chapter 13 public void run start end Notification that event processing was finished. public synchronized void continueSpellChecking Disable action while busy CheckSpellingActionDelegate action SpellCheckerPlugin .getSpellCheckingActionDelegate true Release waiting thread notifyAll Operations The current spell-checking process can be canceled via the abortSpellChecking method To do so the method just sets a flag. Then the spellingError method is awakened once again and simply terminates itself after canceling the spell-checking process by calling the event object s cancel method. Cancels the current spell checking process. public void abortSpellChecking abort true continueSpellChecking The replaceWord method is used to apply the end user s corrections to the current document. This is done via the spell-checking target s replaceText method. This method returns the change in text length caused by the replacement. This value is added to the length of the current selection so that the selection shrinks and grows with text replacements. All of this logic is encapsulated into a syncExec call to avoid SWT thread errors see the section Displays Shells and Monitors in Chapter 8 . Replace word in the current document @param pos - Absolute position in the document @param count - Number of characters to be replaced @param newWord - The replacement string public void replaceWord final int pos final int count final String newWord Execute this via syncExec since it originates from the spell checking thread. new Runnable public void run 462 Project Three A Spell Checker as an Eclipse Plug-in pos count newWord Analyzing Documents The jazzy spell-checking engine uses the tokenizer to break documents into single words. The tokenizer used in this plug-in is loosely based on the original jazzy word tokenizer but was extended with additional functionality and refactored into two

TỪ KHÓA LIÊN QUAN