2.2.8.2 release notes

2.2.8.2

  • Issue 2418 - Added a number of new configuration options for Apex code generation:
    • Generate ApexDoc - When checked, automatically includes an appropriate ApexDoc comment for generated constructors and getters/setters. Note that if the Enable ApexDoc formatting formatter option is not enabled, the user will be prompted to enable it to ensure that generated comments are formatted correctly.
    • Generate single line methods - When checked, getters and setters are generated as compact single line methods. Note that if the Keep when reformatting | Simple methods in one line formatter option is not enabled, the user will be prompted to enable it to ensure that the generated method isn't immediately formatted across multiple lines.
    • Generate Builder Pattern/Fluent API-style setters - When checked, setters are generated according to the Builder Pattern/Fluent API where, after the field value is set, the instance is immediately returned, allowing complex state initialization via method chaining. Note that Generate single line methods will not apply to generated setters when this option is enabled.
    • Setter prefix - When Generate Builder Pattern/Fluent API-style setters is checked, allows selection of the prefix used for generated setter method names. By default this is the standard set, but with can be selected to support a common convention for Builder Pattern/Fluent API implementations. Note that changing the prefix will cause the dialog to briefly reset so that it can filter the offered fields based on which already have setters matching the selected prefix.
  • Issue 2420 - Updated the Apex Invalid Type code inspection to verify the number of type parameters for parameterized type references.
  • Issue 2421 - Fixed an issue with the cast Apex postfix completion template where it would always operate on the top-level expression. I also enhanced this template to show not only the selected expression's evaluated expression types but also any inferred expression types for the current context to ensure that the expected types are offered for the cast operator.
  • Issue 2422 - Prospective fix for an issue with Salesforce CLI execution against NPM-based installs (on Windows only?) when the CLI is executed without any project context. Previously IC2 would execute the CLI with a working directory of the CLI executable's parent directory; now it will attempt to use the user's home directory before degrading to the executable's parent directory if no project directory context is available.
  • Other improvements and fixes related to the recent Apex code generation features.

SALESFORCE CLI KNOWN ISSUE - I've been hearing from quite a few users recently about a problem where the v1 Salesforce CLI fails to execute due to an error like the following:

Error running the Salesforce CLI: .../bin/sfdx: No such file or directory

This is the result of a known issue with the v1 Salesforce CLI where, due to a lack of updates since the release of v2, the v1 CLI is effectively being uninstalled by its own auto-update logic. I have also filed a KB item-style issue in the IC2 public issue tracker on the topic.

The short version is that if you haven't already done so, please uninstall your current v1 CLI completely and install the latest-and-greatest v2 CLI.

The v2 CLI fully supports all of the previous sfdx commands including the colon-delimited syntax, so this should not require any changes to existing scripts or other tools that have been built atop the Salesforce CLI's historical calling conventions.