Deploy files to your organization using 'Deploy Selection' action. It can be performed in several ways:
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.
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).
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
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:
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:
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.
In most cases user needs to use two VCS-s:
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:
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):
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 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.
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.
As an alternative to the Offline Validation you can validate your code on server.The analysis can be invoked in several ways:
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.
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.
JetForcer completes the ending part of a statement, i.e. it adds required parentheses, brackets or braces, and applies all the necessary formatting.
Getter and setter signatures are completed based on class fields.
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.
Variable and method names are suggested based on the type
Keywords and names are suggested based on the context
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.
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 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.
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.
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.
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 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.
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.
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.
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.
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.
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.
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.
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 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.
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.
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.
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 refactoring allows you to:
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.
When you invoke rename refactoring on a method in a derived class, there is an option that allows to refactor also its base methods.
Apply extract refactorings to literals, expressions or blocks of code to extract constant, variable, method and more.
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.
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.
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:
This will invoke a pop-up window with documentation and clickable links to the other resources, mostly to the Salesforce documentation.
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 a line or a block of code instantly - simply place a caret at a line or select a code block and press Ctrl+D.
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.
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.
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.
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:
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:
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.
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:
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.
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.