{"id":508,"date":"2014-03-03T17:48:16","date_gmt":"2014-03-03T17:48:16","guid":{"rendered":"http:\/\/blog.wholetomato.com\/?p=508"},"modified":"2019-05-03T17:28:52","modified_gmt":"2019-05-03T21:28:52","slug":"create-implementations","status":"publish","type":"post","link":"https:\/\/stage.wholetomato.com\/blog\/create-implementations\/","title":{"rendered":"A quick way to create implementations of all methods in a class"},"content":{"rendered":"<p>We released a feature some time ago that we failed to document, and since its UI is subtle, there is a good chance you know about it only if you follow our release notes closely. I raise the feature for two reasons: 1) it&#8217;s valuable, and 2) now <a title=\"it's documented\" href=\"http:\/\/docs.wholetomato.com\/default.asp?W458\">it&#8217;s documented<\/a>. The feature is Create Method Implementations, and it gives you a quick way to create implementations of all methods of a class.<\/p>\n<p>Move to the name of a class in its declaration, typically in a header, and select Create Method Implementations from a refactoring menu. For example, press Shift+Alt+Q.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementations.png?ssl=1\"><img decoding=\"async\" data-attachment-id=\"510\" data-permalink=\"https:\/\/stage.wholetomato.com\/blog\/create-implementations\/createmethodimplementations\/\" data-orig-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementations.png?fit=487%2C162&amp;ssl=1\" data-orig-size=\"487,162\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Open Quick Refactoring Menu from the name of a class\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementations.png?fit=300%2C100&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementations.png?fit=487%2C162&amp;ssl=1\" class=\" wp-image-510 alignnone\" alt=\"Open Quick Refactoring Menu from the name of a class\" src=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementations.png?resize=487%2C162&#038;ssl=1\" width=\"487\" height=\"162\" srcset=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementations.png?w=487&amp;ssl=1 487w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementations.png?resize=300%2C100&amp;ssl=1 300w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementations.png?resize=360%2C120&amp;ssl=1 360w\" sizes=\"(max-width: 487px) 100vw, 487px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>A dialog opens, letting you select the methods whose implementations you want created. As with other refactoring and code generation commands, Visual Assist will attempt to create implementations in a sensible location.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementationsdialog.png?ssl=1\"><img decoding=\"async\" data-attachment-id=\"511\" data-permalink=\"https:\/\/stage.wholetomato.com\/blog\/create-implementations\/createmethodimplementationsdialog\/\" data-orig-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementationsdialog.png?fit=434%2C248&amp;ssl=1\" data-orig-size=\"434,248\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Select methods to implement\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementationsdialog.png?fit=300%2C171&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementationsdialog.png?fit=434%2C248&amp;ssl=1\" class=\" wp-image-511 alignnone\" alt=\"Select methods to implement\" src=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementationsdialog.png?resize=434%2C248&#038;ssl=1\" width=\"434\" height=\"248\" srcset=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementationsdialog.png?w=434&amp;ssl=1 434w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementationsdialog.png?resize=300%2C171&amp;ssl=1 300w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2014\/03\/createmethodimplementationsdialog.png?resize=360%2C206&amp;ssl=1 360w\" sizes=\"(max-width: 434px) 100vw, 434px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Visual Assist is clever enough to exclude methods already implemented, so you can invoke the command again if you add a few methods to the declaration of an existing class.<\/p>\n<p>You can adjust the format of newly created implementations by modifying the VA Snippet for Create Implementation\u00e2\u20ac\u201dthe same VA Snippet used by its namesake and Extract Method.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We released a feature some time ago that we failed to document, and since its UI is subtle, there is a good chance you know about it only if you follow our release notes closely&#8230;.<\/p>\n","protected":false},"author":28485711,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":""},"categories":[672],"tags":[],"class_list":["post-508","post","type-post","status-publish","format-standard","hentry","category-tips-and-tricks"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfhqii-8c","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts\/508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/users\/28485711"}],"replies":[{"embeddable":true,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/comments?post=508"}],"version-history":[{"count":12,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts\/508\/revisions"}],"predecessor-version":[{"id":522,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts\/508\/revisions\/522"}],"wp:attachment":[{"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/media?parent=508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/categories?post=508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/tags?post=508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}