Eclipse RCP : How to use Nebula NatTable feature? - eclipse-rcp

I am following this tutorial to have a NatTable in my e4 RCP applicaton product. My app is feature based not plug in based as shown in Tutorial. I followed and installed these features. When I try to launch the product, I encounter following error
Unresolved requirement: Require-Bundle: org.eclipse.nebula.widgets.nattable.core; bundle-version="1.3.0"
Can anybody share any sample about how to use nebula features successfully?

As explained in the tutorial you posted, NatTable Core has dependencies to the following plug-ins:
org.eclipse.swt
org.eclipse.jface
org.eclipse.equinox.common
org.eclipse.core.commands
org.apache.commons.logging
In most cases org.apache.commons.logging is missing in the product configuration and needs to be added in another feature.

I resolved this problem, by
run configurations --> Plug ins --> Add Required Plug-ins
Then it worked.

Related

RCP Application do not export product with Babel feature

I use Eclipse 4.14 for an old RCP application that I updated to Java 8. Now it is possible to export the product but as soon as I add the feature "org.eclipse.babel.nls_eclipse_de" for the German language to the product in the "Contents" part the following error appears:
Processing inclusion from feature org.eclipse.babel.nls_eclipse_de: Bundle org.eclipse.ant.tests.core.nl_de_4.22.0.v20211218020001 failed to resolve.:
Host plug-in org.eclipse.ant.tests.core_0.0.0 has not been found.
The application do start in German. I only have problems with the export of the product.
Edit:
The run configuration noticed plug-ins are missing. Launching is possible. Export is not possible because of "missing" plug-ins. I do not understand why they are missing.
Screenshot of missing plug-ins

Missing plugins when exporting Eclipse e4 RCP Application containing Birt (Eclipse 2019-3)

Currently I am in the process of moving one of our RCP applications from an older version of Eclipse to the current version 2019-03.
Our application is feature based an makes use of the Birt report generator.
When trying to lauch the application via its product-file lots of unresolved plugin requirements appear, as the combination of RCP and Birt now seems to depend on different versions of org.apache.batik.* (1.7.0 and 1.8.0).
I can get the app running by manually enabling the different versions via Run -> Run Configurations -> Plugins. But of course this does not help when trying to export the RCP through the Eclipse product export wizard. The exported app is missing various plugins.
So I tried to manually edit the manifest.mf of the plugin that is dependent on birt:
Require-Bundle:
org.apache.batik.css;bundle-version="1.7.0",
org.apache.batik.css;bundle-version="1.8.0",
...
But this does not seem to have any effect on the plugins beeing exported.
The tip to switch back to a plugin-based project (How best to maintain an Eclipse RCP plugin target? 1 ) does not seem to work either.
So does anybody know how to get Eclipse to export all required versions of the org.apache.batik plugins?
Thanks a lot in advance!
Tom

How can I know plugins versions for a given version of eclipse?

I am developping a plugin for eclipse, and I am trying to find the minimum compatible version for my plugin dependencies.
As a rule of thumb, I would say my plugin should be compatible with all Luna versions. But how do I know which were the versions of the plugins in the first version of Luna ? I wouldn't mind an approximate answer.
I believe my plugin dependencies are available in all Luna distributions :
org.eclipse.core.runtime
org.eclipse.jdt.core
org.eclipse.jdt.debug.ui
org.eclipse.jdt.launching
org.eclipse.jdt.ui
org.eclipse.jface.text
org.eclipse.debug.ui
org.eclipse.ui
org.eclipse.ui.console
org.eclipse.ui.workbench.texteditor
org.objectweb.asm
Thanks in advance
Refer this blog for dependency plug-in version ranges. In your case mention the minimum version as 0.0.0. Also check this
Open your plugin.xml in PDE editor, switch to Dependency tab then select a plugin then click on Properties button. Enter minimum versions as 0.0.0. Do this all dependent plugins.
Check your Manifest.mf file it look like
Require-Bundle: org.eclipse.core.runtime;bundle-version="[0.0.0)"
Note: Also note that refer the API changes between the different version of dependent plugin(s) and check how these changes affects your plugin code.
In case you want to know the exact versions of all plug-ins in a given eclipse simultaneous release then go to this link download appropriate package.
Open eclipse. Go to Help > About eclipse. Click on Installation details. Switch to Plug-ins tab the check the versions here.

