Install SonarLint for older eclipse based IDE

Hello
Recently we decided to switch to SonaLint. Unfortunately the IDE we use is eclipse Juno (service pack version 4.2).
I manged to add the eclipse market place manually and then I could select SonarLint in the marketplace but the installation failed.

With the following message:

 Cannot complete the install because one or more required items could not be found.
   Software being installed: SonarLint for Eclipse 6.1.0.36269 (org.sonarlint.eclipse.feature.feature.group 6.1.0.36269)
   Missing requirement: SonarLint for Eclipse Core 6.1.0.36269 (org.sonarlint.eclipse.core 6.1.0.36269) requires 'bundle org.eclipse.jface.text 3.10.0' but it could not be found
   Cannot satisfy dependency:
     From: SonarLint for Eclipse 6.1.0.36269 (org.sonarlint.eclipse.feature.feature.group 6.1.0.36269)
     To: org.sonarlint.eclipse.core [6.1.0.36269]

Some Details about my eclipse installation:

Eclipse IDE for C/C++ Developers
Version: Juno Service Release 2
Build id: 20130225-0426

Can you see a possibility to still install the SonarLint plugin in this IDE?

Hello, welcome to the community! And thank you for your question.

Unfortunately, recent versions of SonarLint (5.9+) require at least Neon as base platform.

You should be able to install one of the older versions of SonarLint (which is better than nothing I guess) - though the last one that supports Juno is probably very old in terms of rules, features, etc.

I am not quite sure what that version would be, this is probably something that we should document somewhere.

You can try to perform an offline install using one of the P2 ZIP from the SonarLint for Eclipse archives, going up in the versions until you find one whose dependencies are satisfied by your IDE.

Yes this worked already better. I could install without errors. But after restart of the IDE the SonarLint Menu is not available.

This picture shows that installation was successful with 4.3.0

And this picture shows that the menu lacks an entry for SonarLint

Do you have any hints? I have already restarted eclipse and since this was not enough I also restarted the computer.

I with SonarLint v1.3.1 it is possible to view the menu. But is the language C supported? Is it necessary to bind to SonarQube Server. We have the Server too, but I can’t find the settings.

Unfortunately, analysis of C and C++ was introduced in version 2.5 of SonarLint for Eclipse.

I downloaded “Eclipse Juno for C/C++ developers” and indeed, it looks like the SonarLint plugin is installed, but not resolved (and thus not started by Eclipse). I’m trying to understand which dependency is not satisfied.

[EDIT]
All right, with the Eclipse plugin-in development tools installed, I can see that the plugin is not started due to:

The following problems were found:
  Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-1.8
  Missing optionally required bundle org.jsr-305_0.0.0
  Missing required bundle org.sonarsource.sonarlint.core.sonarlint-client-api_4.0.0
  Missing required bundle org.sonarsource.sonarlint.core.sonarlint-core_4.0.0
  Missing host JavaSE_0.0.0

I found a workaround on StackOverflow, which requires to patch file ${ECLIPSE_JUNO_HOME}/plugins/org.eclipse.osgi_3.8.2.v20130124-134944.jar by adding a JavaSE-1.8.profile to it, with contents from here. Using this workaround, I was able to run SonarLint 4.3 on Eclipse Juno + CDT.

Some how this does not work for me.
grafik
It produced the following log, unfortunately I’m not familiar with the behind the scenes stuff of eclipse.
chrash.log.log (13.7 KB)

I tried with a fresh installed eclipse an then it worked. Thanks.

1 Like

My Answer was a little bit to fast. When I install other required plugins the Menu entries for SonarLint disappear again.
Since now i just tried to
Fresh eclipse installation → SonarLint(so far it worked) → Cantata++ plugin (the it did not work any more)
What a did not try yet is the following
Fresh eclipse installation → Cantata++ plugin → SonarLint