{"id":252,"date":"2008-11-07T17:34:00","date_gmt":"2008-11-07T09:34:00","guid":{"rendered":"http:\/\/gemchen.cn\/?p=252"},"modified":"2008-11-07T17:34:00","modified_gmt":"2008-11-07T09:34:00","slug":"%e5%9c%a8eclipse-3-2%e6%a0%b8%e5%bf%83%e4%b8%ad%e5%8f%91%e7%8e%b0%e7%9a%84%e4%b8%80%e6%ae%b5%e8%af%a1%e5%bc%82%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/gemchen.cn\/?p=252","title":{"rendered":"\u5728Eclipse 3.2\u6838\u5fc3\u4e2d\u53d1\u73b0\u7684\u4e00\u6bb5\u8be1\u5f02\u4ee3\u7801"},"content":{"rendered":"<div>\u4f4d\u4e8eorg.eclipse.ui.workbenck.texteditor_3.2.0v20060605-1400.jar\u5305\u7684<\/div>\n<div>org.eclipse.ui.texteditor.AbstractTextEditor.class\u4e2d\u3002<\/div>\n<div><\/div>\n<div>2569\u884c\u5f00\u59cb<\/div>\n<div><\/div>\n<div>\u76f4\u89c2\u4e0a\u611f\u89c9\u8fd9\u6bb5\u4ee3\u7801\u662f\u60f3\u652f\u6301\u9f20\u6807\u624b\u52bf\u7684<\/div>\n<div><\/div>\n<div>\/* gestures commented out until proper solution (i.e. preference page) can be found<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span> * for bug # 28417:<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span> *<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>final Map gestureMap= new HashMap();<\/div>\n<div><\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>gestureMap.put(&quot;E&quot;, &quot;org.eclipse.ui.navigate.forwardHistory&quot;);<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>gestureMap.put(&quot;N&quot;, &quot;org.eclipse.ui.file.save&quot;);<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>gestureMap.put(&quot;NW&quot;, &quot;org.eclipse.ui.file.saveAll&quot;);<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>gestureMap.put(&quot;S&quot;, &quot;org.eclipse.ui.file.close&quot;);<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>gestureMap.put(&quot;SW&quot;, &quot;org.eclipse.ui.file.closeAll&quot;);<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>gestureMap.put(&quot;W&quot;, &quot;org.eclipse.ui.navigate.backwardHistory&quot;);<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>gestureMap.put(&quot;EN&quot;, &quot;org.eclipse.ui.edit.copy&quot;);<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>gestureMap.put(&quot;ES&quot;, &quot;org.eclipse.ui.edit.paste&quot;);<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>gestureMap.put(&quot;EW&quot;, &quot;org.eclipse.ui.edit.cut&quot;);<\/div>\n<div><\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>Capture capture= Capture.create();<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>capture.setControl(styledText);<\/div>\n<div><\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>capture.addCaptureListener(new CaptureListener() {<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t<\/span>public void gesture(Gesture gesture) {<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t<\/span>if (gesture.getPen() == 3) {<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t<\/span>String actionId= (String) gestureMap.get(Util.recognize(gesture.getPoints(), 20));<\/div>\n<div><\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t<\/span>if (actionId != null) {<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t\t<\/span>IKeyBindingService keyBindingService= getEditorSite().getKeyBindingService();<\/div>\n<div><\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t\t<\/span>if (keyBindingService instanceof KeyBindingService) {<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t\t\t<\/span>IAction action= ((KeyBindingService) keyBindingService).getAction(actionId);<\/div>\n<div><\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t\t\t<\/span>if (action != null) {<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t\t\t\t<\/span>if (action instanceof IUpdate)<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t\t\t\t\t<\/span>((IUpdate) action).update();<\/div>\n<div><\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t\t\t\t<\/span>if (action.isEnabled())<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t\t\t\t\t<\/span>action.run();<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t\t\t<\/span>}<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t\t<\/span>}<\/div>\n<div><\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t\t<\/span>return;<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t<\/span>}<\/div>\n<div><\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t\t<\/span>fTextContextMenu.setVisible(true);<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t\t<\/span>}<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t\t<\/span>};<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>});<\/div>\n<div><span class=\"Apple-tab-span\" style=\"white-space:pre\">\t\t<\/span>*\/<\/div>\n<div><\/div>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4f4d\u4e8eorg.eclipse.ui.workbenck.texteditor_3.2.0v20060605-1400.jar\u5305\u7684 org.eclipse.ui.texteditor.AbstractTe&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1],"tags":[15],"class_list":["post-252","post","type-post","status-publish","format-standard","hentry","category-dev","category-uncategorized","tag-eclipse"],"_links":{"self":[{"href":"https:\/\/gemchen.cn\/index.php?rest_route=\/wp\/v2\/posts\/252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gemchen.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gemchen.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gemchen.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gemchen.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=252"}],"version-history":[{"count":0,"href":"https:\/\/gemchen.cn\/index.php?rest_route=\/wp\/v2\/posts\/252\/revisions"}],"wp:attachment":[{"href":"https:\/\/gemchen.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gemchen.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gemchen.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}