archimatetool / archimatetool/archi-scripting-plugin
Allow a plugin to provide (read-only) scripts through an extension point
- Dominant language
- Java
- Stars
- 171
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
As more and more people use jArchi, it now become important in enterprise contexts to be able to harmonize scripts that are deployed on each Archi setup. For the moment this is usually done by making those "standard" scripts available in some places, relying on people to copy them locally. Some also use git to do this.
These approaches have several drawbacks: its hard to know which version of the scripts are installed locally, and users can mess things up if they edit those scripts.
Would it be possible for a plugin to hook to jArchi through an extension point, in such a way that jArchi would list the folders defined in this extension point in the scripts manager, but would not allow the Edit action on them.
Example:
Lets imagine that a user has already created some scripts (`A.ajs` and `B.ajs`) and folders (`folder_1`, `folder_2`) in its scripts manager, leading to this:
````
> folder_1/
> folder_2/
A.ajs
B.ajs
````
Now, this user adds a plugin into archi, and this plugin uses the new extension point to expose one of its internal folders named `Utils` and containing some scripts like `Remove all bendpoints.ajs`). The user should now see this in its scripts manager:
````
> folder_1/
> folder_2/
v Utils/
Remove all bendpoints.ajs
A.ajs
B.ajs
````
So the plugin contributed scripts would be seen like any other scripts, except that they can't be edited, renamed or moved. They should also appear in the dynamic script menu.
I can see one edge cases if there is a collision on folder names (plugin exposes a `Utils` folder while the user already created one). A simple way to solve this (if the framework allows it) would be to simply show to `Utils` folders in the scripts manager.
Another potential limitation would be that user scripts won't be able to easily load scripts from such contributed folders, because the real path will not be under `__SCRIPTS_DIR__`, but that might not be a big issue.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the scripts manager and dynamic script menu described in the issue, then inspect how a plugin could expose an extension point and how contributed folders would be represented. Done means plugin-provided folders and scripts appear alongside user scripts, remain read-only for edit, rename, and move actions, and appear in the dynamic script menu; folder collisions and script loading limitations still need a decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100