Community
Participate
Working Groups
In an RSE workspace, there are currently 368 "Discouraged Access" warnings. These fall in two categories: (a) 103 "Discouraged Access" in the Platform. These should be replaced by official API usage where possible, or bugs need to be reported against those other packages if this is not possible. (b) 265 "Discouraged Access" inside RSE itself. These should be carefully reviewed; either they are deemed OK and an "x-friend" statement should be added to the Manifest; or, official API should be used where possible; or, non-API classes need to be made API for public consumption. Issues (b) can be found with following filter in Problems View: 3x "due to restriction on required project org.eclipse.dstore" subsystems.files.dstore --> dstore.extra: DomainNotifier.addDomainListener(), DomainNotifier.removeDomainListener() - DaveM: This is a dstore-specific thing and should not be public API 262x "due to restriction on required project org.eclipse.rse" Typically due to re-using RESID_ constants or similar in files.dstore, processes.dstore, shells.dstore or useractions Issues (a) can be found with 103x "due to restriction on required library" These need to be addressed.
Created attachment 72567 [details] Fix expected friend access between dstore components Attached patch fixes the false positives (expected internal friend access warnings) between dstore components: subsystems.files.dstore --> dstore.extra subsystems.(files,processes.shells).dstore --> services.dstore connectorservice.dstore --> rse.ui processes.ui --> rse.ui I'm releasing this patch for 2.0 based on our discussion that we should review "friend" declarations every now and then.
The patch reduces case (b) - "restriction on required project" from 265 occurrences to 12 occurrences, all of which are about OutputRefreshJob. OutputRefreshJob should either be API itself or get accessible through a factory method in API rather than exposing its constructor. The 103 warnings for case (a) should still be reviewed.
Martin, do you want to commit that patch?
I did commit it already :-) since it all seemed to make sense and is a releng only aspect of RSE that does not have any effect on the actual operation of it. But I'd be happy if you reviewed it to confirm my assumptions were correct. At any rate, the bug should remain open to deal with the other issues.
I agree with your changes, I just wasn't sure if the patch had been committed to cvs yet.
Bulk update target milestone 2.0.1 -> 3.0
I don't see anymore dstore discouraged access warnings (after committing a couple changes to remove a few remaining warnings) so I'm going to mark this one as fixed.
This is an API breaking change, because DataStore#getDomainNotifier() which used to return an (internal) DomainNotifier class, now returns IDomainNotifier DataStore#getDomainNotifier()