Apex Intention Actions-%0AThe Next Frontier for%0AApex Completions%0A

Apex Intention Actions: The Next Frontier for Apex Completions

Idea from IDEa

Recently, I needed to code a little tool in Java. The last time I coded something in Java was in high school, so it was a nice exercise for me to dust off my Java and get back up to speed on learning some new stuff, too. I used IntelliJ IDEa this time and found their so-called “intention actions” or “bulb actions” quite helpful. After coming back to developing in Salesforce I really missed some of them, because they really sped up my work. This lead me to take a look at Sublime’s Package Control, and when I found nothing similar there, I decided that maybe I’m not the only one who’d like to have those.

What are my intentions?

I thought – which actions do I do most often, and hence are good candidates for automation? I came up with this list:

– Add getter

– Add setter

– Add both getter and setter

– Add constructor parameter

– Add class constructor

– Add init method and call in each constructor

– Add 0-arg constructor and init method

– Add method overload

These are basic actions that you can do quickly with “Apex Intention Actions”.

How this works

The plugin analyses the first string you have your cursor on and suggests actions you can do quickly with it. It’s not automatic, so you need to call the plugin by tapping a hotkey.

You can also use hotkeys for all of the actions.

Future

The plugin is maintained, though I plan to migrate to VS Code for Salesforce development. So, soon Apex intention Actions will run on VS Code! 🙂

The project also has a wiki, so you can find more info there.

Try it yourself!

1 Comment
  1. Salesforce | Michael Shumenko
    Michael Shumenko 1 year ago

    Hi, just try JetForcer plugin for JetBrains IDEs. It has many intention actions out-of-the-box https://jetforcer.com/features#quick-fixes-and-intentions

Leave a Reply

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?