Java Other
Latest commit f476fcb Jan 10, 2017 @tomverin tomverin committed with henryju Add third-party-licenses.sh file [ci skip]
Permalink
Failed to load latest commit information.
its Update version to 2.6.0-SNAPSHOT Dec 14, 2016
org.sonarlint.eclipse.cdt.feature Update version to 2.6.0-SNAPSHOT Dec 14, 2016
org.sonarlint.eclipse.cdt Extract logger from core Dec 30, 2016
org.sonarlint.eclipse.core.tests Extract logger from core Dec 30, 2016
org.sonarlint.eclipse.core Extract logger from core Dec 30, 2016
org.sonarlint.eclipse.feature Update version to 2.6.0-SNAPSHOT Dec 14, 2016
org.sonarlint.eclipse.jdt.feature Update version to 2.6.0-SNAPSHOT Dec 14, 2016
org.sonarlint.eclipse.jdt Extract logger from core Dec 30, 2016
org.sonarlint.eclipse.site Update version to 2.6.0-SNAPSHOT Dec 14, 2016
org.sonarlint.eclipse.ui Extract logger from core Dec 30, 2016
target-platform-e43 Update version to 2.6.0-SNAPSHOT Dec 14, 2016
target-platform-e44 Update version to 2.6.0-SNAPSHOT Dec 14, 2016
target-platform-e45 Update version to 2.6.0-SNAPSHOT Dec 14, 2016
target-platform-e46 SLE-137 Activate C/C++ file suffixes by default in CDT module Dec 30, 2016
target-platform-e47 SLE-137 Activate C/C++ file suffixes by default in CDT module Dec 30, 2016
.cix.yml Configure QA pipeline Nov 8, 2016
.gitattributes Rebranding to SonarLint Sep 21, 2015
.gitignore SLE-91 Display extended rule description (#39) Sep 6, 2016
.sonarsource.properties Add .sonarsource.properties Jul 30, 2015
LICENSE.txt SLE-111 Rework UI Nov 24, 2016
NOTICE.txt Add NOTICE.txt file [ci skip] Jan 13, 2017
README.md updates README.md with license [ci skip] Jan 13, 2017
appveyor.ps1 Simplify appveyor script, we only need maven settings Nov 24, 2016
appveyor.yml Fix build appveyor Jan 6, 2017
build.sh Sign artifacts from branches Jan 6, 2017
cix.sh Disable p2 mirrors Nov 8, 2016
pom.xml SLE-137 Activate C/C++ file suffixes by default in CDT module Dec 30, 2016
third-party-licenses.sh Add third-party-licenses.sh file [ci skip] Jan 13, 2017

README.md

SonarLint Eclipse Plugin

Building

mvn clean verify

Development setup in Eclipse

Install m2eclipse and then Tycho extension to m2eclipse:

  1. Window -> Preferences -> Maven -> Discovery -> Open Catalog
  2. Install Tycho Configurator
  3. Import everything as Maven project
  4. Run mvn compile on the command line to fetch artifacts referenced in the parent pom
  5. Open target-platform-e47-dev.target
    • Click on Environment tab and add M2_REPO variable pointing to your local maven repo (for example /home/youruser/.m2/repository)
    • On the Definition tab, if there are problems with the Locations entries, click Reload
    • Click Set as Target Platform in the top-right corner

At this point you should be all set, unless Eclipse is not able to generate protobuf sources. Following the explanations here may help. As a workaround, you can run mvn compile on the command line to generate protobuf sources, and in Eclipse hit F5 on the project with build errors.

Eclipse quirks

Strange issues in Eclipse and their remedies.

  • Sometimes, for no apparent reason, the generated protobuf classes may disappear, and Eclipse may report compilation errors when resolving these class names, symbols. The workaround is to run mvn compile and refresh the views in Eclipse (click on the project and press F5).

Running

Open plugin.xml of org.sonarline.eclipse.core (for example), and see the Run and Debug buttons in the top-right corner.

Running tests

In Eclipse:

  1. Create a run configuration by running a test class first with Run As... / JUnit Plug-in Test

  2. Edit the configuration

    • On the Test tab, uncheck Run in UI thread
    • On the Main tab, under Program to Run, select Run an application with value [No Application] - Headless Mode

With Maven:

mvn clean verify

Adding a dependency

Must be osgi bundle.

For Maven

Add the artifact to the parent pom.

Run mvn compile to get the artifact downloaded so that you can inspect its manifest in the jar.

Find the name of the bundle from its manifest, see the Bundle-SymbolicName property.

Edit the manifest of the package where you want to add the dependency (for example: org.sonarlint.eclipse.core/META-INF/MANIFEST.MF), add the bundle in the Require-Bundle property, using its symbolic name.

If the bundle is not needed at runtime, don't forget to mark it optional, to avoid including in the package. (Edit properties on the Dependencies tab, or append ;resolution:=optional)

To verify the content of the package: mvn clean package and check content of the ZIP in plugins folder.

For Eclipse

Add to target-platform-e46/target-platform-e46-dev.target (or whatever target you use) the path of the artifact in your local maven repository as a filesystem path, similar to already existing dependencies.

In the target editor (or open plugin.xml), click Set as Target Platform. Note that this will trigger a compilation in Eclipse.

At this point, and if the artifact exists at the specified path, it should be usable, and Eclipse will be able to compile the project.

License

Copyright 2015-2017 SonarSource.

Licensed under the GNU Lesser General Public License, Version 3.0