GithubHelp home page GithubHelp logo

pat-glich / sprotty-vscode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eclipse-sprotty/sprotty-vscode

0.0 0.0 0.0 34.74 MB

sprotty-vscode

License: Eclipse Public License 2.0

TypeScript 79.33% JavaScript 1.63% CSS 2.83% Xtend 16.21%

sprotty-vscode's Introduction

Gitpod Ready-to-Code

sprotty-vscode

This repository contains the glue code to integrate Sprotty diagrams - with or without a language server - in VSCode extensions.

Also contains an example extension for a domain-specific language for statemachines. The example is also available as States Example from the VS Code Marketplace.

Screenshot

Features

  • running Sprotty diagrams in VS Code webviews,
  • SVG export (ALT-E), animated center selection (ALT-C) and fit to screen (ALT-F) actions,
  • interaction with Sprotty-enhanced language servers to automatically synchronize diagrams with language artifacts.

Architecture

In VS Code, extensions can contribute new UI components using a webview. Webviews communicate with the extension using the postMessage API. The SprottyVscodeExtension use this to send and receive Sprotty Actions to and from a SprottyWebview. The latter runs a webpacked bundle.js that contains the Sprotty diagram code.

Architecture Diagram

If your extension provides a language, you can include a Sprotty-enhanced language server to get fully synchronized diagrams for your language artifacts. The SprottyVscodeLanguageExtension acts as a relay between the language server and a SprottyLanguageWebview, and intercepts actions/LSP messages that require to interact with the VS Code workbench.

Contents

The repo is structured as follows

  • example/: an example using an Xtext-based Language Server and with Sprotty visualization.
  • sprotty-vscode-extension/: library code for the VSCode extension.
  • sprotty-vscode-protocol/: common protocol classes for the communication between the extension and the webview.
  • sprotty-vscode-webview/: library code for the script that is run in the webview.

Development

Compile the library code and the example

example/states/language-server/gradlew -p example/states/language-server/ build &&
yarn

sprotty-vscode's People

Contributors

jankoehnlein avatar spoenemann avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.