Is it possible to call an URCap out of an URCap?
The purpose is to make a button in an URCap and when you press it, it will open another URCap in the tree of PolyScope.
Is this possible or something for Feature requests?
The program runs PolyScope 184.108.40.20684.
i’m not sure about this on version 220.127.116.1184 but for 3.5.4+ it works by using the ProgramNodeFactory:
I am also writing an URCap that will add third-party URCaps to the program tree.
However, I encountered the problem that I somehow cannot even add sample URCaps from the starter kit.
I was trying to to add the Ellipse Swing URCap to the tree to see if it works with the command:
ellipseTreeNode = rootTreeNode.addChild(programNodeFactory.createURCapProgramNode(EllipseProgramNodeService.class));
I can even create the .urcap file but when trying to install it on the PolyScope it only shows an exclamation mark in the setup next to the URCap without any further information. The Ellipse Swing sample URCap from the Getting Started kit is readily installed on the PolyScope.
Can you help me fix this? Do I have to add some further reference of the URCap that I want to include in my own URCap or something?
Many thanks in advance,
you need to include the Ellipse ProgramNodeService and ProgramNodeContribution Classes inside your URCap Package and call them in the Activator class
Thank you for the advice! It helped a lot.
One further question is what to do in the case of third-party URCaps where I do not have the whole project but only the .urcap file which contains .class files. This means that I cannot simply include the .java classes to my URCap as I do not have them in that form.
Is it possible to insert a third-party URCap into the program tree from the .urcap file somehow?
I’m not sure if you can just copy-paste them in the .urcap file but it should work by using a java decompiler. (at this point i’m no longer responsible for any copyright violation )
I might just try the copy-paste first and see if it works. As you mentioned the decomplier might violate some licence rules.
Thank you for the answer.