{"id":445,"date":"2014-03-12T05:51:06","date_gmt":"2014-03-12T05:51:06","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/salesforce\/?p=445"},"modified":"2025-05-15T10:05:56","modified_gmt":"2025-05-15T10:05:56","slug":"indent-apex-code-in-eclipse","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/03\/12\/indent-apex-code-in-eclipse\/","title":{"rendered":"Indent Apex Code in Eclipse"},"content":{"rendered":"<p style=\"text-align: justify;\">As you know, Eclipse is a nice IDE for developing Apex code. A few days back we were working on Apex side coding and after a lot of coding, I wanted to indent my code. I tried a lot to indent the code in Apex Code Editor but in vain. Finally, I had to change the editor.<\/p>\n<p>Here is the way in which we can indent the Apex code &#8211;<\/p>\n<p><span style=\"line-height: 1.6em;\">Right Click on the Class that needs to be indented then select <\/span><b style=\"line-height: 1.6em;\">Open With &gt;&gt;\u00a0<\/b><b style=\"line-height: 1.6em;\">Other\u2026 &gt;<\/b><b style=\"line-height: 1.6em;\">&gt;<\/b><b style=\"line-height: 1.6em;\"><b>Java Editor<\/b><\/b><\/p>\n<p><b style=\"line-height: 1.6em;\"><b><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2014\/03\/Ide1.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-446 size-full\" title=\"Ide1\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2014\/03\/Ide1.jpg\" alt=\"Ide1\" width=\"493\" height=\"206\" \/><\/a><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2014\/03\/Ide2.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-447 size-full\" title=\"Ide2\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2014\/03\/Ide2.jpg\" alt=\"Ide2\" width=\"340\" height=\"211\" \/><\/a><\/b><\/b><\/p>\n<p style=\"text-align: justify;\">Then select the text that needs to be indented. For convenience, you can select all the text by <b>Ctrl+A <\/b>then<b> <\/b>press<b> Ctrl+I <\/b>to indent the text.<\/p>\n<p style=\"text-align: justify;\"><b>OR<\/b><\/p>\n<p style=\"text-align: justify;\">You can also indent the Apex code by right-clicking on Editor then selecting <b>Source &gt;&gt;\u00a0<\/b><b>Correct Indentation <\/b>as shown in below screenshot<a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2014\/03\/ide3.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-448 size-full\" title=\"ide3\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2014\/03\/ide3.jpg\" alt=\"ide3\" width=\"633\" height=\"611\" \/><\/a>Happy Coding.<\/p>\n<p><span style=\"font-size: Medium;\"><strong>About Us<\/strong><\/span><br \/>\n<a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a> as a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners across the globe. We offer Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that require apex code incorporation into the Salesforce platform.<\/p>\n<p><a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a> has some unique solutions for Cloud CRM such as Salesforce integration with <a href=\"https:\/\/www.greytrix.com\/product\/sage-x3\/gumu-x3-salesforce-integration\">Sage Enterprise Management (Sage X3<\/a>), Sage Intacct, <a href=\"https:\/\/www.greytrix.com\/product\/sage-100-erp\/gumu-100-salesforce-integration\">Sage 100, <\/a>and <a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp\/gumu-300-salesforce-integration\">Sage 300 (Sage Accpac)<\/a>. We also offer best-in-class Cloud CRM <a href=\"https:\/\/www.greytrix.com\/product\/crm-development\/salesforce-com\">Salesforce customization and development services<\/a> along with services such as Salesforce <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/data-migration-services\">Data Migration<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/integrated-application-development\">Integrated App development<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/custom-development\">Custom App development<\/a> and <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/maintenance-support\">Technical Support<\/a> to business partners and end users.<\/p>\n<p>Greytrix GUMU&#x2122; integration for Sage ERP \u2013 Salesforce is a 5-star app listed on <a href=\"https:\/\/appexchange.salesforce.com\/listingDetail?listingId=a0N30000000psM5EAI\" target=\"_blank\" rel=\"noopener\">Salesforce AppExchange<\/a>.<\/p>\n<p>For more information, please contact us at <a href=\"mailto:salesforce@greytrix.com\">salesforce@greytrix.com<\/a>. We will be glad to assist you.<\/p>\n<p><strong><span style=\"font-size: Medium;\">Related Posts<\/span><\/strong><\/p>\n<ul>\n<li><a title=\"Dynamic File Name for Exported PDF\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/03\/01\/dynamic-file-name-for-exported-pdf\/\" target=\"_blank\" rel=\"noopener noreferrer\">Dynamic File Name for Exported PDF<\/a><\/li>\n<li><a style=\"line-height: 1.6em;\" title=\"Using same component multiple times in a Visualforce page\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/02\/18\/using-same-component-multiple-times-in-a-visualforce-page\/\" target=\"_blank\" rel=\"noopener noreferrer\">Using the same component multiple times in a Visualforce page<\/a><\/li>\n<li><a title=\"Editing the page link for Visualforce Tab\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/02\/18\/editing-the-page-link-for-visualforce-tab\/\" target=\"_blank\" rel=\"noopener noreferrer\">Editing the page link for the Visualforce Tab<\/a><\/li>\n<li><a title=\"Overlapping issue in Salesforce App Menu\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/02\/06\/overlapping-issue-in-salesforce-app-menu\/\" target=\"_blank\" rel=\"noopener noreferrer\">Overlapping issue in the Salesforce App Menu<\/a><\/li>\n<li><a title=\"Set controller variable\/properties from JavaScript\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/02\/04\/set-controller-variableproperties-from-javascript\/\" target=\"_blank\" rel=\"noopener noreferrer\">Set controller variable\/properties from JavaScript<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>As you know, Eclipse is a nice IDE for developing Apex code. A few days back we were working on Apex side coding and after a lot of coding, I wanted to indent my code. I tried a lot to indent the code in Apex Code Editor but in vain. Finally, I had to change\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/03\/12\/indent-apex-code-in-eclipse\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[13,573,572,136],"class_list":["post-445","post","type-post","status-publish","format-standard","hentry","category-salesforce-srv","tag-apex","tag-apex-code-editor","tag-apex-code-in-eclipse","tag-force-com-ide"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/comments?post=445"}],"version-history":[{"count":6,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/445\/revisions"}],"predecessor-version":[{"id":10761,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/445\/revisions\/10761"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/media?parent=445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/categories?post=445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/tags?post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}