Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 08:58 Go to next message
Piero Campalani is currently offline Piero CampalaniFriend
Messages: 114
Registered: January 2015
Senior Member

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 09:14 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
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 07:56 Go to previous message
Piero Campalani is currently offline Piero CampalaniFriend
Messages: 114
Registered: January 2015
Senior Member

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 07:59]

Report message to a moderator

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


Current Time: Thu Apr 25 22:38:02 GMT 2024

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

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

Back to the top