archimatetool/archi-scripting-plugin

[Idea] expose the script menu into the main Archi Window's menu

jbsarrodie opened this issue · 8 comments

Hi,

Would it be possible to add a "Script" menu to the main Archi Window. As for "Collaboration", it could group jArchi's key features (show/hide script manager/console, run scripts, associate key bindings -- see #62).

This main menu could look like this:

 ───────┬──────────────┬───────────┬───────┬────┬────────────────────────
        │Collaboration │Scripts    │Window │Help│
 ───────┴──────────────┼───────────┴───────┴────┤
                       │Run                    >├─────────────────────┐
                       ├────────────────────────┤                     │
                       │Edit Key bindings       │                     │
                       ├────────────────────────┤   auto-generated    │
                       │Toggle Script Manager   │   list of scripts   │
                       │Toggle Script Console   │ (same as contextual │
                       └────────────────────────┤        menu)        │
                                                │                     │
                                                │                     │
                                                │                     │
                                                └─────────────────────┘

Sorry that's not possible...

scripts

...yep can do that. :-)

Although "Edit Key Bindings" is not really a jArchi thing. It just opens up the general Eclipse key bindings dialog which is also accessible from Preferences. As it is quite generic it might be better to have it in the "Help" menu. I put it in the context menu of the Script manager because it's the right place to quickly access it when you're assigning a script to a key binding. Another reason not to have it in the "Scripts" main menu is this feature depends on having Archi 5. In the context menu I can say "if Archi version >= 5 then show menu" but I can't do that in the main top menu.

I'm not sure we need the "Run" sub-menu:

scripts2

Sorry that's not possible...

;-)

As it is quite generic it might be better to have it in the "Help" menu.

Agree

I'm not sure we need the "Run" sub-menu:

Well... In theory no, but I'm afraid that without it someone will complain that it's not explicit and he/she was expecting this menu to edit script and not run it. It might also make the main script menu too big if someone have lots of scripts without any folders.

It might also make the main script menu too big if someone have lots of scripts without any folders.

Then the sub-menu would also be big.

Run sub-menu or no Run sub-menu? I don't mind. the only issue is this one:

that without it someone will complain that it's not explicit and he/she was expecting this menu to edit script and not run it.

Then the sub-menu would also be big.

Yes, but in this case this doesn't "hide" other enties like "Script Manager" and "Script Console". And if we decide later to add other things (such as "Refesh UI when running scripts" checkbox), then they will be visible at all time.

Run sub-menu or no Run sub-menu?

I think it makes sens to have it to make it explicit and not clutter for people with lots of scripts.

Edit: see next comment

I've had a chat with a colleague who had nice suggestions:

  • Adding the "Run" submenu adds one more click for users. While it doesn't seem a big deal for some (like me), it is for some others.
  • Making the "run" action explicit to avoid mistake is not a strict necessity because if someone runs a script by mistake, it's easy to undo potential changes.
  • If people have a really big list of scripts, then let's just move "Script Manager" and "Script Console" to the top, and have the list of scripts below a separator.

I think I agree with his suggestions, so (if you agree), let's do it this way:

 ───────┬──────────────┬───────────┬───────┬───────────────┬─────
        │Collaboration │Scripts    │Window │Help           │
 ───────┴──────────────┼───────────┴───────┴───────────────┼─────
                       │    Script Manager                 │
                       │    Script Console                 │
                       ├───────────────────────────────────┤
                       │[x] Refresh UI When Running Scripts│
                       ├───────────────────────────────────┤
                       │    auto-generated list of scripts │
                       │    (same as contextual menu)      │
                       └───────────────────────────────────┘

Okey dokey...