Giter Site home page Giter Site logo

plantuml's People

Contributors

mrohland avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

plantuml's Issues

AWS Library fails to work

Using library extensions with a label throws a syntax error if a label is used. The first example from the https://github.com/milo-minderbinder/AWS-PlantUML/README.MD fails. This example works in other PlantUML tools.

@startuml
define AWSP https://raw.githubusercontent.com/milo-minderbinder/AWS-PlantUML/release/18-2-22/dist
!includeurl AWSP/common.puml
!includeurl AWSP/Storage/AmazonS3/AmazonS3.puml

AMAZONS3(s3_internal)
AMAZONS3(s3_partner,"Vendor's S3")
s3_internal <-- s3_partner

@enduml

This is the error message.

Screenshot 2019-07-18 at 16 57 05

Uncaught TypeError: Cannot read property 'file' of undefined

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.15.0 x64
Electron: 1.3.13
OS: Unknown Windows version
Thrown From: plantuml package 0.1.2

Stack Trace

Uncaught TypeError: Cannot read property 'file' of undefined

At C:\Users\Home-PC\.atom\packages\plantuml\lib\file-utils.coffee:9

TypeError: Cannot read property 'file' of undefined
    at module.exports.FileUtil.prepareFile (/packages/plantuml/lib/file-utils.coffee:9:8)
    at Object.generate (/packages/plantuml/lib/plantuml.coffee:23:18)
    at /packages/plantuml/lib/plantuml.coffee:12:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:3:59)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/app.asar/src/atom-environment.js:1162:28)
    at EventEmitter.outerCallback (/app.asar/src/application-delegate.js:312:25)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -0:14.7.0 plantuml:generate (atom-pane.pane.active)

Non-Core Packages

plantuml 0.1.2 

Object.require is deprecated.

Use remote.Dialog instead of remote.require("dialog")

Object.require (/Applications/Atom.app/Contents/Resources/app.asar/src/electron-shims.js:57:12)
Object.<anonymous> (/Users/Roger/.dotfiles/atom/packages/plantuml/lib/file-utils.coffee:8:19)
Object.<anonymous> (/Users/Roger/.dotfiles/atom/packages/plantuml/lib/file-utils.coffee:64:4)
Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:109:30)
Object..coffee (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:216:21)
Module.load (module.js:473:32)

Uncaught TypeError: path.basename is not a function

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.3.2
System: Mac OS X 10.11.2
Thrown From: plantuml package, v0.1.2

Stack Trace

Uncaught TypeError: path.basename is not a function

At /Users/jinke/.atom/packages/plantuml/lib/file-utils.coffee:35

TypeError: path.basename is not a function
    at Function.module.exports.FileUtil.getPngFilename (/Users/jinke/.atom/packages/plantuml/lib/file-utils.coffee:35:21)
    at module.exports.FileUtil.getPngFilePath (/Users/jinke/.atom/packages/plantuml/lib/file-utils.coffee:15:28)
    at Object.module.exports.Plantuml.generate (/Users/jinke/.atom/packages/plantuml/lib/plantuml.coffee:25:23)
    at atom-workspace.subscriptions.add.atom.commands.add.plantuml:generate (/Users/jinke/.atom/packages/plantuml/lib/plantuml.coffee:12:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1010:28)
    at emitOne (events.js:77:13)
    at EventEmitter.emit (events.js:169:7)

Commands

     -0:30.7.0 application:new-file (ul.list-inline.tab-bar.inset-panel)
     -0:27.6.0 grammar-selector:show (atom-text-editor.editor)
     -0:24.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:17 core:paste (atom-text-editor.editor.is-focused)
     -0:05.5.0 plantuml:generate (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "one-light-syntax"
    ]
  }
}

Installed Packages

# User
language-plantuml, v0.2.0
plantuml, v0.1.2

# Dev
No dev packages

plantUML can't generate the file

Please make sure PlantUml can write to location of original file.

This error happens with all .plantUML files. I also tried to launch Atom from command line and I got same error.

I'm using Atom 1.0.2 on windows 7

file location not open. minor bug

Hi,

