2.2.1.0 release notes

 2.2.1.0

  • Issue 2048 - Restored the Deploy on save > Deploy all modified files option which was removed in 2.2.0.5. When enabled (enabled by default as it was previously), in addition to all explicitly-selected files, deploy-on-save actions include all files modified locally since the last deploy-on-save.

    NOTE: Enabling this option does not turn deploy-on-save into a full bring-org-up-to-date action. Only files modified in the IDE since the last deploy-on-save action are added to the deployment payload beyond the explicitly-selected files. To update the target org with all local changes, the Deploy Modified Metadata action should be used to add and update metadata that is newer locally than in the org, and if removals are also required, the Delete Metadata action can be used with a custom selection, filtering the dialog contents to show server-only and unsubscribed metadata.

    ASIDE: The removal of this option taught me an interesting and valuable lesson. When there are issues with a feature you hear about them, but when a feature is working well for people you often don't receive that feedback (and to be clear, that's totally fine). The feature enabled by this option is not without its issues due to how file/editor dirty state is tracked and reported by JetBrains' IDEs—you can read about how some of those issues manifest in my comments on issue 2048—but overall this feature seems to have provided significant value and convenience to some IC2 users. Its abrupt removal was both surprising and disruptive to those users. I'll definitely research usage of and satisfaction with features—even those with known issues—in the future before removing them or changing them in significant ways.

  • Apex formatter enhancements and fixes - In the process of implementing the recent enhancements for ApexDoc and formatter-based keyword/usage case correction, I found a number of issues and omissions in IC2's Apex formatter as a result of using it to format numerous open source projects. This build includes both fixes and small enhancements for many (but not all) of those issues and omissions. For the most part, enhancements are either enabled or disabled as appropriate to maintain backward compatibility, but some of the fixes will result in changes to how IC2 formats Apex code, albeit as a correction rather than as change for change's sake. I'll call out those types of changes as appropriate below.
    • Added a new Apex formatter option, Spaces > Around operators > Annotation parameter assignment operator (=) (disabled by default), for controlling spaces around = in Apex annotation attribute value assignments. NOTE: This may result in formatting changes if the existing code does not consistently match the setting for this new option as whitespace around annotation parameter assignment operators was not adjusted previously.
    • Added a new Apex formatter option, Tabs and Indents > Align multiline concatenated strings (disabled by default), that when disabled formats multiline concatenated strings as a standard continuation (same as previous behavior), e.g.:
      String multiLineConcatenatedString =
          'Multiline ' +
              'concatenated ' +
              'string';
      and when enabled aligns the concatenated strings, e.g.:
      String multiLineConcatenatedString =
          'Multiline ' +
          'concatenated ' +
          'string';
    • Added a new ApexDoc formatting option, ApexDoc > General > Box comment policy, to determine how documentation comments with more decorative begin/end lines should be handled during formatting, e.g.:
      /*************
       * Box comment
       *************/
      The following options are available:
      • Retain (default) - the begin/end lines of existing box comments are retained exactly
      • Convert - the begin/end lines of existing box comments are converted to /** and either */ or **/ as appropriate based on Comment end style configuration
      • Balance - the begin/end lines of existing box comments are adjusted to match the longer of the two if not already so
      • Optimize - the begin/end lines of existing box comments are adjusted to match the longest content line in the formatted ApexDoc comment
    • NOTE: Each of the following fixes will result in formatting changes if the respective patterns are used:
      • Issue 1901 - Fixed an issue with how reference expressions (i.e., something.somethingElse()) are formatted when split across lines, particularly for fluent APIs and the builder pattern, e.g.:
        String query = new al.SoqlBuilder()
            .selectx(new al.SoqlBuilder()
                .selectAll()
                .fromx(ShoppingList__c.Items__r.getDescribe().getName()))
            .fromx(ShoppingList__c.SObjectType.getDescribe().getName())
            .toSoql();
      • Fixed several issues with spaces within various elements including SOQL sub-query expressions, SOQL functions, trigger DML lists, etc.
      • Fixed an issue with parentheses of flow control expressions, e.g., iffor, and while conditions, not aligning properly when split across multiple lines.
      • Fixed an issue where bracketed SOQL or SOSL query expressions used as method invocation arguments on distinct lines would not be indented properly.
      • Fixed an issue with the SOQL WHERE clause expression not being indented properly when placed on a separate line.
      • Fixed an issue with conjoined parenthesized sub-expressions in a SOQL WHERE clause with the sub-expression parentheses on separate lines.
      • Fixed an issue with the SOSL RETURNING clause being indented incorrectly.
      • Made the Apex formatter allow a SOQL SELECT sub-query to be placed on either its own line or on the same line with other items in the SELECT list. Previously the formatter would move the sub-query based on the setting for Wrapping and Braces > Braces and brackets placement > In SOQL/SOSL query.
    • Fixed an issue with the way that spaces are preserved around keywords, particularly when using the IDE's smart join lines action.
    • Changed the ApexDoc formatter to use a StringBuilder instead of string concatenation as a memory optimization during bulk formatting passes.