Community
Participate
Working Groups
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
Note the Build path wizard maps - IAccessRule#K_NON_ACCESSIBLE to 'Forbidden', - IAccessRule#K_DISCOURAGED to 'Discourged', - IAccessRule#K_ACCESSIBLE to 'Accessible'
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 ?
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?
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.