Giter Club home page Giter Club logo

vscode-yuml's Introduction

yUML extension

yUML extension for Visual Studio Code. Allows the creation of offline UML diagrams based on the yUML Syntax.

Features

  • Syntax highlighting of .yuml files
  • Currently, the following diagram types are supported:
    • Class
    • Activity
    • Use-case
    • State
    • Deployment
    • Package
    • Sequence
      See the corresponding github project for the updated features
  • Update of yUML diagrams after each file save
  • Additional directives for altering diagram type and orientation
  • Embedded rendering engine: No need to call an external web service
  • Automatic sensing of light and dark themes
  • Code snippets with samples of each diagram
  • Integrated Markdown support

yUML extension screenshots

yUML syntax

Please refer to the wiki page

Invocation methods

Once a .yuml file is open, the viewer window can be invoked in two ways:

  • By opening the command pallete and [partially] typing: view yuml diagram (see the screenshot above)
  • By clicking the preview icon in the editor title area (see below)

title icon

Snippets

There is a snippet for each diagram type. Just start typing one of the available diagram types: class, activity, usecase, state or deployment, package, sequence and a full example will be pasted into the yuml file.

yuml snippet screenshot

Markdown support

yUML code can now be embedded into markdown documents by using the fencing syntax, as shown:

yuml markdown screenshot

The yUML diagram will be directly rendered in the markdown preview window.

Top bar

A topbar will show some useful links when hovered (see below), for accessing the wiki page, writing a review, reporting bugs and requesting new features.

topbar screenshot

Extension Settings

No settings yet.

Issue reporting

If you have experience developing Visual Studio Code extensions, please propose a detailed solution for any reported issue or feature request.

For issues related to the yUML syntax, please post your issue in the corresponding github project

Contributing

For pull requests, please read CONTRIBUTING.md

vscode-yuml's People

Contributors

aduh95 avatar boozook avatar chaseadamsio avatar chezwicker avatar jaime-olivares avatar professoro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-yuml's Issues

Suggestion for auto-generating .yuml files

It would be cool to combine with this project:

https://github.com/remojansen/TsUML

That way we could generate the .yuml file from scanning the typescript files from the project.

The code already has a getDsl function, so just needs to be integrated.

It does have some different syntax than this project. Here's a sample string it generates.

[Weapon{bg:palegreen}][Weapon||tryHit();],[Named{bg:palegreen}][Named|name;|],[BaseWeapon{bg:skyblue}][BaseWeapon|damage;|],[Katana{bg:skyblue}][Katana|name;|tryHit();],,[BaseWeapon]^-[Katana],[Weapon]^-[Katana],[Named]^-[Katana],[Ninja{bg:skyblue}][Ninja|_weapon;|fight();],

The commas would need to be converted to new lines and it does some stuff with pipes and semi-colons that is not compatible.

No syntax highlighting

yuml files seem to register as plain text files by vsc (and no .yuml file extension available when trying to change it manually)

running on mac os sierra 10.12.1
vscode: 1.12.2
vscode-yuml: 2.10.0

screenshot for example:
image

Same rendering as Yuml.me

Thanks for a great tool.

Any plans to improve the rendering to allow for the rufscript font and the nice hand-drawn look as on yuml.me?

Thanks

Feature-Request for exporting diagram

Is there any plan on exporting the rendered UML as a PNG and PDF? I think exporting it as PNG should be straightforward. However, exporting to a PDF may require external dependencies to make it easier. I could work on exporting it as a PNG if you like. Thank you.

Problem with Notes

There seems to be a problem with the 2.10.0 package, diagrams with notes aren't displayed correctly. Could this be related to the viz.js 1.7.1 upgrade? In my workspace, using 1.3.0, everything works fine.

Make TopBar optional

Please make TopBar is optional.
It means new option on/off in the preferences to disable/enable top-bar with links.

Diagrams not shown

Just installed over VS extentions

But looks like its not working.
No text highlihted and no diagramms displayed

Please, provide any 100% working example.

snippets not working in markdown

When doing inline yuml in markdown files the snippets do not trigger, they only appear to trigger in .yuml files, I would expect them to also trigger in .md files.

e.g. the following never triggers a snippet for class

```yuml
class  ```

UC Diagram: Actor Inheritance Drawn Inverted

It seems that actor inheritance in use case diagrams is drawn the wrong way around.

Consider the following simple exampe from the yuml.me demos:

// {type:usecase}
// {direction:leftToRight}
[Cms Admin]^[User]

This is how it's rendered at yuml.me:
yuml me

And this is how yUML 2.8.0 renders it:
yuml-2 8 0

Issue with markdown support

I try to use the below syntax to render it in the browser, but it's not working.

