Creating a JavaFX plugin and "Require-bundle" problem

33 views
Skip to first unread message

Adam W

unread,
Jan 26, 2017, 5:07:14 PM1/26/17
to eclim-dev
Hi,

I am trying to add a plugin for JavaFX based on efxclipse plugin for Eclipse.

I wanted to add a command for validating FXML and I run into a problem.
When I try to use FXMLValidator from org.eclipse.fx.ide.fxml bundle I keep
getting ClassNotFoundException even though I have Require-bundle: org.eclipse.fx.ide.fxml
in the manifest file.

I am able to import and use some other classes from some other bundles of the efxclipse plugin.

Can this be because the MANIFEST.MF of the org.eclipse.fx.ide.fxml bundle is missing Export-Package?
I looks like this:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Fxml
Bundle-SymbolicName: org.eclipse.fx.ide.fxml;singleton:=true
Bundle-Version: 3.0.0.qualifier
Bundle-Activator: org.eclipse.fx.ide.fxml.Activator
Require-Bundle: org.eclipse.ui,
 org.eclipse.core.runtime,
 org.eclipse.jface.text,
 org.eclipse.ui.editors,
 org.eclipse.wst.sse.core;bundle-version="1.1.600",
 org.eclipse.wst.xml.core;bundle-version="1.1.600",
 org.eclipse.wst.xml.ui;bundle-version="1.1.200",
 org.eclipse.wst.sse.ui;bundle-version="1.3.0",
 org.eclipse.xtext.ui;bundle-version="2.3.0",
 org.eclipse.jdt.core;bundle-version="3.7.0",
 org.eclipse.fx.ide.model;bundle-version="2.3.0",
 org.eclipse.jdt.ui;bundle-version="3.7.0",
 org.eclipse.fx.ide.ui;bundle-version="2.3.0",
 org.eclipse.ui.ide;bundle-version="3.7.0",
 org.eclipse.xtext.common.types.ui;bundle-version="2.3.0",
 org.eclipse.xtext.xbase.lib;bundle-version="2.3.0",
 org.eclipse.core.databinding;bundle-version="1.4.0",
 org.eclipse.core.databinding.beans;bundle-version="1.2.100",
 org.eclipse.jface.databinding;bundle-version="1.5.0",
 org.eclipse.core.databinding.property;bundle-version="1.4.0",
 org.eclipse.wst.validation,
 org.eclipse.ui.workbench.texteditor;bundle-version="3.7.0",
 org.eclipse.search;bundle-version="3.7.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: Eclipse.org




Adam W

unread,
Jan 27, 2017, 11:39:38 AM1/27/17
to eclim-dev
*ran into a problem

Eric Van Dewoestine

unread,
Jan 27, 2017, 12:44:42 PM1/27/17
to ecli...@googlegroups.com
On 2017-01-26 14:07:14, Adam W wrote:
> Hi,
>
> I am trying to add a plugin for JavaFX based on efxclipse plugin for
> Eclipse.
>
> I wanted to add a command for validating FXML and I run into a problem.
> When I try to use *FXMLValidator* from *org.eclipse.fx.ide.fxml* bundle I
> keep
> getting *ClassNotFoundException* even though I have *Require-bundle:
> org.eclipse.fx.ide.fxml*
> in the manifest file.
>
> I am able to import and use some other classes from some other bundles of
> the efxclipse plugin.
>
> Can this be because the *MANIFEST.MF* of the *org.eclipse.fx.ide.fxml* bundle
> is missing *Export-Package*?

Most likely, yes. If that class is only found in that bundle and that
bundle is not exporting the package that class belongs to, then your
bundle won't have access to it. You can try emailing the developers of
that plugin to see if there is another way to validate fxml files
using exported code, or see if they are willing to export the
package(s) you need in a future release (I had to do that in the past
with the scalaide devs).
> --
> You received this message because you are subscribed to the Google Groups "eclim-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to eclim-dev+...@googlegroups.com.
> To post to this group, send email to ecli...@googlegroups.com.
> Visit this group at https://groups.google.com/group/eclim-dev.
> For more options, visit https://groups.google.com/d/optout.


--
eric

Adam W

unread,
Feb 1, 2017, 1:52:46 PM2/1/17
to eclim-dev
Thank you, I will try writing them.

In the meantime I just copied the classes I need from the bundle to my eclim plugin but that is not a very elegant solution that would be accepted in a pull request I guess.

Dne pátek 27. ledna 2017 18:44:42 UTC+1 Eric Van Dewoestine napsal(a):
Reply all
Reply to author
Forward
0 new messages