Proper way to import KNIME Source features from the update site as a Plug-In Project in the workspace?

Hello All,

I would like to have access to the KNIME source code of nodes in order to tweak their functionality and immediately be able to test them. After downloading the KNIME Source features from the update.knime.org repository, how can I make them into a fully functional Eclipse Plug-in Project in my Eclipse Project Explorer?

For example, the "Create a new KNIME Node-Extension" does exactly what I am looking for, but provides me with only a sample project, not a project with the source of existing nodes.

I have struggled off and on for about a week trying to do this, and have found a way, but I don't think it's the right way to do it. What I've tried can be summed up below:

______________________________________________________________________

Unsuccessful:

I have I installed the desired feature (Source for KNIME Perl Integration) to my target environment, and I could see the associated plug-in in the "Content" section of the current Target Platform.

However, I could not get the plug-in to appear in the "Import" -> "Plug-in Development" -> "Plug-ins and Fragments" wizard. I believe this is the main source of the issue.

______________________________________________________________________

Successful, but seems improper:

1. Using update.knime.org and my Eclipse -> Help -> "Install New Software", I installed the feature called "Source for KNIME Perl Integration".

2. I found the JAR that was somewhere inside this feature 

3. I went through the wizard for "Create a new KNIME Node-Extension", and chose the class name and package name so that they matched the package and source of the JAR. This created a plug-in project with all the necessary things I needed.

4. I then used the Eclipse "Import" -> "Archive File" wizard to import the source found in the JAR file's "org" folder to step 3's project "src" folder

5. I made some tweaks to the configuration file (e.g. changed the activator from the default "NodePlugin" class to the correct class).

6. I was then able to use the node as if it was the example code from the "Create a new KNIME Node-Extension" wizard.

UPDATE: After having trouble with "Source for KNIME Perl Integration", I downloaded "KNIME Perl Integration" from the KNIME Software update site through Eclipse.

Next, I imported the plugin inside "KNIME Perl Integration". To do this, I simply used the "Import" -> "Plug-in Development" -> "Plug-ins and Fragments" wizard. I had to select to import from directory workspace/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool . "KNIME Perl Integration" contains a plug-in called org.knime.ext.perl, which I imported. The result was a working plugin with source code for the Perl Scripting node. This was exactly what I was looking for.

I am very puzzled at why the "Source for Perl Integration" exists within the KNIME Software update site, because it is redundant. The "KNIME Perl Integration" seems to include the source itself.

Hi Joe,

great that you figured it out. We are currently working on publishing several KNIME Analytics Platform plugins to bitbucket/github, such that it will be easier for you in the future to access our code. You can already clone some of our repositories, see https://github.com/knime.

Best regards,

Christian

Thanks Christian!

I read the warning about the KNIME github source being newer than the current release of the KNIME Analytics Platform.

In order to maintain nodes for the several KNIME release versions, do you know how to map a tagged github release to a given KNIME release/target platform?

EDIT: Answered my own question. Map is here: https://github.com/knime/knime-core/releases

However, I should get the updated versions of the release, I think, which can be found by selecting the branch corresponding to the release I want to develop against (e.g. https://github.com/knime/knime-core/tree/releases/3.3 ).

Thanks for making it available on Github!

 

Joe

As a side note: it's much easier to rely on the released binary builds instead of the sources. Simply add the corresponding KNIME update site to your target platform and select the features that your extension is based on.

Yes, I totally agree. It's much better to go through the binary builds' APIs and avoid using code that may have later bugfixes or implementation changes.

However, my situation is different. I want to make small tweaks to existing nodes, such as adding features and fixing bugs. That's why I have been trying to get proper, ready-to-compile, original source.