Community
Participate
Working Groups
Created attachment 264786 [details] icon decoration mock up for discouraged/forbidden packages When a jar is added to the build path of a project and it has access rules defined that forbid/discourage the usage of some packages inside the jar, it'd be useful to put a decoration on the icon of the package in the package explorer to indicate that those packages are not forbidden/discouraged. The attached mock-up shows what I'm thinking about.
I don't think this adds much value. More important is that you don't see types that are forbidden. You can also decide to hide discouraged types (see 'Type Filters' preference page).
Could the deprecation strike-through be re-used for discouraged content?
(In reply to Stephan Herrmann from comment #2) > Could the deprecation strike-through be re-used for discouraged content? No. Packages can also be deprecated, but we currently don't decorate them in the UI. Plus, there are two access restrictions: discouraged and forbidden.
(In reply to Dani Megert from comment #3) > (In reply to Stephan Herrmann from comment #2) > > Could the deprecation strike-through be re-used for discouraged content? > > No. Packages can also be deprecated, but we currently don't decorate them in > the UI. Plus, there are two access restrictions: discouraged and forbidden. I was thinking of filtering "forbidden" and decorating "discouraged". But I didn't think of deprecated packages, so that would be ambiguous... Was it an active decision not to decorate deprecated packages? (Does deprecation of packages even happen in real life?)
(In reply to Stephan Herrmann from comment #4) > (In reply to Dani Megert from comment #3) > > (In reply to Stephan Herrmann from comment #2) > > > Could the deprecation strike-through be re-used for discouraged content? > > > > No. Packages can also be deprecated, but we currently don't decorate them in > > the UI. Plus, there are two access restrictions: discouraged and forbidden. > > I was thinking of filtering "forbidden" and decorating "discouraged". But I > didn't think of deprecated packages, so that would be ambiguous... > > Was it an active decision not to decorate deprecated packages? > (Does deprecation of packages even happen in real life?) No, I don't think so. There was just no request so far.
In my opinion the value of this enhancement is that: - if the package/class is forbidden it will not show up in code completion/Open Type/etc., but it's fully visible in the Package Explorer without any indication why it's excluded from the list of suggestions - similarly for discouraged packages/classes there's no indication in the Package Explorer about it's status I often try to figure out which class to use by browsing the jars under project dependencies, and it would be helpful to immediately see which ones are accessible on which level. Hiding discouraged types does not provide the same experience in my opinion.