Bug 544225 - [9] JavaModelUtil.isVisible() should consider modules
Summary: [9] JavaModelUtil.isVisible() should consider modules
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.11   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-07 08:56 EST by Stephan Herrmann CLA
Modified: 2022-06-05 14:08 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2019-02-07 08:56:56 EST
When leveraging JavaModuleUtil.isVisible() for bug 526339 I noted, that this method doesn't yet respect the requirement of unique visibily from JLS 9.

I suggest we integrate the new rules in this method.

Next I was surprised to find only one call chain into this method. Once it applies  the jigsaw rules, it will make sense to revisit other code locations concerned with visibility and try to redirect them to JavaModelUtil.

Or am I missing other similar utilities, that might perhaps already respect module rules?

In order to implement this request, new support from JDT/Core is probably needed. Either, IModuleDescription should expose the exported packages, and also the 'transitive' flag on 'requires' needs to be exposed.
Alternatively, JDT/Core could provide a method (provisionally in JavaModelAccess) "boolean canAccess(IModuleDescription, IPackageFragment)".
Comment 1 Eclipse Genie CLA 2022-06-05 14:08:10 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.