jaime-olivares / vscode-yuml

yUML extension for Visual Studio Code
MIT License
116 stars 26 forks source link

Diagrams not shown #56

Closed makorne closed 5 years ago

makorne commented 5 years ago

Just installed over VS extentions

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

Please, provide any 100% working example.

jaime-olivares commented 5 years ago

This is a bit weird. I don't have any other report like this one. Please describe your environment (OS, VSCode) and the samples you have used.

nboukeffa commented 5 years ago

Hi, same for me with this simple code: [Customer]. I'm running VSCode 1.31.1 on macOS 10.14.3.

Here what I see:

image

Thanks.

jaime-olivares commented 5 years ago

I have found the following behavior so far:

Workaround: Save the file (Ctrl-S) to see the diagram

Please confirm if this is your case, while I finish to analyze and solve this.

tvanriper commented 5 years ago

I just installed vscode-yuml, and tried the same [Customer] thing but did not see a diagram show, even after saving it.

The image nboukeffa shows is exactly what I see.

I wish I could show you my environment to better help you... likely, the install didn't quite go correctly.

I am running on Windows 10, with the following details from Visual Studio Code:

Version: 1.31.1 (user setup) Commit: 1b8e8302e405050205e69b59abb3559592bb9e60 Date: 2019-02-12T02:20:54.427Z Electron: 3.1.2 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: Windows_NT x64 10.0.17134

jaime-olivares commented 5 years ago

@nboukeffa (and possibly @tvanriper ) Your yuml code is not correct. It is lacking the diagram type:

// {type:class}

The preview shall show a warning message about it, but it isn't. I suspect it is a collateral of PR #51

I will provide a new version in the following hours.

jaime-olivares commented 5 years ago

Fixed and published as version 3.4

tvanriper commented 5 years ago

That was indeed the issue. It wasn't obvious to me (because I didn't read carefully enough) that you require the //{type:class} text. If you browse to https://yuml.me and play around with their online editor, it doesn't have this requirement, which added to the confusion.

It makes sense to me, now that I see it... it just didn't immediately grab me.

For whatever it's worth, I think it is counter-intuitive that something classically appearing as a comment acts as a requirement. That might have also made it harder for me to grab onto the concept.

jaime-olivares commented 5 years ago

There is some rationale behind it:

The yuml file shall contain the type, as we are not specifying the type in the URL as when you invoke yuml.me

As I didn't want to disturb too much the original specification, I used special comment. This is not an unusual practice, there are several language that have controlled comments.