{"id":477,"date":"2012-04-10T20:57:31","date_gmt":"2012-04-10T19:57:31","guid":{"rendered":"http:\/\/www.nobugs.org\/blog\/?p=477"},"modified":"2012-04-10T20:57:31","modified_gmt":"2012-04-10T19:57:31","slug":"another-eclipse-extension","status":"publish","type":"post","link":"https:\/\/www.nobugs.org\/blog\/archives\/2012\/04\/10\/another-eclipse-extension\/","title":{"rendered":"Another eclipse extension"},"content":{"rendered":"<p>Like <a href=\"http:\/\/stackoverflow.com\/questions\/66986\/is-there-an-eclipse-command-to-surround-the-current-selection-with-parentheses\">this person<\/a>, I often want to surround the eclipse selection with parens.  For example, &#8220;42&#8221; becomes &#8220;(42)&#8221; with the cursor before the first paren, ready to turn into &#8220;foo(42)&#8221;.  Combined with eclipse&#8217;s structured selection, this is pretty handy.  For the last while, I&#8217;ve used a template for this.  It requires a few keystrokes though, so was a prime target for optimization.<\/p>\n<p>So tonight I threw together an extension called Parens which does it in a single keypress.  The surprising thing was that it worked perfectly first time I ran it.  This never happens!  <\/p>\n<p>I&#8217;m starting to like customizing eclipse.  it&#8217;s not quite as &#8216;discoverable&#8217; as emacs is .. largely due to it&#8217;s modular nature and careful dependency tracking.  However, given that emacs&#8217;s lack of modularity and dependency tracking drive me mad, I can&#8217;t complain too much. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Like this person, I often want to surround the eclipse selection with parens. For example, &#8220;42&#8221; becomes &#8220;(42)&#8221; with the cursor before the first paren, ready to turn into &#8220;foo(42)&#8221;. Combined with eclipse&#8217;s structured selection, this is pretty handy. For the last while, I&#8217;ve used a template for this. It requires a few keystrokes though, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-477","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts\/477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/comments?post=477"}],"version-history":[{"count":2,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts\/477\/revisions"}],"predecessor-version":[{"id":479,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts\/477\/revisions\/479"}],"wp:attachment":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/media?parent=477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/categories?post=477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/tags?post=477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}