There is a syntax in plantuml that allows to select the file destination within the file. I don't have the documentation for it but if we use @startuml{images/diagram.png}, the result goes in the directory named images with the name diagram.png (tested on unix). And it's correctly generated.
The atom script script fails with: 'Please make sure PlantUml can write to location of original file.'
The script is looking for an evaluated path from the original filename where it shouldn't.

Changes required due to TextBuffer.save becoming async in Atom 1.19

Hi! Thanks for maintaining the plantuml package!

In Atom v1.19, we will release a major change to Atom's core text buffer data structure. As part of this change, we have made TextBuffer.save asynchronous; rather than blocking until the save is complete, it now immediately returns a Promise that resolves when the save is complete. Because of this, a few other Atom APIs that use save have similarly become async:

  • Pane.close
  • TextBuffer.save
  • TextEditor.save
  • Pane.saveItem
  • Pane.saveItemAs
  • Pane.saveActiveItem
  • Pane.saveActiveItemAs
  • Pane.saveItems
  • Workspace.saveActivePaneItem
  • Workspace.saveActivePaneItemAs

Effects on this package

We think this package could be impacted by this upgrade because it calls the changed methods in the following places:

We found these calls using a regex search, so this list might be incomplete, and it might contain some false positives.

What to do about the change

It should be pretty easy to adjust your package code and/or tests to work with the new async behavior, and to simultaneously keep it working with older versions of Atom. Here are some examples of pull requests we opened on our bundled packages to cope with the change:

Uncaught TypeError: Cannot read property 'showSaveDialog' of undefined

  1. Create new plantuml doc in unsaved file window

Atom: 1.19.3 x64
Electron: 1.6.9
OS: Microsoft Windows 10 Pro
Thrown From: plantuml package 0.1.2

Stack Trace

Uncaught TypeError: Cannot read property 'showSaveDialog' of undefined

At C:\Users\shad0w\.atom\packages\plantuml\lib\file-utils.coffee:27

TypeError: Cannot read property 'showSaveDialog' of undefined
    at Function.module.exports.FileUtil.saveNewFile (/packages/plantuml/lib/file-utils.coffee:27:18)
    at module.exports.FileUtil.prepareFile (/packages/plantuml/lib/file-utils.coffee:12:16)
    at Object.generate (/packages/plantuml/lib/plantuml.coffee:23:18)
    at /packages/plantuml/lib/plantuml.coffee:12:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.19.3/resources/app/src/command-registry.js:265:35)
    at ~/AppData/Local/atom/app-1.19.3/resources/app/src/command-registry.js:3:65
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.19.3/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:610:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.19.3/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:401:28)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.19.3/resources/app/src/window-event-handler.js:100:42)
    at HTMLDocument.<anonymous> (~/AppData/Local/atom/app-1.19.3/resources/app/src/window-event-handler.js:3:65)

Commands

     -0:32.6.0 intentions:highlight (input.hidden-input)
     -0:32.5.0 core:paste (input.hidden-input)
     -0:31.6.0 intentions:highlight (input.hidden-input)
     -0:31.5.0 plantuml:generate (input.hidden-input)
 38x -0:27.8.0 intentions:highlight (input.hidden-input)
     -0:14.2.0 core:save (input.hidden-input)
  2x -0:07.9.0 intentions:highlight (input.hidden-input)
     -0:06.1.0 plantuml:generate (input.hidden-input)

Non-Core Packages

atom-elixir 0.2.3 
autocomplete-elixir 1.5.14 
autocomplete-python 1.9.1 
autocomplete-ruby 0.2.8 
busy-signal 1.4.3 
intentions 1.1.5 
json-schema 0.1.15 
language-batch 0.4.0 
language-chef 0.10.0 
language-elixir 0.19.0 
language-groovy 0.7.0 
language-plantuml 0.2.0 
language-powershell 4.0.0 
linter 2.2.0 
linter-elixirc 1.7.0 
linter-ruby 1.2.5 
linter-ui-default 1.6.3 
plantuml 0.1.2 
plantuml-preview 0.12.9 
plantuml-viewer 0.7.2 
python-tools 0.6.9 
ruby-block 0.3.6 

Uncaught TypeError: undefined is not a function

Steps to reproduce:

  1. Create file names /tmp/test.txt, with the following contents
    @startuml version @enduml
    Contents chosen to have the bare minimum to see if I could get this thing working at all.
  2. Run the Plantuml: Generate action

