Node dialogs

Hi,

How can I tab the node dialogs as Node Repository, KNIME Explorer, Workflow Coach, Console or the workflow? I saw that some functionalities are inherited from the Eclipse.

Thank you,
Mihai

Hi @mihais1,

I am not sure what you want to do, do you want to add tabs to a node dialog ? That can be easily done using the addTab() method:

Or do you want to add a new view, in that case you need to use the eclipse view extension mechanism, look for a description here: www.vogella.de/blog/2009/08/17/eclipse-rcp-error-view/

best,
Gabriel

2 Likes

Hi @gab1one ,

Sorry for the very delayed answer, I was assigned on the tasks related to the cloud environment. Yes, I want to be able to open a node dialog in a new tab along the workflow tabs. Another problem that I’m facing is related to the ability of opening multiple node dialogs at the same time.

Thank you,
Mihai

Hi @mihais1,

I don’t think that is easily possible at the moment, in the current design of the workbench opening several node dialogs at once is not intended. Also, node dialogs are Swing JPannels, you need to figure out how you could put that into a SWT tab.

You need to register a new editor in the eclipse workbench for that, you will need to look into the Eclipse documentation for how to do that.

best,
Gabriel

1 Like

Hi @gab1one,

Can you advise me please where is the most suitable place in the KNIME code to register the new editor in the eclipse workbench for all the node dialogs?

Thanks,
Mihai

HI @mihais1,

Setting a new view as the default would require intensive modifications of the core KNIME Analytics Platform, which I can neither recommend nor encourage. However you can take inspiration from https://github.com/knime/knime-workbench/blob/master/org.knime.workbench.editor/src/org/knime/workbench/editor2/actions/OpenDialogAction.java
on how to add your own action that opens your custom view.

best,
Gabriel

Hi @gab1one,

I am having an issue with adding the org.eclipse.gef dependency for org.knime.core plugin. The problem is after adding this dependency in the MANIFEST.MF file and when I’m inheriting the GraphicalEditor class from org.eclipse.gef.ui.parts package I got this error: “The hierarchy of the type Node is inconsistent”. I’ve set all the API filters from Eclipse from Error to Warning.

Thanks,
Mihai

“The hierarchy of the type Node is inconsistent”

This means there is an issue with the type hierarchy of Node, you should check if you are not creating a class hierarchy that is circular or invalid. This is unrelated to the API filter warnings. Also modifying the Node class this way can mean that extensions are no longer compatible with your custom KNIME, it might be better to delegate the gui stuff into a different class and have the Node class call out to it.

best,
Gabriel