Showing posts with label VSCode. Show all posts
Showing posts with label VSCode. Show all posts

Saturday, December 29, 2018

Breadcrumb navigation in VSCode


Recently I have started working on VSCode for my Salesforce development. Earlier I was leveraging the Illuminated Cloud plugin of Webstorm for all my development activities.

So in Webstorm, there is a Structure window using which you can examine the structure of the file currently opened in the editor, be it an Apex class or trigger, Visualforce or Lightning markup file, or JavaScript, CSS, or XML metadata file. It was also easy to navigate between related files of a Lightning component without using the file or project explorer, whatever you say.

VSCode has a navigation bar above its contents known as Breadcrumbs. It shows the current location and allows you to quickly navigate between symbols and files. By default, this is disabled. To start using breadcrumbs, enable it with the View > Toggle Breadcrumbs command or via the breadcrumbs.enabled setting like below:
"breadcrumbs.enabled": true

Once enabled, you will be able to see a navigation bar. So if you check the image below, on clicking the name of the file on navigation bar, you will be able to see the related files of that Lightning component.



Similarly, you can examine the structure of the file currently in focus as below:



For code reformatting, Prettier works like a charm for JS files. But I hope that in the near future, Salesforce add code reformatting capability for Apex files. As of now, there is a plugin Uncrustify which can be used to format Apex files. You can setup this plugin with VSCode, the instructions of which can be found in the link below:
https://salesforce.stackexchange.com/questions/212382/format-apex-code-visual-studio-code

Share This:    Facebook Twitter

Total Pageviews

My Social Profiles

View Sonal's profile on LinkedIn

Tags

__proto__ $Browser Access Grants Accessor properties Admin Ajax AllowsCallouts Apex Apex Map Apex Sharing AssignmentRuleHeader AsyncApexJob Asynchronous Auth Provider AWS Callbacks Connected app constructor Cookie CPU Time CSP Trusted Sites CSS Custom settings CustomLabels Data properties Database.Batchable Database.BatchableContext Database.query Describe Result Destructuring Dynamic Apex Dynamic SOQL Einstein Analytics enqueueJob Enterprise Territory Management Enumeration escapeSingleQuotes featured Flows geolocation getGlobalDescribe getOrgDefaults() getPicklistValues getRecordTypeId() getRecordTypeInfosByName() getURLParameters Google Maps Governor Limits hasOwnProperty() Heap Heap Size IIFE Immediately Invoked Function Expression Interview questions isCustom() Javascript Javascript Array jsForce Lightning Lightning Components Lightning Events lightning-record-edit-form lightning:combobox lightning:icon lightning:input lightning:select LockerService Lookup LWC Manual Sharing Map Modal Module Pattern Named Credentials NodeJS OAuth Object.freeze() Object.keys() Object.preventExtensions() Object.seal() Organization Wide Defaults Override PDF Reader Performance performance.now() Permission Sets Picklist Platform events Popup Postman Primitive Types Profiles Promise propertyIsEnumerable() prototype Query Selectivity Queueable Record types Reference Types Regex Regular Expressions Relationships Rest API Rest Operator Revealing Module Pattern Role Hierarchy Salesforce Salesforce Security Schema.DescribeFieldResult Schema.DescribeSObjectResult Schema.PicklistEntry Schema.SObjectField Schema.SObjectType Security Service Components Shadow DOM Sharing Sharing Rules Singleton Slots SOAP API SOAP Web Services SOQL SOQL injection Spread Operator Star Rating stripInaccessible svg svgIcon Synchronous this Token Triggers uiObjectInfoApi Upload Files VSCode Web Services XHR
Scroll To Top