Question Stefan Cronje · Feb 1, 2022

VSCode: Formatter not found

Hi,

I am using VSCode together with IRIS 2021.1.
When using Shift+Alt+F to reformat a class file, it pops up with the below message. When I select install formatter, it routes me to the extensions page, where it shows the extensions as being installed. Any advice will be appreciated.

 

 

Product version: IRIS 2021.1

Comments

Stefan Cronje  Feb 1, 2022 to Brett Saviano

I have had the Pack installed from when I installed VSCode.

 

0
Brett Saviano  Feb 1, 2022 to Stefan Cronje

I'm sorry, I misread the end of your post.Can you please answer Julian's question below? If the class is saved then the formatter should work.

0
Julian Matthews · Feb 1, 2022

Hey Stefan.

Is the file saved as a class when trying to run the formatter? I found previously that it's not enough to just set the language in a new class, but the file needs to be saved as the formatter relies on the file extension.

0
Stefan Cronje  Feb 2, 2022 to Julian Matthews

The files are .cls.

I have noticed now a popup error on the bottom right regarding the Java Runtime Environment and sonarlint.
I will look into this first, I probably missed instructions somewhere.

I installed the latest JDK, then updated the sonarlint JavaHome setting to align.

I am getting the following now, and I have no idea on how to resolve it.
Unable to load component class org.sonarsource.sonarlint.core.analyzer.sensor.PhaseExecutor

Stupid question: Do I need to be running a SonarQube locally?

0
John Murray  Feb 2, 2022 to Stefan Cronje

From the Command Palette please run "Format Document With...".

Do you see this?

If not, what does the "Configure Default Formatter..." option show (assuming it is there for you)?

0
Stefan Cronje  Feb 2, 2022 to John Murray

There is only a Format Document option, not a "with" one.

 

0
Stefan Cronje  Feb 2, 2022 to John Murray

If all else fails, uninstall all the extensions related to CacheQuality and ObjectScript.
Restart VSCode
Install the Extension Pack
It works.

0