Author Topic: Can Jarchi trigger archi menu actions?  (Read 309 times)

rfamans

  • Newbie
  • *
  • Posts: 9
Can Jarchi trigger archi menu actions?
« on: October 28, 2018, 22:30:58 PM »
Is it possible to initiate Archi menu actions (e.g. close the active view) via a Jarchi script? Would be great to know how this could be done.


Phil Beauvoir

  • Archi Master
  • Hero Member
  • *****
  • Posts: 922
    • Archi
Re: Can Jarchi trigger archi menu actions?
« Reply #1 on: October 28, 2018, 23:01:41 PM »
Yes, it's possible, but you have to be familiar with the underlying Java code:

Code: [Select]
var CLOSE = Java.type("org.eclipse.ui.actions.ActionFactory").CLOSE;
var action = CLOSE.create(workbenchwindow);
action.run();

Best thing would be to open a feature request so that it is exposed as a jArchi feature.
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

rfamans

  • Newbie
  • *
  • Posts: 9
Re: Can Jarchi trigger archi menu actions?
« Reply #2 on: October 29, 2018, 07:57:28 AM »
Ok, thanks. I will try to see if I can get my way around with looking into the underlying Java.