[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: Communication between two plugins.

Remy Suen wrote:
Suvi Dhirakaosal wrote:
 > 1.  Trying to import the package of B into A for instantiation causes a
 > package not resolved error.  Note that the package of B has been set to
 > expose to A.

I don't think extensions should be be making any assumptions about the implementations (besides the obvious, that being that the API contract is met and fulfilled). So I guess the question is why are you doing something like...

pkg.b.InterfaceImpl interface = (pkg.b.InterfaceImpl) createdObject;

...which requires importing packages from plug-in B, instead of something like...

pkg.a.IInterface interface = (pkg.a.IInterface) createdObject;

I don't think setting it to expose is good enough unless you do Import-Package or Require-Bundle? I could be wrong, though.

 > 2.  Trying to remedy the above, I add B to the dependency of A.  This
 > fixes the unresolved class error, but introduces the a cyclical path
 > detected error between the two projects.  ("A cycle was detected in
 > build path of project:...")

I remember someone on IRC just decided to set that as a warning and not an error, not sure if that "fix" is applicable in your case though.

Rem,

I get an internal error during runtime if I force a launch with the cyclical errors. In any case I followed the example provided by Walter and got it working.

Thanks for your input,
Suvi D.


Regards, Rem