Remove RunAs->Local C/C++ Application from Eclipse Product

We are developing a development and testing platform for C projects in Eclipse platform. However, i need to remove RunAs->Local C/C++ Application from the Eclipse UI.
I am adding CDT plug-in in dependencies in the EClipse.Prodcut and tried to to remove the RunAs->Local C/C++ Application by removing org.eclipse.debug.ui and org.eclipse.debug.core from the dependecy page but is it not hiding the RunAs->Local C/C++ Application.
Can anyone help me in this regard?
you might have a look on Eclipse RCP Activities mechanism. Here is a tutorial. you also need to investigate if CDT defines any activities for its menu actions and if so, deactivate some.

How to use JavaFX 2 SDK in Eclipse?

I have installed JavaFX 2.0 SDK and now I would like to do an JavaFX application with Eclipse. But how can I use the javafx.* classes in Eclipse?
The official JavaFX Eclipse plugin seem to be for JavaFx 1.2 and outdated.
When I try to install e(fx)clipse plugin, I get this error:
Cannot complete the install because one or more required items could not be found.
Software being installed: efxclipse 0.0.8.201111131640 (at.bestsolution.efxclipse.feature.feature.group 0.0.8.201111131640)
Missing requirement: Eclipse DI integration for JavaFX 0.0.8.201111131640 (at.bestsolution.efxclipse.runtime.di 0.0.8.201111131640) requires 'bundle org.eclipse.e4.core.contexts 0.9.0' but it could not be found
Cannot satisfy dependency:
From: efxclipse 0.0.8.201111131640 (at.bestsolution.efxclipse.feature.feature.group 0.0.8.201111131640)
To: at.bestsolution.efxclipse.runtime.feature.feature.group [0.0.8.201111131640]
Cannot satisfy dependency:
From: FX Runtime 0.0.8.201111131640 (at.bestsolution.efxclipse.runtime.feature.feature.group 0.0.8.201111131640)
To: at.bestsolution.efxclipse.runtime.di [0.0.8.201111131640]
There are two options:
1) EDIT: Since 7u35 (or smth near it) JavaFX was included into base JDK classpath so you can use JavaFX classes right away.
Just set up your projects to use fx libs:
JavaFX 2.0 API is pure Java. So you can create a new Java project and add sdk-path/rt/lib/jfxrt.jar to libraries to use JavaFX in that project.
For cobundled builds in JDK7 path would be next jdk-path/jre/lib/jfxrt.jar
2) Use e(fx)clipse plugin: http://www.eclipse.org/efxclipse/index.html
You can use e(fx)clipse! You can find it here: http://www.eclipse.org/efxclipse/index.html
After download you must to configure the IDE with your JavaFX SDK(must be installed).
All you need to do is to open Window > Preferences > JavaFX and configure the location of your JavaFX-SDK.
You ussualy have it in Program Files > Oracle.
Hope this will help you!
Based on Sergey Grinev solution, I noticed that we can define this once for all java projects.
Go to Preferences -> Java build path
Select the jvm which is supposed to support javaFx (but whose feature is not yet recognized in Eclipse) and Edit it
Add the sdk-path/rt/lib/jfxrt.jar to it
This way, all your java projects based on this JVM version can support JavaFx and even your older projects (Select each project build path and eventually replace the old jvm with the jvm that you've just edited)
To access JavaFx in Java8 with Eclipse Luna (4.4):
Go to Build Path/ JRE/ Access rules/ Edit/ Add/ Accessible: javafx/**
This seems better than editing the classpath file manually or adding the JAR (again) to the build path.
As an aside, it says it won't install the FX plugin because you are missing org.eclipse.e4.core.contexts bundle. Were you trying to install it into Eclipse Indigo, or 3.8? Or did you follow the instructions on the website and download eclipse 4.2 before you started?
If you don't mind working with java 8, you won't have to jump through any hoola hoops. Just set that as your default jre and javafx imports work out of the box.
To install the e(fx)clipse tooling into your already existing Eclipse you have to add an Update site.
There's no released yet available so you need to add the nightly update-site http://download.eclipse.org/efxclipse/updates-nightly/site
I installed Eclipse Neon.1 (4.6.1)
Then Help => Eclipse Marketplace
On find specify "javaFX" and install "e(fx)clise 2.4.0"