Export-Package [message #552140] |
Wed, 11 August 2010 04:37 |
Jingang Zhou Messages: 18 Registered: August 2010 |
Junior Member |
|
|
Hi,
Does not PDE support the "exclude" directive in Export-Package header?
I created two plug-ins, say A and B, and create two classes (say, services.ServiceInA.java and services.NonServiceInA.java) in A and a class (say, ClientInB.java) in B. I also exported the pakage services of A and specified as below:
Export-Package: services; exclude:=NonServiceInA
When I import the services pakage in B, I can also see the NonServiceInA class in B, but it shoud not be that according to the OSGi specification, Does anybody know?
Best regards.
Robin
[Updated on: Wed, 11 August 2010 04:38] Report message to a moderator
|
|
|
Re: Export-Package [message #552814 is a reply to message #552140] |
Fri, 13 August 2010 15:50 |
Andrew Niefer Messages: 990 Registered: July 2009 |
Senior Member |
|
|
The access rules that PDE provides to the compiler are at the package level.
I don't think the JDT compiler supports excluding individual classes. I
believe that the JDT is the one providing all the code completion and
visibility errors/warnings.
So even if it looks fine in the editor and compiles, I would expect it to
not work at runtime assuming the exclude is correct (I didn't realize you
could do that).
-Andrew
zjg_robin wrote:
> Hi,
>
> Does not PDE support the "exclude" directive in Export-Package header?
>
> I created two plug-ins, say A and B, and create two classes (say,
> services.ServiceInA.java and services.NonServiceInA.java) in A and a class
> (say, ClientInB.java) in B. I also exported the pakage services of A and
> specified as below: Export-Package: services; exclude:=NonServiceInA
>
> When I import the services pakage in B, I can also see the NonServiceInA
> class, but it shoud not be that according to the OSGi specification, Does
> anybody know?
>
> Best regards.
>
> Robin
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03821 seconds