I am doing some scripting, where I take the custom image of an element and displaying it in an Eclipse widget. I realise that jArchi ".image" does not return a "org.eclipse.swt.graphics.Image". Is there any way I can convert a jArchi image to an Eclipse image?
Hi Thomas,
once an image is loaded in jArchi with object.image = model.createImage("cat.png")
it is stored internally to the model and is referenced thereafter by its internal id so it's not possible to get the image data from jArchi to re-use it. However, if you have the original image stored somewhere you could load it with some JS:
const Image = Java.type("org.eclipse.swt.graphics.Image");
const Display = Java.type("org.eclipse.swt.widgets.Display");
var img = new Image(Display.current, "cat.png");
// Use the image
// Dispose the image when done
img.dispose();