I have tested running PlantUML manually and have been able to generate a png from the file in 1).

Atom Version: 1.0.2
System: Ubuntu 15.04
Thrown From: plantuml package, v0.1.2

Stack Trace

Uncaught TypeError: undefined is not a function

At /home/roger/.atom/packages/plantuml/lib/file-utils.coffee:35

TypeError: undefined is not a function
    at Function.module.exports.FileUtil.getPngFilename (/home/roger/.atom/packages/plantuml/lib/file-utils.coffee:51:23)
    at module.exports.FileUtil.getPngFilePath (/home/roger/.atom/packages/plantuml/lib/file-utils.coffee:23:30)
    at Object.module.exports.Plantuml.generate (/home/roger/.atom/packages/plantuml/lib/plantuml.coffee:35:25)
    at atom-workspace.subscriptions.add.atom.commands.add.plantuml:generate (/home/roger/.atom/packages/plantuml/lib/plantuml.coffee:17:26)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:241:29)
    at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/usr/share/atom/resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:159:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
    at space-pen-div.atom.commands.add.core:confirm (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:241:29)

Commands

     -2:06.6.0 core:backspace (atom-text-editor.editor.is-focused)
  2x -2:05.4.0 core:save (atom-text-editor.editor.is-focused)
     -2:04.2.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -2:01.6.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -2:00.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:00.6.0 plantuml:generate (atom-text-editor.editor)
     -0:09.3.0 editor:select-to-first-character-of-line (atom-text-editor.editor.is-focused)
     -0:07.1.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:06.6.0 core:delete (atom-text-editor.editor.is-focused)
  2x -0:06.2.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:05.4.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:04.9.0 core:delete (atom-text-editor.editor.is-focused)
     -0:04.5.0 core:save (atom-text-editor.editor.is-focused)
     -0:02.4.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:00.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:00.5.0 plantuml:generate (atom-text-editor.editor)

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "one-light-syntax"
    ]
  }
}

Installed Packages

# User
atom-pair, v1.1.6
autoclose-html, v0.18.0
language-plantuml, v0.1.1
linter, v1.2.4
linter-ruby, v0.1.6
plantuml, v0.1.2

# Dev
No dev packages

setup CI

Prerequisites

Requirements

  • GoAgent must run tests inside docker images
  • Pipeline should be reusable by extracting special test steps into shell script

Error trying to generate file on Atom 0.204.0 (Fedora 22)

Hi,

I receive an error message: "ReferenceError: path is not defined" when I tried to generate PlantUML file.

To fix it I add

path = require('path')

To the file: lib/file-utils.coffee, and it works.

If you can add it to update the package would be great.

Uncaught ReferenceError: path is not defined

  1. Open Atom from command line
  2. Navigate to plantuml text file
  3. cmd+ctrl+p

plantuml installed at /usr/local/bin/plantuml and /usr/local/bin is in $PATH

Atom Version: 0.210.0
System: Mac OS X 10.10.3
Thrown From: plantuml package, v0.1.0

Stack Trace

Uncaught ReferenceError: path is not defined

At /Users/nguyenchr/.atom/packages/plantuml/lib/file-utils.coffee:34

ReferenceError: path is not defined
  at Function.module.exports.FileUtil.getPngFilename (/Users/nguyenchr/.atom/packages/plantuml/lib/file-utils.coffee:34:16)
  at module.exports.FileUtil.getPngFilePath (/Users/nguyenchr/.atom/packages/plantuml/lib/file-utils.coffee:14:28)
  at Object.module.exports.Plantuml.generate (/Users/nguyenchr/.atom/packages/plantuml/lib/plantuml.coffee:25:23)
  at atom-workspace.subscriptions.add.atom.commands.add.plantuml:generate (/Users/nguyenchr/.atom/packages/plantuml/lib/plantuml.coffee:12:32)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:180:20)

Commands

     -0:01.1.0 plantuml:generate (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "ignoredNames": [
      ".git",
      ".svn",
      ".DS_Store"
    ],
    "disabledPackages": [
      "vim-mode",
      "go-plus",
      "highlight-column"
    ],
    "themes": [
      "atom-light-ui",
      "monokai"
    ]
  }
}

