[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Package access across plug-ins...

You can't do it with 2 bundles (plugins). Each bundles uses a distinct 
class loader and package privacy does not cross class loader boundaries. 
Fragments can access package private members since a fragment is loaded by 
its host bundle's class loader.

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargrave@xxxxxxxxxx

office: +1 407 849 9117
mobile: +1 386 848 3788




"Kirby Bohling" <computerslicer23@xxxxxxxxxxx> 
Sent by: equinox-dev-bounces@xxxxxxxxxxx
10/21/2006 07:38 PM
Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>


To
equinox-dev@xxxxxxxxxxx
cc

Subject
[equinox-dev] Package access across plug-ins...






All,

  I'm still working on the Unit testing application described in an e-mail 

yesterday.  I am splitting my plug-ins so that test code is not with 
application code.

   When I run the tests thru the "Run As -> JUnit Test", it works fine. 
When I right click it and do "Run as JUnit Test Plug-in", I get an error 
when I attempt to access anything that is "protected" or "package 
protected" 
scope?  I have several API's that expose calls to be used for testing as 
protected or package level scope.

   It appears that Fragments would solve this problem, but I'd like to 
have 
one test plug-in for a number of plug-ins.  So I don't think I'd have 
access 
to all of the various tests unless I could have many hosts for the 
fragment 
(I don't believe that's possible).  I was curious if there is a way to to 
give the plug-in org.foo.test access so that it can access org.foo 
protected 
constructors and package protected scope objects.  When the code is all in 
a 
single plug-in it appears to work fine.

   If this is an inappropriate list, a pointer to the correct list would 
be 
useful.

   Thanks,
        Kirby

_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial! 

http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail


_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev