Deploy selection

Deploy files to your organization using 'Deploy Selection' action. It can be performed in several ways:

  • Select files or folders in the project view, then call context menu and choose 'Deploy Selected ...'.
  • Call the same action from the editor context menu or the main Salesforce menu to deploy the file opened in the editor.

The deployment result is reported in the Salesforce tool window. This includes all the errors and warnings, each with file name and row and column numbers specifying where the problem occurred. JetForcer can also navigate you to the actual problem location in the source code.

Deploy to multiple accounts

Some users, that do not use CI strategy, might need to deploy files (usually less than 10) to multiple accounts (Salesforce instances). For this case, JetForcer provides 'Deploy to Multiple Accounts...' action - in addition to the existing 'Deploy selected files' action. It is also available from both context menu and Salesforce main menu. The action will show a popup dialog with the account list with checkboxes, so the selected files will be deployed to all the checked accounts (checkboxes state will be preserved for the current project between popup dialog openings).

Introduction to ApexVCS

In addition to the 'Deploy Selection' action, JetForcer provides one more method to deploy changed files to server - ApexVCS. ApexVCS was inspired by Git integration with IDEA, so you might be familiar with what described in the next paragraph if you’re already using Git in JetBrains IDEs. If so, then just read the section about what are the differences between ApexVCS and others VCS and share this doc with a friend of yours, who is still wondering what is ApexVCS and why is it needed.

ApexVCS originally supports most of the unified Version Control Functionality

  • The standard VCS actions like commit (deploy), update, rollback, show differences, shelve, etc.
  • Local Changes tab with Changelists support
  • Update Info tab that shows the result of update from the remote project with ‘Show Diff’ and ‘Group by Package’ actions
  • Highlighted gutter bar dedicated to the changed lines of code with 'Next', 'Previous', 'Rollback', 'Show Difference' and 'Copy' actions
  • 'Commit Changes' (all changes in the project) and 'Update Project' actions
  • Common VCS settings as well as ApexVCS dedicated submenu

Differences between ApexVCS and other VCS-s

  • View revision history for file/directory is not supported in ApexVCS.
  • ApexVCS 'Commit' action immediately deploys your changes from the local project to the Salesforce instance. This action is similar to 'Commit and Push' in Git.
  • All the new files are automatically added to the ApexVCS index unlike Git, where there is a separate 'Add to Git' action.
  • Ability to switch active VCS (this action is specific for JetForcer projects that are under two VCS-s, e.g ApexVCS and Git)

Version Control Tool Window

View | Tool Windows | Version Control
Alt+9

This tool window is always present for ApexVcs or any other active VCS.

It displays VCS-related information, like changes or shelved files, and VCS-specific actions within several tabs:

  • Local Changes tab contains all the changed files that aren't deployed yet and a toolbar with all the VCS actions
  • Update Info tab shows result of update from the remote project with ‘Show Diff’ and ‘Group by Package’ actions

Changelists

Any source code modification that isn't committed (deployed) represents a 'change' that is tracked by VCS. All the changes are stored in 'changelists', which are a handy way to manage your changes: to group them, to keep an eye on certain ones, etc. Changelists are shown in the Local Changes tab in the Version Control window.

Changelists can be created, deleted, edited, also, changes can be moved between changelists. By default, any new change is added to the 'active' changelist, which is the one displayed on top of the Local Changes tab. Any changelist can be set active.

As it was said above, change is created for any source code modification, which means for any created, modified, deleted or renamed (moved) file. These are all the actions to manage your changes:

  • Commit (deploy) changes or the whole changelist.
  • Jump to the source code from a change.
  • Rollback changes.
  • Shelve and unshelve changes.
  • Show differences for selected change.
  • Refresh changelists.
  • Create, remove, edit changelists.
  • Set active changelist.
  • Move files between changelists.
  • Switch active VCS (this action is specific for JetForcer projects that are under two VCS-s, e.g ApexVCS and Git).

Update Info Tab

The 'Retrieve' command allows you to synchronize your local files contents with the Salesforce instance. You can invoke this action to update selected files and directories or the whole project.

When the action is completed, all the updated files are listed in the Update Info tab in the Version Control tool window with the 'Show Diff' and 'Group by Package' actions. If all the files are up-to-date, a corresponding notification is shown.

Switch Active VCS

In most cases user needs to use two VCS-s:

  • ApexVCS - for deploying changed files to the Salesforce instance
  • Git (or other VCS) - to maintain teamwork on the project.

You can work with two VCS-s combined, but only one VCS can be active at a time. Active VCS can be switched at any time in several ways:

  • In the main toolbar (VCS | Switch from ApexVCS to Git).
  • In the main toolbar (VCS | Switch from ApexVCS to Git).
  • In the status bar (Click on 'Active VCS' widget).
  • In the context menu in the editor.
  • In the action toolbar of the Version Control tool window.

Accept Local State as Server State

ApexVcs indexes the project to track the state of the each source file. We always make sure that all the indexing works correctly, but things happen and there is a slight possibility that one day the system cache becomes broken. This situation can be solved by cleaning out the cache.

To clean out the system caches (ApexVCS indices):

  • On the main menu, choose VCS | ApexVCS | Accept Local State as Server State.

The Rewrite Repository message appears informing you that this action will reset ApexVCS repository and accept the local state as server state.

It is important to note the following:

  • The files are not actually deleted.
  • All the changes in Changelists in the Version Control tool window will be cleared.

Offline Validation

The good news for Salesforce developers is that JetForcer provides source code analyzer for Apex, Lightning, Visualforce and other supported languages, which allows to save plenty of time that validation on server and subsequent error correction would normally take.

JetForcer detects errors on the fly, as code modified in the editor, and highlights them with curly underline (or with red font in some cases). The error description is shown when the mouse pointer is hovered on the error.

Offline validation doesn't limit user actions - deploy, retrieve and any other actions can be applied to a file with errors.

Inspections

JetForcer helps you to improve your code through inspections, that detect validation errors and also inefficient code fragments, which includes redundant code, unused symbols, spelling problems and more.

The nice part about this feature is that inspections are highly customizable - they can be enabled or disabled, you can define scopes for them or code fragments where a certain one is suppressed, change each one's severity, create profiles with a custom set of inspections, etc.

Validate on Server

As an alternative to the Offline Validation you can validate your code on server.

The analysis can be invoked in several ways:
  • Select files or folders in the project view, then call context menu and choose 'Validate Selected ...'.
  • Call the same action from the editor context menu or Salesforce menu to validate the file opened in the editor.

JetForcer reports validation results in the Salesforce tool window. All the errors and warnings are listed with file name and row and column numbers specifying where the problem is. You can also navigate from the error description to the actual problem location in the source code.

Type Aware Completion

JetForcer filters completion options based on the type inference and the context. The most applicable classes, fields, methods, and variables are shown on the top of suggestion list.

Complete Statement

JetForcer completes the ending part of a statement, i.e. it adds required parentheses, brackets or braces, and applies all the necessary formatting.

Getter/Setter

Getter and setter signatures are completed based on class fields.

Implement/Override Methods

JetForcer helps you to override or implement methods without extra typing - you type only method's name, choose the corresponding stub in the menu and the method is automatically generated.

Member Name Completion

Variable and method names are suggested based on the type

Names and Keywords

Keywords and names are suggested based on the context

Parameter Info

JetForcer shows parameter info for methods and constructors, including all the overloaded ones. If you've already typed some parameters, the most suitable options are highlighted. It comes especially in handy if there are many overloaded options and user needs to find the most matching one.

Postfix Completion

The purpose of this feature is to generate some often used expressions, like null check, instance of check or for loop. But the best part of it that it does not simply generate - you apply it to an existing expression to wrap it into another one.

Let's say you want to wrap an array in a for loop - just type dot after the reference to the array and completion will suggest you 'for' option. If you choose it, JetForcer will generate for you a for loop with your array already wrapped in it.

Quick Definition Info

Quick Definition is a popup with a definition of a symbol, that allows you to avoid distracting from your current location in code. You can invoke it via Ctrl+Shift+I not only for a symbol in the code but also for a completion option, which can really speed up the process of choosing the right symbol.

Introduction

Let JetForcer generate members for you instead of wasting your time on routine typing - just press Alt+Insert and it determines what members can be generated in the current context and suggests them in the Generate pop-up menu.

Constructor

Create constructors in a few seconds with JetForcer - just invoke Generate pop-up menu, select Constructor, choose fields that you want to initialize in it and a base constructor, if needed, and JetForcer will generate a new constructor with all the options you've chosen.

Override and Implements Methods

Use code generation to implement or override inherited methods - all the available options will be suggested in a list, simply choose methods you want and a stub will be generated for the each selected method.

Test Methods

Test methods can also be generated: place caret in the test class where you want to have a new method, invoke Generate menu and select Test Method.

Generate Server Controller call

JetForcer can also generate a stub call to a server controller in a client controller. To invoke the feature do the following: open the corresponding client controller in the editor and place the cursor where you want a server controller call to be generated, then press Alt+Insert and select 'Call to server controller from the Generate menu.

Create from Usage

Sometimes while coding you want to use an entity, that isn't declared yet - for that case we have another time-saving feature: just type the name of the entity and JetForcer will suggest a quick-fix, that generates it. It can be a class, a field or a property, a method, a local variable - JetForcer will suggest you all the appropriate in the context options. Moreover, it will detect the type, and in case it's a method that would be not only the return type but also types of its parameters.

Configuring Code Generation options

Code Generation is a flexibly configurable feature - you can choose a naming style for different entities, default visibility or members order. The full list of what can be customized you can find in File | Settings | Editor | Code Style | Apex | Code Generation.

Quick-Fixes

JetForcer does not only detect errors but also often knows how to fix them or how to improve your code. It collects all the possible solutions (quick-fixes) for a particular case and suggests them to you. Then all you need is to choose the best one and the issue will be promptly fixed. JetForcer comes with many quick-fixes for Apex, Visualforce, Lightning and other supported languages.

Applying quick-fixes

If you place the caret on the highlighted code and see a light bulb to the left, that means that some quick-fixes are available for it. The bulb can be red if there is an error or yellow in case it's warning, suggestion or hint. To see the list of available quick-fixes click on the light bulb or press Alt+Enter. Then choose a quick-fix you want and it will be applied right after you made your choice.

Fix in scope

Some quick-fixes can be applied not only to a single code fragment but also to some scope. If there is a small arrow next to the fix name, you can click on it or press the right arrow on the keyboard and that will show you a list of possible scopes - the current file, the whole project, etc. Quick-fix will find all the matching cases in the selected scope and fix them.

Fixing unresolved symbols

In case there is an unresolved reference in the code, JetForcer analyzes what symbols are appropriate in the reference context and suggests corresponding quick-fixes to generate a declaration of a symbol.

Intentions

Intentions are small changes in code that JetForcer can do to relieve you from some routine tasks - introduce variable, change access modifier, convert for to foreach or back, etc. Place the caret on the element you want to change, press Alt+Enter and JetForcer suggests all the available intentions. This feature is available in Apex, Visualforce, Lightning and other supported languages.

Using code refactorings

To invoke a refactoring use its keyboard shortcut or choose it in the JetForcer's Refactor menu while the caret is placed on a code selection or on a symbol you want to refactor.

You can also call 'Refactor this' from the Refactor menu and JetForcer will show you all refactorings available in the current context.

Undo

The very handy thing about refactoring is that when you invoke undo after applying it, that will rollback all the changes made by refactoring, no matter how complicated it was.

Rename

This feature provides a great assistance in renaming code symbols such as types, fields, properties, methods, local variables, etc. It finds all references and corrects them automatically, which can include usages in comments and strings if corresponding options are set.

Rename works with all supported languages, including Apex, Visualforce, Lightning, SOQL, and others.

Use Refactor -> Rename to invoke this feature.

Change Signature

Change signature refactoring allows you to:

  • Rename method.
  • Change return type.
  • Change parameters types.
  • Add, remove, reorder or rename parameters.

JetForcer finds all usages, including calls, overrides, and implementations, and changes them along with changing the signature. In overriding methods parameter passed to the method is passed to the base call. If you're adding new parameters, you can provide default values for them and they will be substituted in all calls.

Rename base method

When you invoke rename refactoring on a method in a derived class, there is an option that allows to refactor also its base methods.

Extract Refactorings

Apply extract refactorings to literals, expressions or blocks of code to extract constant, variable, method and more.

Safe Delete

Remove files and symbols safely using the Safe Delete refactoring - it searches all usages of an entity before deleting it, so you can explore them and make any changes you need to keep your code valid.

