Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354097 - Fix package exports
Summary: Fix package exports
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Core (show other bugs)
Version: 5.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 5.0.2   Edit
Assignee: Greg Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-07 16:14 EDT by Greg Watson CLA
Modified: 2011-08-29 15:57 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Watson CLA 2011-08-07 16:14:20 EDT
A number of packages have been incorrectly exported so that they are classed as API. This bug is to track those packages and document them as being non-API.

These packages are currently:

	org.eclipse.ptp.rm.jaxb.control.core
	org.eclipse.ptp.etfw.internal
Comment 1 Roland Schulz CLA 2011-08-07 19:19:08 EDT
 org.eclipse.ptp.rdt.sync.core
 org.eclipse.ptp.rdt.sync.core.messages
 org.eclipse.ptp.rdt.sync.core.remotemake
 org.eclipse.ptp.rdt.sync.core.resources
 org.eclipse.ptp.rdt.sync.core.serviceproviders
 org.eclipse.ptp.rdt.sync.core.services
 org.eclipse.ptp.rdt.sync.git.core
 org.eclipse.ptp.rdt.sync.rsync.core
 org.eclipse.ptp.rdt.sync.ui
 org.eclipse.ptp.rdt.sync.ui.preferences
 org.eclipse.ptp.rdt.sync.ui.properties
 org.eclipse.ptp.rdt.sync.ui.wizards

Some can be removed completely:
 org.eclipse.ptp.rdt.sync.ui.preferences
 org.eclipse.ptp.rdt.sync.ui.properties
 org.eclipse.ptp.rdt.sync.core.messages
 org.eclipse.ptp.rdt.sync.core.remotemake

Others should be exported with x-friends:
 org.eclipse.ptp.rdt.sync.core; x-friends:="org.eclipse.ptp.rdt.sync.git.core,org.eclipse.ptp.rdt.sync.rsync.core"
 org.eclipse.ptp.rdt.sync.core.serviceproviders; x-friends:="org.eclipse.ptp.rdt.sync.git.core,org.eclipse.ptp.rdt.sync.rsync.core,org.eclipse.ptp.rdt.sync.git.ui,org.eclipse.ptp.rdt.sync.rsync.ui"
 org.eclipse.ptp.rdt.sync.core.resources; x-friends:="org.eclipse.ptp.rdt.sync.ui"
 org.eclipse.ptp.rdt.sync.core.services; x-friends:="org.eclipse.ptp.rdt.sync.git.ui,org.eclipse.ptp.rdt.sync.rsync.ui"
 org.eclipse.ptp.rdt.sync.git.core;x-friends:="org.eclipse.ptp.rdt.sync.git.ui,org.eclipse.ptp.rdt.sync.core.tests"
 org.eclipse.ptp.rdt.sync.rsync.core;x-friends:="org.eclipse.ptp.rdt.sync.rsync.ui"
 org.eclipse.ptp.rdt.sync.ui;x-friends:="org.eclipse.ptp.rdt.sync.git.ui,org.eclipse.ptp.rdt.sync.rsync.ui"
 org.eclipse.ptp.rdt.sync.ui.wizards;x-friends:="org.eclipse.ptp.rdt.sync.ui.fortran"
