SonarLint/Analyze context menu not visible after eclipse plugin update to 2.0.0

7,351 views
Skip to first unread message

shengy...@googlemail.com

unread,
Apr 6, 2016, 7:37:40 AM4/6/16
to SonarLint
Hi all,

I'm using Eclipse Mars 4.5.2 + sonarLint. After plugin update to 2.0.0 today, the context menu "SonarLint/Analyze" is not visible anymore. 

Is it a bug or have I done something wrong?
Does someone have the same issue? 

Thanks, 

Shane

Julien HENRY

unread,
Apr 6, 2016, 8:44:52 AM4/6/16
to shengy...@googlemail.com, SonarLint
Hi Shane,

SonarLint "mission" is to provide "on-the-fly" feedback to developers.

Concretely in Eclipse it means that a SonarLint analysis is triggered automatically when you open or save a file. Can you tell me in which other situation you would need to manually trigger an analysis?

Thanks

Julien

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/86b6bcd6-9231-45db-b90c-cc88929d4935%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Julien HENRY

unread,
Apr 6, 2016, 10:06:55 AM4/6/16
to issam...@gmail.com, SonarLint, shengy...@googlemail.com
Hi Issam,

I guess you are using connected mode and that you have an old version of the SonarQube Java plugin on your server. If I'm correct please update the SonarQube Java plugin (latest version is 3.12) and then update local configuration in Eclipse:
Images intégrées 1

Regards,

Julien

2016-04-06 15:35 GMT+02:00 <issam...@gmail.com>:
Hello,

I'm exactly in the same situation as Shane. And when I open a Java file I get the following exception :

Error during analysis
java.lang.IllegalStateException: Unable to register extension org.sonar.plugins.java.JavaSquidSensor
at org.sonarsource.sonarlint.core.container.ComponentContainer.addExtension(ComponentContainer.java:234)
at org.sonarsource.sonarlint.core.container.global.ExtensionInstaller.doInstall(ExtensionInstaller.java:80)
at org.sonarsource.sonarlint.core.container.global.ExtensionInstaller.install(ExtensionInstaller.java:49)
at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.addBatchExtensions(AnalysisContainer.java:127)
at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doBeforeStart(AnalysisContainer.java:68)
at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:110)
at org.sonarsource.sonarlint.core.container.storage.StorageGlobalContainer.analyze(StorageGlobalContainer.java:126)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.analyze(ConnectedSonarLintEngineImpl.java:143)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.analyze(ConnectedSonarLintEngineImpl.java:132)
at org.sonarlint.eclipse.core.internal.server.Server.startAnalysis(Server.java:185)
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob$1.run(AnalyzeProjectJob.java:397)
Caused by: java.lang.NoClassDefFoundError: Lorg/sonar/api/checks/NoSonarFilter;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.picocontainer.injectors.AdaptingInjection$2.run(AdaptingInjection.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at org.picocontainer.injectors.AdaptingInjection.injectionFieldAnnotated(AdaptingInjection.java:209)
at org.picocontainer.injectors.AdaptingInjection.fieldAnnotatedInjectionAdapter(AdaptingInjection.java:188)
at org.picocontainer.injectors.AdaptingInjection.createComponentAdapter(AdaptingInjection.java:57)
at org.picocontainer.behaviors.AbstractBehaviorFactory.createComponentAdapter(AbstractBehaviorFactory.java:44)
at org.picocontainer.behaviors.OptInCaching.createComponentAdapter(OptInCaching.java:45)
at org.picocontainer.DefaultPicoContainer.addComponent(DefaultPicoContainer.java:536)
at org.picocontainer.DefaultPicoContainer.access$300(DefaultPicoContainer.java:84)
at org.picocontainer.DefaultPicoContainer$AsPropertiesPicoContainer.addComponent(DefaultPicoContainer.java:1149)
at org.sonarsource.sonarlint.core.container.ComponentContainer.addExtension(ComponentContainer.java:232)
... 11 more
Caused by: java.lang.ClassNotFoundException: org.sonar.api.checks.NoSonarFilter
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
... 25 more

I have downloaded a fresh Eclipse Installation, but the issue persists :-(

Thanks in advance.

Julien HENRY

unread,
Apr 6, 2016, 10:23:05 AM4/6/16
to Issam Sabir, SonarLint
@Issam, please update Java rules to 3.12 this should fix your issue.

2016-04-06 16:17 GMT+02:00 Issam Sabir <issam...@gmail.com>:
Hi,

I'm using a SonarQube in version 5.2, and the Java rule is in version 3.6, any issue with that ?

Images intégrées 1

Many Thanks.



--
Cordialement, Issam Sabir.
06 61 54 39 77

Julien HENRY

unread,
Apr 6, 2016, 10:27:10 AM4/6/16
to Shengyao Chen, SonarLint

2016-04-06 16:12 GMT+02:00 Shengyao Chen <shengy...@googlemail.com>:
When I connect projects with the remote server in Eclipse IDE, no issues are listed in "SonarLint Issues" view. 

Connected mode is not about getting server side issues in your IDE. For that you can simply use your web browser and benefit from all features of SonarQube.

Connected mode for SonarLint is about getting same configuration (same rules, same parameters) between SonarLint and SonarQube.

petr.vilcinsky

unread,
Apr 7, 2016, 3:44:25 AM4/7/16
to SonarLint, shengy...@googlemail.com
Hello Julien,

I still don't like the idea that I have to switch between web browser and my IDE to fix issues.
I have to find the issue in web browser, then copy name of that file, switch to IDE, find the file, go to line and then I can fix it.
I don't find it user friendly.

In SonarQube plugin for Eclipse it was possible to show all or only new issues which was great feature and we were able to fix issues before pushing to development branch.

Could you please at least add a possibility to analyze whole project/module/package and not just a single file?
I think this feature was there in some of the previous SonarLint releases, but was removed.


Thanks,
Petr


Dne středa 6. dubna 2016 16:27:10 UTC+2 Julien HENRY napsal(a):

Freddy Mallet

unread,
Apr 7, 2016, 4:47:46 AM4/7/16
to petr.vilcinsky, SonarLint, shengy...@googlemail.com
Hi @Petr and @Shane,

We really want developers considering SonarLint as something that they don't have to care about and something that won't disturb their daily development activity : no need to click, to configure too much, to wait, ... If a new issue appears, SonarLint will notify you on-the-fly and that's it. 

At mid-term, by providing the ability when the "Connected Mode" is activated to browse all open issues known on SQ side, I think we'll partially or fully cover your needs : https://jira.sonarsource.com/browse/SLE-54

Kind regards
Freddy

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Freddy MALLET | SonarSource
Product Director & Co-Founder
http://sonarsource.com
Reply all
Reply to author
Forward
0 new messages