OSDN Git Service

added upcase-word, downcase-word, capitalize-word
[moreemacs/moreemacs.git] / jp.sourceforge.moreemacs / src / jp / sourceforge / moreemacs / handlers / KillWordExecution.java
index 321ae7c..92e3b37 100644 (file)
@@ -7,19 +7,18 @@ import org.eclipse.swt.dnd.Transfer;
 \r
 public final class KillWordExecution extends TextEditorExecution {\r
 \r
-       @Override\r
-       public void execute() throws BadLocationException {\r
-        if(!textEditor.isEditable()) {\r
+    @Override\r
+    public void execute() throws BadLocationException {\r
+        if (!textEditor.isEditable()) {\r
             return;\r
         }\r
 \r
-               int current = cursor.offset();\r
-               int next = ForwardWordExecution.getNextWordPosition(doc, current);\r
-               String word = doc.get(current, next-current);\r
-               Clipboard c = new Clipboard(window.getShell().getDisplay());\r
-               c.setContents(\r
-                               new String[] { word }, \r
-                               new Transfer[] { TextTransfer.getInstance() });\r
-               doc.replace(current, next-current, "");\r
-       }\r
+        int current = cursor.offset();\r
+        int next = ForwardWordExecution.getNextWordPosition(doc, current);\r
+        String word = doc.get(current, next - current);\r
+        Clipboard c = new Clipboard(window.getShell().getDisplay());\r
+        c.setContents(new String[] { word }, \r
+                new Transfer[] { TextTransfer.getInstance() });\r
+        doc.replace(current, next - current, "");\r
+    }\r
 }\r