Bug 93394 - Rename access rules constants
Summary: Rename access rules constants
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-02 06:40 EDT by Jerome Lanneluc CLA
Modified: 2005-05-06 10:50 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 Jerome Lanneluc CLA 2005-05-02 06:40:03 EDT
I20050426-1700

There is a discrepancy in the naming of access rules options and access rules
constants. 

One can set the following options:
- JavaCore#COMPILER_PB_FORBIDDEN_REFERENCE
- JavaCore#COMPILER_PB_DISCOURAGED_REFERENCE

On the other hand, the access rules constants are:
- IAccessRule#K_NON_ACCESSIBLE
- IAccessRule#K_DISCOURAGED
- IAccessRule#K_ACCESSIBLE
Comment 1 Jerome Lanneluc CLA 2005-05-02 06:42:12 EDT
Note the Build path wizard maps 
- IAccessRule#K_NON_ACCESSIBLE to 'Forbidden',
- IAccessRule#K_DISCOURAGED to 'Discourged',
- IAccessRule#K_ACCESSIBLE to 'Accessible'
Comment 2 Jerome Lanneluc CLA 2005-05-06 10:19:02 EDT
Propose to have:
- IAccessRule#K_FORBIDDEN (unchanged)
- IAccessRule#K_DISCOURAGED (unchanged)
- IAccessRule#K_ALLOWED (renamed from K_ACCESSIBLE)

If this is accepted, I will enter a bug against JDT UI so that K_ALLOWED is
mapped to 'Allowed'.

Jim, can you please comment and - if you agree - approve this change ?
Comment 3 Jim des Rivieres CLA 2005-05-06 10:36:09 EDT
I assume you meant
- IAccessRule#K_FORBIDDEN (*renamed from K_NON_ACCESSIBLE*)
- IAccessRule#K_DISCOURAGED (unchanged)
- IAccessRule#K_ALLOWED (renamed from K_ACCESSIBLE)

I'm don't think there's any risk of confusion here. The existing names are 
pretty clear. If necessary, a comment on 
JavaCore#COMPILER_PB_FORBIDDEN_REFERENCE could explain that the "forbidden" 
and "non-accessible" are synonymous.

These constants are used in both JDT UI and PDE UI. Changing them now will 
cause a flurry of last-minute activity for seemingly little gain. Are there 
reasons other than consistency why this change would be required?
Comment 4 Jerome Lanneluc CLA 2005-05-06 10:50:38 EDT
Sorry. You're right I meant:
- IAccessRule#K_FORBIDDEN (*renamed from K_NON_ACCESSIBLE*)
- IAccessRule#K_DISCOURAGED (unchanged)
- IAccessRule#K_ALLOWED (renamed from K_ACCESSIBLE)

There is no reasons other than consistency for this change. I just wanted to
make sure that we don't live with this inconsistency after 3.1. But I guess it
is too late already.

As for the spec of JavaCore#COMPILER_PB_FORBIDDEN_REFERENCE, it is already
explained in JavaCore#getDefaultOptions() that "When [this option is] enabled,
the compiler will issue an error or a warning when referring to a type that is
non accessible". So we're good there I think.