Skip to content

MagpieBridge LSP Framework --- A simple solution for your analysis IDE integration

License

Notifications You must be signed in to change notification settings

MagpieBridge/MagpieBridge

Repository files navigation

Maven Central Gitpod Ready-to-Code All Contributors Build Status Gitter

What is MagpieBridge?

MagpieBridge is a framework for integrating Static Analyses into IDEs and Editors with the Language Server Protocol. MagpieBridge is not limited to LSP, it also leverages the HTTP to allow displaying web pages inside an IDE. This enables a new level of supporting visualization and customizable UI for user to interact with. MagpieBridge is a bridge between program analyses and developer tools. MagpieBridge offers an extensible implementation of a language server---MagpieServer which runs analysis; a default TextDocumentService--MagpieTextDocumentService which handles common LSP requests; a default WorkspaceService--MagpieWorkspaceService which handles different kinds of code actions and many other useful APIs for static analysis; and resuable Project Services that resolve project scope (source code path, library code path, class path etc.) which can be consumed by whole program analyses. Find more information in the following:

For soot users, you can find an IRConverter under https://github.com/MagpieBridge/IRConverter for converting WALA IR to Soot IR, if you want to analyze Java source code with Soot.

Cite the research paper

For scientific usage, please cite the paper [BibTex].

Why is it called MagpieBridge?

In a Chinese legend, a human and a fairy fall in love, but this love angers the gods, who separate them on opposite sides of the Milky Way. However, on the seventh day of the seventh lunar month each year, thousands of magpies form a bridge, called 鹊桥 in Chinese and Queqiao in pinyin, allowing the lovers to meet. We use MagpieBridge as a metaphor for a system that connects arbitrary static analysis to arbitrary IDE.

Use MagpieBridge in your Maven project

You can either

  1. Since version 0.1.0, MagpieBridge is available on Maven Central. Simply paste the following lines into your pom.xml.
 <dependency>
    <groupId>com.github.magpiebridge</groupId>
    <artifactId>magpiebridge</artifactId>
    <version>0.1.5</version>
</dependency>

The old versions till 0.0.9 of MagpieBridge were published on the GitHub Package Registry. You can use the release by adding the following lines to your pom.xml (see all github package) and set up your GitHub access token by following these instructions.

<dependencies>
  <dependency>
    <groupId>magpiebridge</groupId>
    <artifactId>magpiebridge</artifactId>
    <version>0.0.9</version>
  </dependency>
</dependencies>

<repositories>
  <repository>
    <id>github</id>
    <name>GitHub MagpieBridge Apache Maven Packages</name>
    <url>https://maven.pkg.github.com/MagpieBridge/MagpieBridge</url>
  </repository>
</repositories>
  1. or build MagpieBridge by yourself
    • check out the develop branch with git clone -b develop https://github.com/MagpieBridge/MagpieBridge.git
    • run mvn install in the project root directory to build the tool and run all tests. To skip tests, run mvn install -DskipTests.

Tutorials

Integrated Static Analyses using MagpieBridge

Build MagpieBridge in IDE

  1. Simply import the project as maven project in your IDE, Maven should take care of all required dependences. For Eclipse:
Eclipse> File> Import > Maven > Existing Maven Projects > Enter the path to your local repository > Finish

Get Involved

  • Pull requests are welcome!
  • Submit github issues for any feature enhancements, bugs or documentation problems
  • Please format the code with mvn com.coveo:fmt-maven-plugin:format before git push

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Linghui Luo

💻 📖 🎨

Julian Dolby

💻 🎨

Christian Brüggemann

💻

Jonas Manuel

💻 📖

Markus Schmidt

⚠️ 👀

João Pereira

🐛

Sven Erik Vinkemeier

🐛

Goran Piskachev

🤔

Ranjith K

💻 🤔

ejardak

💻

challe535

💻

Julian T

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Contact

linghui[at]outlook.de