A draw.io plugin which offers TAM notation
TAM is a subset of UML2 and FMC (Fundamental Modeling Concepts) block diagrams based on DIN 66200 - (Data processing systems operation; concepts, job relationships STANDARD by Deutsches Institut Fur Normung E.V. (German National Standard), 03/01/1992)
For more information on TAM Notation, see here
draw.io is an open-source for web-based diagramming tool. It can be downloaded to run as a desktop application or consumed from diagrams.net
This plugin adds some components to draw.io, which cover the common components used in TAM's block diagrams.
tam-drawio.js
on your local file systemgit clone https://github.com/ariel-bentu/tam-drawio
Note: Since draw.io v19.0.3, in the desktop (Electron) version of draw.io, plugins are disabled by default, and since v20, also are blocked from extra->configurations
menu. To allow plugins, one needs to pass a command-line argument to draw.io --enable-plugins
.
For Mac users, there are three possible methods:
app
Open
- you'll be prompted to Open an app with unverified developer. Choose Open
- That's it.do shell script "\"/Applications/draw.io.app/Contents/MacOS/draw.io\" --enable-plugins"
quit
tamDrawIO
Harder, but then seemless experience: see here
After you enabled plugins, follow these steps:
Extras->Plugins...
Add
tam-drawio.js
Apply
in some cases if you re-install the plugin, you get the error "File Already Exists". then go to the
<appData>/draw.io/plugins
and remove the file manually before re-installing.
<appData> is:
- %APPDATA% on Windows
- $XDG_CONFIG_HOME or ~/.config on Linux
- ~/Library/Application Support on macOS
Help->Open Developer Tools
Local storage->file://
.drawio-config
plugins
array. Change the tam-drawio.js
from having a full path to only file name (tam-drawio.js
).plugins
Draw.io Integration
under Extensions
Hediet > VSCode-drawio: Plugins
edit in Settings.json
"hediet.vscode-drawio.plugins": [
{"file":"path/to/file/tam-drawio.js"}
]
app.diagrams.net
has restricted allow-list for the plugin source domains and script checksums,
which prevents plugin from being added in a standard way (via Extras --> Plugins...
)app.diagrams.net
, please speak-upAn installation is successful, if you see TAM's new toolbar side-pannels, and 2 new buttons in the toolbar (as depicted in this screenshot).
Menu Extras --> Configuration
{
"globalVars": {
"tam": {
"addPluginMissingLabel": true
}
}
}
Add the following entry in the VSCode settings.json
(F1 --> Preferences: Open Settings (JSON)
)
"hediet.vscode-drawio.globalVars": {
"tam": {
"addPluginMissingLabel": true
}
}
Therefore, the plugin adds a hidden text saying: Best viewed with the TAM plugin
with a link to this repo. This text field is hidden as long as you have the plugin installed. Anyone without a plugin, will see this text item. (this is also hidden in the svg representation of a model).
To disable this behavior, see the configuration section above
Contributions are welcome. open Issues, submit pull-requests etc.
To modify cloned/downloaded version of tam-drawio
plugin, you don't need to run any build step.
However, if you plan to contribute your change, you need to run the script that updates links in documentation.
The best way to debug the code is to load the plugin on an html version of draw.io. here are the steps:
https://github.com/jgraph/drawio
) into a sibling folder to this project. (so ../drawio
would find it)../drawio/src/main/webapp/plugins
Modify ../drawio/src/main/webapp/index.html
this file by changing these two variables:
...
if (urlParams['dev'] == '1')
{
// Used to request grapheditor/mxgraph sources in dev mode
var mxDevUrl = document.location.protocol + '//localhost:8080/';
// Used to request draw.io sources in dev mode
var drawDevUrl = document.location.protocol + '//localhost:8080/';
- Run: `node drawio.js` and access the server `http://localhost:8080?dev=1`
- Now use the browser debugger to debug the plugin.
### Prerequisites
- Download and install [Node.js](https://nodejs.org/en/download/) (≥16.14.0)
- Install dependencies by running `npm install` in the root directory of this repository
To update the bookmarklet and download links in documentation, please run
npm run pages
after changing `tam-drawio.js`, before pushing the code.