Archi Forum

Archi Plug-ins => jArchi => Topic started by: rfamans on October 28, 2018, 22:30:58 PM

Title: Can Jarchi trigger archi menu actions?
Post by: rfamans 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.

Title: Re: Can Jarchi trigger archi menu actions?
Post by: Phil Beauvoir on October 28, 2018, 23:01:41 PM
Yes, it's possible, but you have to be familiar with the underlying Java code:


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.
Title: Re: Can Jarchi trigger archi menu actions?
Post by: rfamans 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.