Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Circular dependencies, plugins, fragments and modularity
Circular dependencies, plugins, fragments and modularity [message #1265573] Thu, 06 March 2014 09:14 Go to next message
Djak Mising name is currently offline Djak Mising nameFriend
Messages: 16
Registered: November 2010
Junior Member
Hello,
I'm new to RCP development and I encounter a problem which seems common, but I can not find a solution. I think I don't understand well the modularity of the RCP. May you advise me about these concerns ?

I have a plugin A which needs a plugin B and the plugin B needs the plugin A. The project separation purpose is for dividing the update process via the Eclipse Update System. Do you think it's a bad approach ? Should I use fragments instead of plugins ? For now I didn't understand well the difference between them. And it seems fragments are optional so I guess using them for this purpose of updates division may be wrong ?

The project compiles but I can't export a product because of the "A cycle was detected when generating the classpath" error.

I would have another question about the modularity. I have a base plugin project P.
In this project I want to offer a switch system for choosing one or other graphics rendering system.
I developed a classic abstraction/implementation mechanism with 2 different implementations :
- plugin abstraction A needs base project P
- plugin implementation A1 needs A (and therefore P)
- plugin implementation A2 needs A (and therefore P)

Here I also have a cycle loop problem and I don't see solution in this configuration for removing the circular dependencies. Do you think this is a bad approach too for the abstraction/implementations ? Should I use extension point for this ? But I need the user can dynamically switch between one or other implementation at runtime, do you think it's possible using extensions point ?

Any advise about these concerns or about better modularity will be very appreciated.
Thank you in advance for the help.
Re: Circular dependencies, plugins, fragments and modularity [message #1265752 is a reply to message #1265573] Thu, 06 March 2014 14:09 Go to previous messageGo to next message
Jonathan Dumont is currently offline Jonathan DumontFriend
Messages: 58
Registered: March 2011
Location: Laval
Member
In your example, you don't have a cycle as you will have two dependencies paths :
P <- A <- A1
P <- A <- A2

You don't need to explicitly had the dependencies P <- A1 and P <- P2, this is automatically managed I think.
Re: Circular dependencies, plugins, fragments and modularity [message #1265959 is a reply to message #1265752] Thu, 06 March 2014 19:55 Go to previous message
Djak Mising name is currently offline Djak Mising nameFriend
Messages: 16
Registered: November 2010
Junior Member
Thank you for you answer.
Sorry, actually I have not explicitly mentioned that the base project P needs the abstraction and the 2 implementations. The base project P uses some classes of abstraction A and of implementations A1 and A2. And the problem is that the abstraction A and implementations A1 et A2 uses some classes of project P. So I have :
A needs P
A1 needs A and P
A2 needs A and P
P needs A, A1 and A2

and there is a loop. Finally the reduced problem is A <-> B, I guess.

Previous Topic:Reuse the existing IWorkbenchActionDelegate instance
Next Topic:Controlling Color of Highlight in CNF
Goto Forum:
  


Current Time: Fri Apr 26 08:07:23 GMT 2024

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

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

Back to the top