Hi Team,
I am working on dynamic node generation. In my DynamicNodeFactory::createNodeDescription(), I am creating node description for a new node and facing issue while setting the icon path in knimenode::setIcon(). The code snippet is as below. This fails if the path has either a drive separator (on Windows) or a space. How should I escape those before setting the String path in setIcon()?
KnimeNodeDocument doc = KnimeNodeDocument.Factory.newInstance();
KnimeNode node = doc.addNewKnimeNode();
URL iconURL = DynamicNodePlugin.getDefault().getBundle().getEntry(
"/icons/schrodinger64.png");
iconURL = FileLocator.resolve(iconURL);
node.setIcon(iconURL.toURI().getPath());