Installed Packages

# User
Sublime-Style-Column-Selection, v1.3.0
atom-jshint, v2.0.0
coffee-compile, v0.16.0
highlight-selected, v0.9.3
language-plantuml, v0.1.0
language-rust, v0.4.3
linter, v0.12.6
linter-rust, v0.1.0
monokai, v0.14.0
overrides, v0.10.0
plantuml, v0.1.0
pretty-json, v0.3.3
racer, v0.11.0
travis-ci-status, v0.15.0

# Dev
No dev packages

Uncaught TypeError: Cannot read property 'basename' of undefined

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.11
System: Microsoft Windows 8.1 Single Language
Thrown From: plantuml package, v0.1.2

Stack Trace

Uncaught TypeError: Cannot read property 'basename' of undefined

At /C:/Users/Ali%20Imran/.atom/packages/plantuml/lib/file-utils.coffee:51

TypeError: Cannot read property 'basename' of undefined
  at Function.module.exports.FileUtil.getPngFilename (C:\Users\Ali Imran\.atom\packages\plantuml\lib\file-utils.coffee:35:20)
  at module.exports.FileUtil.getPngFilePath (C:\Users\Ali Imran\.atom\packages\plantuml\lib\file-utils.coffee:15:28)
  at Object.module.exports.Plantuml.generate (C:\Users\Ali Imran\.atom\packages\plantuml\lib\plantuml.coffee:25:23)
  at atom-workspace.subscriptions.add.atom.commands.add.plantuml:generate (C:\Users\Ali Imran\.atom\packages\plantuml\lib\plantuml.coffee:12:32)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Ali Imran\AppData\Local\atom\app-1.0.11\resources\app.asar\src\command-registry.js:245:29)
  at CommandRegistry.handleCommandEvent (C:\Users\Ali Imran\AppData\Local\atom\app-1.0.11\resources\app.asar\src\command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\Ali Imran\AppData\Local\atom\app-1.0.11\resources\app.asar\src\command-registry.js:156:19)
  at [object Object].jQuery.fn.trigger (C:\Users\Ali Imran\AppData\Local\atom\app-1.0.11\resources\app.asar\src\space-pen-extensions.js:64:23)
  at EventEmitter.<anonymous> (C:\Users\Ali Imran\AppData\Local\atom\app-1.0.11\resources\app.asar\src\window-event-handler.js:75:67)
  at emitTwo (events.js:87:13)
  at EventEmitter.emit (events.js:169:7)
  at EventEmitter.ipc.sendSync (C:\Users\Ali Imran\AppData\Local\atom\app-1.0.11\resources\atom.asar\renderer\api\lib\ipc.js:21:31)
  at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Ali Imran\AppData\Local\atom\app-1.0.11\resources\atom.asar\renderer\api\lib\remote.js:110:29)
  at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Ali Imran\AppData\Local\atom\app-1.0.11\resources\app.asar\src\context-menu-manager.js:170:31)
  at HTMLDocument.<anonymous> (C:\Users\Ali Imran\AppData\Local\atom\app-1.0.11\resources\app.asar\src\window-event-handler.js:157:33)
  at HTMLDocument.handler (C:\Users\Ali Imran\AppData\Local\atom\app-1.0.11\resources\app.asar\src\space-pen-extensions.js:112:34)
  at HTMLDocument.jQuery.event.dispatch (C:\Users\Ali Imran\AppData\Local\atom\app-1.0.11\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
  at HTMLDocument.elemData.handle (C:\Users\Ali Imran\AppData\Local\atom\app-1.0.11\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)

Commands

     -0:36 go-to-line:toggle (atom-text-editor.editor)
     -0:33.9.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -0:22.4.0 asciidoc-preview:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
asciidoc-preview, v0.6.0
language-asciidoc, v0.12.0
language-plantuml, v0.1.1
language-textile, v0.2.0
plantuml, v0.1.2
plantuml-viewer, v0.6.1

# Dev
No dev packages

fix broken requires with Atom >0.199

Problem:

Plantuml 0.1.0 accidentally expected some modules already required which are no longer with Atom >v0.199.0.

Fix:

Add missing requires

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.