archi-scripting-plugin
archi-scripting-plugin copied to clipboard
Add jArchi support for CheatSheets
jArchi makes it possible to automate a lot of things. I think that, together with Cheat Sheets (which are an interesting but motly hidden feature of Archi) this would allow people to create really amazing things.
Thanks to @Phillipus's help, I've started to work on jArchi support for Cheat Sheets, and this has been much simpler than expected. So I've just submited some code in a new cheatsheets branch.
This code provides a very simple RunArchiScriptCheatSheetAction action which will run the script passed as an argument. The argument must contains the script path relative to __SCRIPTS_DIR__.
A basic demo cheat sheet has been included. It expects the user to have created a demo.ajs script beforehand in the root scripts folder.
I'm planning to update this code so that the action takes another parameter to define the "scope" of the script, so that it becomes possible to run a script:
- through an absolute path
- included in another plugin (so this might adresses #82)
- by providing the actual code inside the cheatsheet itself
So opening this issue to discuss this feature.
Interesting.
demo.xml file is missing, though
Might be better to use:
Require-Bundle: org.eclipse.ui.cheatsheets
rather than
Import-Package: org.eclipse.ui.cheatsheets
demo.xmlfile is missing, though
In fact lots of files are missing (unfortunately I have to use TortoiseGit, which not that bad but not that good than SmartGit). I've just commited the other files.
Might be better to use:
Require-Bundle: org.eclipse.ui.cheatsheetsrather than
Import-Package: org.eclipse.ui.cheatsheets
Done
Also, try to remove the ``org.eclipse.core.resources.prefs` file. I don't know which part of Eclipse adds it.
Also, try to remove the ``org.eclipse.core.resources.prefs` file. I don't know which part of Eclipse adds it.
Done. In fact this is related to another change we have to make in jArchi: the template for new scripts should be in UTF-8, or else people might have some troubles. I'll submit it on master later.
I'll submit it on master later.
I've done it.