Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361308 - Exports in Runtime page MANIFEST editor should provide the ability to mark internal
Summary: Exports in Runtime page MANIFEST editor should provide the ability to mark in...
Status: RESOLVED WORKSFORME
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-18 16:35 EDT by Jeff Johnston CLA
Modified: 2011-10-19 16:22 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Johnston CLA 2011-10-18 16:35:33 EDT
Currently one can export packages in the Runtime page of the MANIFEST editor.  However, there is no way to designate a package as being internal so that the proper OSGI tag is added to the MANIFEST.MF file.  This forces one to do this manually.  It would be good in the properties dialog for the individual exports for there to be a checkbox to mark the package as internal and thus generate the tag in the MANIFEST.MF file automatically.
Comment 1 Curtis Windatt CLA 2011-10-18 16:55:47 EDT
What proper OSGi tag are you referring to?  On the runtime page of the editor, when you select a package, the Package Visibility section on the top right will be enabled.  There you can specify if the package should be visible or not.

x-internal and x-friends entries will be added as appropriate.
Comment 2 Jeff Johnston CLA 2011-10-18 17:48:22 EDT
Another commiter has created a plug-in in the Linux Tools project that is exporting an internal package to everyone.  The plug-in is still pre-1.0 and Incubation.

There is no warning when using any of these internal interfaces.  If I change this over to make it hidden except to only a few other related packages, it uses x-friends.

A bug was opened suggesting adding the x-internal specifier so that users will get warnings/etc.. if using the package.  The idea would be to restrict access to friends in the future.  There seems to be no way automatically to do this (expose the plug-in but have it marked it internal).

Would this simply be bad form so it is not offered?  If that is the case, then please feel free to close as INVALID or WONTFIX.
Comment 3 Curtis Windatt CLA 2011-10-19 09:39:35 EDT
(In reply to comment #2)
> A bug was opened suggesting adding the x-internal specifier so that users will
> get warnings/etc.. if using the package.  The idea would be to restrict access
> to friends in the future.  There seems to be no way automatically to do this
> (expose the plug-in but have it marked it internal).

I think the current behaviour does what you require. 

On the runtime page, add the package to the exported list, then make sure it is 'hidden from all plug-ins'.

By adding the package to the runtime page, it gets listed as an exported package and can be used by other plug-ins (in Eclipse we do this with all packages).  However, the packages that are not intended as public API are marked with x-internal (or 'hidden from all plug-ins' in the editor).  Unless a user has modified the PDE errors/warnings settings, any use of those packages will be flagged with a warning.  If you use x-friends, now or later, friended plug-ins will not get flagged for usage of that package, but all other use will be.

Closing as WORKSFORME.  If your case is different then what I am describing, please explain further.
Comment 4 Jeff Johnston CLA 2011-10-19 16:05:27 EDT
Closing it as mentioned is fine.
Comment 5 Curtis Windatt CLA 2011-10-19 16:22:54 EDT
Thanks