~/Library/Application Support/StarUML/extensions/user
C:\Users\<user>\AppData\Roaming\StarUML\extensions\user
~/.config/StarUML/extensions/user
HelloWorld
in your extensions folder./stylesheets
Place CSS stylesheet files (.css
).main.js
package.json
main.js
main.js
in the new extension folder. main.js
is the entry point to be executed when StarUML is started. init()
function will be called when the extension is loaded. init()
is optional, not mandatory.app
. The app
includes objects providing useful APIs for commands, menus, keymaps, preferences, factory, dialogs, etc. For more about app
object, see API Reference.NoteStarUML is developed based on electron platform, so you can also use electron APIs in your extension.
helloworld:show-message
as bellow:/menus
and a menu JSON file helloworld.json
in the folder.Ctrl+W
(Cmd+W
for MacOS) to the command, so we need to create a folder /keymaps
and a keymap JSON file helloworld.json
in the folder.Ctrl+W
(Cmd+W
for MacOS), the command helloworld:show-message
will be executed to show alert dialog with message "Hello, World!".main.js
, then just restart StarUML. However, restarting whenever you modified codes is very tedious. So, just reload by pressing Ctrl+R
(Cmd+R
for MacOS) or selecting Debug > Reload menu item.package.json
package.json
file containing metadata for the extension.staruml-helloworld
as staruml-helloworld.zip
and just unzip the file in other user's the extensions folder explained above.https://github.com/staruml/staruml-helloworld
) and press Install button.