2.2.5.5 release notes

 2.2.5.5

  • Issue 1474 - Fixed an issue with Apex class file templates configured to behave as live templates. Now an Apex class created against a live template-enabled file template with at least one user-populated variable must be finished or cancelled before file creation post-processing steps such as supporting meta.xml file creation, automatic subscription updates, and automatic deployment are performed.
    As part of this work I also extended the template-based file creation features to allow the use of live template macros for the template variables. Because there's no first-class auxiliary metadata mechanism for these variables, I've extended the templating system to allow them to be specified in the template itself using comments of the form:
    // <variableName>.[expression|defaultValue|alwaysStopAt]=<value>
    The order of template variable evaluation is based on the order of these directives if present or the order of the variable usages themselves in the template if not. These comments are only used for template variable configuration and are automatically removed from generated files, of course.
    The user guide includes topics on how to create custom file templates and how to author live templates.
    Note that this feature is currently only available for Apex class file templates. If there's an interest in making it available for other file templates, please let me know via the public issue tracker.
    A demonstration video is available here.
  • Issue 2278 - When detecting the project structure during initial project import/conversion, detected source roots with paths that contain test or tests are now designated as test source roots.
  • Issue 2292 - When implementing an interface method that is already implemented in a base class, the override modifier is now properly added to the generated method.
  • Added support for postfix completion in Apex including the following postfix completion templates:
    • cast - Surrounds an expression with a cast.
    • castvar - Creates a new variable for the expression with type casting.
    • for/iter - Iterates over a collection of elements.
    • fori - Iterates with an index over a collection.
    • forr - Iterates with an index over a collection in reverse order.
    • inst/instanceof - Surrounds an expression with instanceof.
    • new - Inserts a constructor call for a class.
    • not - Negates a boolean expression.
    • nn/notnull - Adds a check verifying that an expression is not null.
    • null - Adds a check verifying that an expression is null.
    • par - Parenthesizes an expression.
    • sd - Logs the expression using System.debug().
    • sdj - Logs the expression using System.debug() formatted using JSON.serializePretty().
    Note that postfix templates are not currently editable or extensible, though I may add support for custom postfix completion templates if I see requests for it. Similarly, I didn't try to port each and every postfix completion template for existing JetBrains languages to Apex, only those that I thought would provide the most significant benefit to IC2 users. Of course, that's based on one person's opinion, so if there are specific postfix templates you'd like to see brought over to Apex, please let me know about them.
    A demonstration video is available here.
  • Fixed several issues evidenced by the Nebula Logger open source code base, most specifically an issue where transitive reference resolution could occur in a few situations relative to the wrong element resulting in the possibility of resolving local project classes from system Apex types or types from installed namespaced packages.
    This raises an excellent point. If you're incorporating open source projects into your own IC2 project(s) and are seeing false negatives or other issues in the code from those open source projects, please let me know about that. I use an extensive set of open source projects in IC2's extended smoke/regression test environment and would love to have the opportunity to address such issues for you and all other IC2 users who are also using those open source projects.
  • Generalized the Apex formatter option for alignment of multiline string concatenation expressions to apply to all arithmetic and logical expressions including proper consideration for minor indent offsets from parenthesized sub-expressions. The new option can be found as Settings / Preferences > Editor > Code Style > Apex > Tabs and Indents > Align multiline arithmetic and logical expressions.
    If the original formatter option was enabled in a project's profile, the new option will be automatically enabled. Note that this generalization of the setting may result in slight changes to existing formatted Apex source code the next time it's formatted, but hopefully you'll find those changes to be for the better. I recommend that you consider enabling this option and formatting your Apex source files to see if it's for you as (in my opinion) it produces very nice formatting of (potentially complex) composite arithmetic and/or logical expressions that span multiple lines.
  • Fixed a few issues with metadata enumeration and presentation, specifically for:
    • Valid metadata types which aren't reported by the Metadata API.
    • Child metadata files in source format found without a parent metadata file when a decomposed instance of the same object exists elsewhere in the same module with a parent metadata file (quite the corner case).
    • Modules which include multiple metadata files for the same metadata type/name combination.
  • Implemented a number of improvements around project import/migration notifications where the user might have been notified of an invalid module while those exact problems are in the process of being resolved, e.g., during offline symbol table resolution.
  • When addressing a validation error for an expired or otherwise unresolvable scratch org, the module's existing connection name is now defaulted as the org alias value in the scratch org creation dialog.
  • Other minor fixes and improvements.