Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Why plug-in depends on its fragment(s)?
Why plug-in depends on its fragment(s)? [message #878658] Tue, 29 May 2012 17:00 Go to next message
Libor Jelinek is currently offline Libor JelinekFriend
Messages: 143
Registered: January 2012
Location: Prague, Czech Rep.
Senior Member

Hello everybody!
I don't understand why plugin depends on its fragment. Consider this
simple scenario:

Main application resides in "plugin.a". According to "best practises"
test are placed in fragment "plugin.a.test".

Dependency tree for "plugin.a" looks like this:

plugin.a
+ some.plugin
+ some.other.plugin
+ ...
+ plugin.a.test <== Why?

I fully understand that fragment depends on its host, but why also
vice-versa?

Because I use fragments for tests (i18n is no matter for me), these
fragments themselves depend on org.junit bundle:

plugin.a.test
+ org.junit

Thus result dependency tree is:

plugin.a
+ some.plugin
+ some.other.plugin
+ ...
+ plugin.a.test
+ org.junit

And dependency calculators like "Add required" button in Run
Configuration always add test fragments and org.junit. For my point of
view it is undesirable and only pollute it.

Am I missing something or it is normal? How to workaround this?

Thanks
Libor
Re: Why plug-in depends on its fragment(s)? [message #880176 is a reply to message #878658] Fri, 01 June 2012 14:58 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

What does the manifest and fragment.xml look like in your plugin.a.test? What does plugin.a MANIFEST.MF say?

Plugin's generally don't have a dependency on any fragments. By definition, a fragment requires its host bundle.

PW


Re: Why plug-in depends on its fragment(s)? [message #882284 is a reply to message #880176] Wed, 06 June 2012 07:27 Go to previous message
Libor Jelinek is currently offline Libor JelinekFriend
Messages: 143
Registered: January 2012
Location: Prague, Czech Rep.
Senior Member

Hello Paul,
I observed that it's only "Plug-in Dependencies" view thing. I was
learning about OSGi dependencies and I used this view to confirm my
"mental model" how dependencies work. PDE is trying to be helpful and,
by default, shows fragments in tree in the same ways as true depending
plug-ins.

Anyway, thank you!
Libor

On 06/01/2012 04:58 PM, Paul Webster wrote:
> What does the manifest and fragment.xml look like in your plugin.a.test?
> What does plugin.a MANIFEST.MF say?
>
> Plugin's generally don't have a dependency on any fragments. By
> definition, a fragment requires its host bundle.
>
> PW
>
Previous Topic:org.eclipse.core.runtime.adaptor.FileManager cannot be resolved
Next Topic:internal classes v.s. API
Goto Forum:
  


Current Time: Tue Mar 19 06:23:27 GMT 2024

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

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

Back to the top