```yuml
{type: sequence}
[A]>[B]

How can I properly render the yuml in the browser? I want to add some class/activity diagrams in my readme.md and push it to github.

Thanks.

Text color whenever the bg attribute is defined

Currently, the text color is determined by the theme (light/dark). However, whenever the user selects a different background color using the {bg: } tag, the text may not be readable due to lack of contrast.
In those cases, the background luminosity should be determined in order to choose either the black or white text color.

Better handling of the preview window

Currently the extension opens the preview window in the second pane, but it may be inconvenient if the yuml is already opened in it.
Need a better logic for deciding where to open the preview window. Ideally mimic the Markdown extension.

Active editor doesn't show a yUML document

Trying to preview the yUML diagram of any yuml file gives me the foloing error:

Active editor doesn't show a yUML document

My vscode installation info:

Version: 1.26.1
Commit: 493869ee8e8a846b0855873886fc79d480d342de
Date: 2018-08-16T18:34:20.517Z
Electron: 2.0.5
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Here is a sample diagram that I tried (got it from the repository):

// Activity diagram for the main process of the yUML extension for VSCode
// {type:activity}
// {generate:true} 
// {direction:leftToRight}  
(start)->(Parse .YUML\rfile)->(Create .DOT\rdocument)
(Create .DOT\rdocument)->(Generate SVG)
(Generate SVG)->(Output to\rPreviewer)
(Output to\rPreviewer)->|e|
(Generate SVG)-><g>[generate: false]->|e|
<g>[generate: true]->(Output to\rFile) 
(Output to\rFile)->|e|->(end)

Nesting classes into packages or simple bounding boxes

In order to use the class diagram in more complex projects (> 10 classes), we need to have some kind of boundary around some classes - e.g. bounded context for DDD-like approaches or packages referring to UML.

In a first step, a simple bounding box (e.g. dotted rectangle in grey) with some label (top, center) would be sufficient.

The definition could look like the package diagram, plus based on indented classes and namespaces:

[Context1]
   [MyClass]
   ...
[Context2]
   [MyOtherClass]
   [MyOtherClass]->[Context1.MyClass]
   [MyClass]-[note: this is a different class than MyClass from Context1 with different relations.]

Regards

Sven

Error when moving the diagram tab to display below the code

I got the below error when I tried to move the diagram tab to display below the code. You have to restart vscode to get the extension to work again.

Unable to open '\vscode-yuml': ModelService: Cannot add model because it already exists!.

Wrong example in Readme

Readme.md under markdown support states:

{type: sequence}

but should be:

// {type: sequence}

Otherwise you'll get Missing mandatory 'type' directive error.

No preview

Just downloaded the extension on the newest vs code version 1.31.1, and when opening a yuml file a 'missing image' icon shows in the diagram tab. I tried to add the 'class' snippet to see if it does anything but no.

image

IsDirty not working properly

In 'generate' mode, it seems the IsDirty functionality is not working properly, so the image is not refreshed after changes, and refreshed without need when switching documents.

Association class

Extend the yuml syntax and renderer for supporting association classes

Note annotation not rendered in sequence diagram

Hi,

First, thanks for your work.

It seems note annotation is not currently rendering when I visualize a sequence diagram (Error parsing the yUML file). I use the yUML plugin v3.1.2 and VS Code v1.28.0.

Brackets in class diagrams preview

There seems to be a problem with in class diagrams preview, the class name was displayed enclosed by braces.
When the class was defined including attributes the braces open before the class name and close after last attribute.

vscode-yuml-issue

Not responding

I am often experiencing problems with the window not responding when opening a yuml file.

But it's not every time, and just when I was about to type this issue, the problem went away, only to appear a few minutes later.

So sorry, not much to go for. Not sure how I can help debug this issue?

Opening multiple files

Thanks for great tool!

When I open multiple yuml files and have the preview window open, it will switch back and forth them very quickly multiple times.

Generate attribute is not working

Hi.

I am trying to create a diagram using {generate:true} but the svg file is not generated.
The View yUML diagram windows shows correctly my diagram and without errors.

This feature was removed?

did i something wrong?
image

Scripts directory as NPM module?

Hello Jaime,

I absolutely love your project - I moved my team to use it for diagramming from Visio and Balsamiq (we still use Balsamiq for mockups).

We wrote a set of internal tools that expose some information into your flavor of yUml and then we load them into VSCode, generate .svg for the documentation and close VSCode.

It would be amazing if you can expose your .svg generation code as an NPM module, so we can integrate this process with our tools.

I would love to help you!

Thank You,

Vladimir

error when showing diagram

Class         [Customer]

No handler found for the command: 'extension.viewYumlDiagram'. An extension might be missing an activation event.

Error: Extension host terminated unexpectedly

I was viewing a diagram, then I closed the preview window. Then I tried to open preview again by hitting a button in the top right corner, but the preview didn't appear. Closing and reopening the .yuml file did not help. After a few seconds, the error message appeared.

VS Code Version 1.30.2 (1.30.2), Mac

extensionService.ts:165 Extension host terminated unexpectedly. Code:  7  Signal:  null
t._onExtensionHostCrashed @ extensionService.ts:165
extensionHost.ts:236 /Users/cem/.vscode/extensions/jaimeolivares.yuml-3.1.2/node_modules/viz.js/viz.js:25
var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=(function(status,toThrow){throw toThrow});Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="funct

Error: write EPIPE
	at _errnoException (util.js:1024:11)
	at WriteWrap.afterWrite [as oncomplete] (net.js:867:14)

Positionings with drag and drop

Hi,

It would be nice to have more flexibility of positionings.
I thougt something with drag and drop would be cool.

I don't know if that is even possible.

Would love to contribute for that.

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.