To invoke it call Refactor | Safe Delete from the context or the main menu.

Syntax highlighting

Besides the default Intellij Platform highlight support there is a custom code highlighting which you can configure in Settings | Editor | Color Scheme (or Color & Fonts). For example, you can use it to distinguish local variables from fields.

Viewing quick documentation

To see the documentation for a type, field, method or other symbols right in the editor place the caret on it and do one of the following:

  • Press Ctrl+Q.
  • Go to View | Quick Documentation Lookup.
  • Simply hover the mouse pointer over the symbol if 'Show quick doc on mouse move' in the editor settings is set to true

This will invoke a pop-up window with documentation and clickable links to the other resources, mostly to the Salesforce documentation.

Highlighting matching delimiters

When you place the caret next to or right before a bracket, brace or parenthesis, the matching (closing or opening) character is highlighted. In XML-like languages, the matching tags are highlighted.

Duplicate line or selection

Duplicate a line or a block of code instantly - simply place a caret at a line or select a code block and press Ctrl+D.

Auto-insertion of delimiters

When you open parentheses, brackets, quotes or braces, the closing character is inserted automatically. Of course, if the paired character already exists, JetForcer won't add anything redundant. The feature works in Apex, Visualforce, Lightning and other supported languages. Also, it can be switched off.

Code reordering

Move code fragments quickly with a simple combination Ctrl+Shift+Alt+Up/Down/Left/Right. You can use it to move members up and down, reorder statements within a block or move them into/out of the block, rearrange parameters or arguments, in XML-like languages - to move tags and attributes and more.

Commenting/uncommenting code

Comment or uncomment your code in a second with Ctrl+/ (line comment) or Ctrl+Shift+/ (block comment) combinations. Select a code block or lines you want to comment and press corresponding keys. If you want to comment a single line, it's enough to place the caret on it and invoke line comment. If you invoke a block comment with no code selected, the opening (/*) and the closing (*/) characters will be inserted right before and after caret.

Pasting items from clipboard history

JetForcer provides a special Paste command accessible by Ctrl+Shift+V that opens your clipboard history since the IDE start and allows you to chose and paste any item that was copied to the clipboard. The history clears when you close JetForcer.

Splitting string literals

Split a string literal into lines without changing its value in one keystroke - place the caret within a string literal and simply press Enter or Shift+Enter, and JetForcer will transform it to several lines with all the required quotation marks and plus characters.

JetForcer is a powerful Lightning development tool and it delivers support for the full development stack including client-side and server-side development. Let's take a closer look at the most useful features:

Instant error detection

Detect errors before runtime

Most Lightning developers are familiar with the problem, that some types of error can be detected only during the runtime. Obviously, this can be quite a drawback in a development flow, that's why JetForcer helps you to find these issues beforehand, as you code in the editor. JetForcer is able to:

  • Detect an attempt to call an unreachable attribute, method, variable, property, class, etc. (in other words - unresolved reference).
  • Detect wrong case in a built-in attribute name or in a lightning expression.
  • Highlight nonexistent built-in and custom tags.
  • Highlight nonexistent attributes.
  • Check attribute value assignment.
  • Validate static resource path.
  • ... and perform many other useful checks.

Quick-Fixes

JetForcer also provides a number of quick-fixes for Lightning, which includes a highly demanded 'create from usage' fix. Component, lightning event, lightning interface, class, component attribute, controller method, property and many other entities can be created in two clicks. Just press Alt-Enter and make your choice.

Completion

As we all know, code completion is one of the most important features in any IDE, that's why JetForcer is designed to provide incredibly helpful and intelligent completion. Auto-completion is available for:

Custom and built-in tags and their attributes

Attribute values

v. (View) and c. (Controller) value providers (in both expressions and client controller)


JavaScript API from Aura Framework


aura:id


Controller method parameters


... and for many other cases.

Code Generation

Some Lightning code constructs can be easily generated by JetForcer. Press Alt-Insert or use Code | Generate in the main menu, and you will be suggested a list of available constructs to generate based on the caret position and the current context.

Language Injections

JetForcer provides a unique feature called Language Injection. Let's say there is a Lightning attribute containing a piece of JS code - the feature provides all the editing power (validation, completion, syntax highlighting, etc.) for the attribute value, which helps to avoid possible mistakes and speeds up the whole coding process.