Comment 2 Greg Watson CLA 2011-08-08 09:02:23 EDT
This list is fine for the current plugins, but un-exporting org.eclipse.ptp.rdt.sync.core, org.eclipse.ptp.rdt.sync.core.serviceproviders, org.eclipse.ptp.rdt.sync.core.services, or org.eclipse.ptp.rdt.sync.ui would mean that it would be impossible to implement a new sync service provider. I don't want to preclude this.
Comment 3 Roland Schulz CLA 2011-08-08 11:09:24 EDT
(In reply to comment #2)
> This list is fine for the current plugins, but un-exporting
> org.eclipse.ptp.rdt.sync.core, org.eclipse.ptp.rdt.sync.core.serviceproviders,
> org.eclipse.ptp.rdt.sync.core.services, or org.eclipse.ptp.rdt.sync.ui would
> mean that it would be impossible to implement a new sync service provider. I
> don't want to preclude this.

I really would like to unexport them for Indigo and only export them for Juno. If someone would want to implement another sync provider now, they could still do so. With the x-friends they would only get a warning not an error. And also we could always add another friend if we added another providers ourselves.

For the moment we still need to make some changes. I don't see how we can implement the sync menu without adding flags to the enum in SyncFlags. And this is in the API. 

To summarize: I don't think we are in a state where the advantages of a hypothetical additional service provider outweighs the disadvantages to freeze that part of the API.
Comment 4 John Eblen CLA 2011-08-08 11:38:35 EDT
(In reply to comment #3)
> I really would like to unexport them for Indigo and only export them for Juno.
> If someone would want to implement another sync provider now, they could still
> do so. With the x-friends they would only get a warning not an error. And also
> we could always add another friend if we added another providers ourselves.
> 
> For the moment we still need to make some changes. I don't see how we can
> implement the sync menu without adding flags to the enum in SyncFlags. And this
> is in the API. 
> 
> To summarize: I don't think we are in a state where the advantages of a
> hypothetical additional service provider outweighs the disadvantages to freeze
> that part of the API.

Also, we eventually would like to allow users to add new sync service providers through a plugin. This could be done, I think, by simply adding a new exported package. There would be no need to have the current packages exported.
Comment 5 Albert L. Rossi CLA 2011-08-08 12:16:39 EDT
Actually, the package is

org.eclipse.ptp.rm.jaxb.control

in the org.eclipse.ptp.rm.jaxb.control.core plugin

It should be:

org.eclipse.ptp.rm.jaxb.control;
  x-friends:="org.eclipse.ptp.rm.jaxb.control.core,
   org.eclipse.ptp.rm.jaxb.control.ui,
   org.eclipse.ptp.rm.jaxb.core,
   org.eclipse.ptp.rm.jaxb.tests,
   org.eclipse.ptp.rm.jaxb.ui,
   org.eclipse.ptp.rm.lml_jaxb",


Al
Comment 6 Greg Watson CLA 2011-08-08 14:56:16 EDT
(In reply to comment #4)
> 
> Also, we eventually would like to allow users to add new sync service providers
> through a plugin. This could be done, I think, by simply adding a new exported
> package. There would be no need to have the current packages exported.

I don't see how this would work. In order to provide a synchronizeParticipant, the extension needs to implement org.eclipse.ptp.rdt.sync.ui.ISynchronizeParticipant. So this needs to be exported.
Comment 7 Greg Watson CLA 2011-08-08 15:14:56 EDT
(In reply to comment #5)
> Actually, the package is
> 
> org.eclipse.ptp.rm.jaxb.control
> 
> in the org.eclipse.ptp.rm.jaxb.control.core plugin
> 
> It should be:
> 
> org.eclipse.ptp.rm.jaxb.control;
> x-friends:="org.eclipse.ptp.rm.jaxb.control.core,
> org.eclipse.ptp.rm.jaxb.control.ui,
> org.eclipse.ptp.rm.jaxb.core,
> org.eclipse.ptp.rm.jaxb.tests,
> org.eclipse.ptp.rm.jaxb.ui,
> org.eclipse.ptp.rm.lml_jaxb",

I have checked in the visibility change. Please confirm that it is ok.
Comment 8 Greg Watson CLA 2011-08-08 15:57:20 EDT
Visibility of the following packages also needs to be fixed:

org.eclipse.ptp.rm.lml.core
 org.eclipse.ptp.rm.lml.core,
 org.eclipse.ptp.rm.lml.core.events,
 org.eclipse.ptp.rm.lml.core.listeners,
 org.eclipse.ptp.rm.lml.core.model,
 org.eclipse.ptp.rm.lml.core.util,
 
org.eclipse.ptp.rm.lml.da.server
 org.eclipse.ptp.rm.lml.da.server.core
 
org.eclipse.ptp.rm.lml.monitor.core
 org.eclipse.ptp.rm.lml.monitor.core
 
org.eclipse.ptp.rm.lml.monitor.ui
 org.eclipse.ptp.rm.lml.monitor.ui.wizards
 
org.eclipse.ptp.rm.lml.ui
 org.eclipse.ptp.rm.lml.ui,
 org.eclipse.ptp.rm.lml.ui.views
Comment 9 Greg Watson CLA 2011-08-08 15:57:43 EDT
Reopening
Comment 10 John Eblen CLA 2011-08-08 17:20:13 EDT
(In reply to comment #2)
> This list is fine for the current plugins, but un-exporting
> org.eclipse.ptp.rdt.sync.core, org.eclipse.ptp.rdt.sync.core.serviceproviders,
> org.eclipse.ptp.rdt.sync.core.services, or org.eclipse.ptp.rdt.sync.ui would
> mean that it would be impossible to implement a new sync service provider. I
> don't want to preclude this.

Please apply the other changes (from comment 1) if you have no objections. Perhaps we can discuss the rest tomorrow on the developer's call.
Comment 11 Greg Watson CLA 2011-08-09 08:40:06 EDT
Package visibility on org.eclipse.ptp.etfw and org.eclipse.ptp.etfw.parallel has been updated.
Comment 12 Greg Watson CLA 2011-08-09 09:25:53 EDT
(In reply to comment #10)

> Please apply the other changes (from comment 1) if you have no objections.
> Perhaps we can discuss the rest tomorrow on the developer's call.

I've updated the packages per the original comment.
Comment 13 Greg Watson CLA 2011-08-10 07:59:45 EDT
As per the Aug 9 Developers Meeting, package visibility should be changed to x-internal so that external packages can still access classes if desired.
Comment 14 Greg Watson CLA 2011-08-10 14:18:31 EDT
Indigo SR1 RC1 is next week. The cut off for making any changes will be the end of this week, so please document them here asap.
Comment 15 Beth Tibbitts CLA 2011-08-11 16:55:24 EDT
I have changed package visibility for PLDT:

Plugins:

org.eclipse.ptp.pldt.common			
org.eclipse.ptp.pldt.lapi		
org.eclipse.ptp.pldt.mpi.analysis	
org.eclipse.ptp.pldt.mpi.analysis.cdt		
org.eclipse.ptp.pldt.mpi.core
org.eclipse.ptp.pldt.openmp.analysis		
org.eclipse.ptp.pldt.openmp.core	
org.eclipse.ptp.pldt.openmp.ui.pv			
org.eclipse.ptp.pldt.upc		
org.eclipse.ptp.pldt.wizards

About the only things left exported are in pldt.common (These are used by the lower-level analysi plugins for MPI, OpenMP, UPC, etc and some others that clients provide)
org.eclipse.ptp.pldt.common,
 org.eclipse.ptp.pldt.common.actions,
 org.eclipse.ptp.pldt.common.analysis,
 org.eclipse.ptp.pldt.common.editorHelp	
 org.eclipse.ptp.pldt.common.util
 org.eclipse.ptp.pldt.common.views

The rest are exported as x-internal or x-friends to other PLDT plug-ins.
Comment 16 Greg Watson CLA 2011-08-17 12:33:21 EDT
Closing as fixed.
Comment 17 Beth Tibbitts CLA 2011-08-29 15:57:45 EDT
Two more more to add from org.eclipse.ptp.etfw.feedback:
org.eclipse.ptp.etfw.feedback.util
org.eclipse.ptp.etfw.feedback.messages