Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Importing a class from a hosted plugin
Importing a class from a hosted plugin [message #1726474] Mon, 14 March 2016 04:58 Go to next message
Eclipse UserFriend
Hi there,

I am not managing to let a class defined in a hosted (fragment) plug-in be visible from an external plug-in.

This is what I have done:

  PG_A hosts PG_B
  PG_B defines class C1 in package P1.
  PG_B exports package P1
  PG_A as well exports package P1
  PG_C adds PG_A as plug-in dependency (or as well package P1 as imported package)


As I try to import P1.C1 in plug-in PG_C, I get an error since the class is not reachable from there.

Any clue on something I am missing?
thanks,
-Piero

Re: Importing a class from a hosted plugin [message #1726479 is a reply to message #1726474] Mon, 14 March 2016 05:14 Go to previous messageGo to next message
Eclipse UserFriend
Sounds like the PDE issue regarding fragments that expose API. OSGi supports this, but PDE has problems with it. So you need to add the Eclipse-ExtensibleAPI header to true in the manifest of your host plugin.

IMHO using fragments that way is wrong. But of course I don't know your use case. I blogged about that: http://blog.vogella.com/2016/02/09/osgi-bundles-fragments-dependencies/
Re: Importing a class from a hosted plugin [message #1726622 is a reply to message #1726479] Tue, 15 March 2016 03:56 Go to previous message
Eclipse UserFriend
Thank you Dirk, that is what I required indeed.

My case is the following: my hosted plug-in is the test plug-in.
I know there are different philosophies about how to implement a test plug-in or a test fragment and so on: I chose a fragment plug-in.

A different test plug-in now would like to use an utility I created within the test plug-in, so I created this kinda weird import route.

*Thanks*

[Updated on: Tue, 15 March 2016 03:59] by Moderator

Previous Topic:creating C source file in Java project
Next Topic:Menu item from menuContribution extension element
Goto Forum:
  


Current Time: Fri Jul 04 14:02:44 EDT 2025

Powered by FUDForum. Page generated in 0.12811 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top