Considerations for Force.com IDE 2 (Beta)

Here are some known issues you might run into while using Force.com IDE 2.
Note

Note

This release contains a beta version of Force.com IDE 2, which means it’s a high-quality feature with known limitations. Force.com IDE 2 isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for Force.com IDE 2 in the Salesforce DX Beta group in the Success Community.

General Known Issues in Force.com IDE 2

Creating Your First Project or Source File Can Fail or Take a Long Time
Description: If you use Force.com IDE 2 before installing the Salesforce DX CLI plug-ins, the IDE installs the plug-ins for you when you create a project or source file. This process can slow down source file creation or cause it to fail. If you try to create a project before installing the plug-ins, it fails and you get an error that a class couldn’t be instantiated.
Workaround: Try again to create the source file or project. Because the IDE has installed the CLI plug-ins for you, the creation request succeeds.
Org Status Label for Project Doesn’t Refresh Automatically
Description: When you authorize a Dev Hub, or create or authorize a scratch org, the label that shows the status of your connected org in the Project Explorer doesn’t refresh.
Workaround: To refresh the label, click the name of your project in the Project Explorer.

Known Issues in Apex Code Analysis

Completion Unavailable for Some Types
Description: The Force.com IDE 2 Apex code analysis is powered by a beta version of the Apex Language Server, which conforms to the Language Server Protocol. This beta version offers code completion only for the following types:
  • Standard Apex library
  • User-defined types (classes, inner classes, interfaces, inner interfaces, enums, and inner enums) in your project

Code completion for standard objects, custom objects, and the code in managed packages isn’t available.

Workaround: None
Fixed Syntax Errors Sometimes Don’t Disappear
Description: After you fix a syntax error, the corresponding error indication sometimes still shows up in Problems view and your source file.
Workaround: Restart Force.com IDE 2 by selecting File | Restart.
Syntax Highlighting Sometimes Fails on Newly Opened Files
Description: When you open an Apex class or trigger, syntax highlighting sometimes doesn’t work.
Workaround: Close and reopen the file.
Numerous Errors Are Sometimes Logged
Description: When you’re editing a file, errors are occasionally logged on each keystroke.
Workaround: Restart Force.com IDE 2 by selecting File | Restart. If the issue persists, in the Error Log view, disable Activate on new events. To access this option, click the Error Log view’s arrow button.

Known Issues in Apex Testing

Running Test Classes with No Test Methods Shows a Confusing Error
Description: If your test run includes an Apex class that’s annotated with @isTest but doesn’t contain test methods, the test run fails. The message ERROR running force:apex:test:run: Cannot read property 'message' of undefined. is returned in the error log.
Workaround: If your test run fails with a generic error, make sure that all test classes in the run contain at least one method with the @isTest annotation or the testMethod keyword.
Test Suites Must Be Hand-Coded or Retrieved via Metadata API
Description: You can’t pull Apex test suites from a scratch org.

Workaround: Retrieve your test suites using sfdx force:mdapi:retrieve and then convert your project to the Salesforce DX format using sfdx force:mdapi:convert. Or, create your test suites by hand.

  1. Create a testSuites directory. From the Project Explorer, right-click the directory within tests where you want to store your test suites and select New | Folder.
  2. Right-click your testSuites directory and select New | File.
  3. Give your test suite a name that ends in .testSuite. For example, MySuite.testSuite.
  4. Customize your test suite using the XML format specified in ApexTestSuite in the Metadata API Developer Guide.
  5. To push the test suite to your default scratch org, right-click your project in the Project Explorer and select Salesforce DX | Push Source.
  6. Set up a test run configuration that includes the suite, as described in Run Apex Tests in Force.com IDE 2.