| Summary: | Access rule pattern matching should ignore file extension | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Jerome Lanneluc <jerome_lanneluc> |
| Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | dirk_baeumer, jeem, martinae, maxime_daniel, philippe_mulet |
| Version: | 3.1 | ||
| Target Milestone: | 3.1 RC2 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Jerome Lanneluc
Indeed current spec is error prone. Also classpath validation or access rule should capture this scenario. If possible, we should have the pattern match against the qualified type name, not the file name. E.g. to discourrage the inner type java.util.Map.Entry you currently have to know that the compiler creates a file Map$Entry.class. We usually keep such names away from the user. In source one deals with names like Map.Entry. If this isn't too much of an effort, this would make the feature easier to understand. The description in the UI are currently quite tricky as they have to avoid saying that you're discourraging types and packages, as the correct description is to discourrage folders and files. Why would you discourage using a member type only ? I mean in real life... We could currently only support main type (or file name with no extension), and could evolve into true type granularity in the future, however this would require extensive rework on our end (i.e. post 3.1). BTW, I could argue that I never want to see secondary types of some discouraged main type name, and given these are implementation details, I don't want to need to list them all. *** Bug 97446 has been marked as a duplicate of this bug. *** +1 for RC2 Clarified spec on IAccessRule to say that the file extension is ignored. Changed references to AccessRuleSet#getViolatedRestriction(...) to pass in a file name without extension. Updated tests BatchCompilerTests and ReconcilerTests to reflect this new behavior. Martin, does this affect UI ? I think we are fine. The messages were kept unspecific regarding to file extensions. Verified for 3.1 RC2 using build N20050607-0010 +JDT/Core HEAD. Verified for 3.1 RC2 using build I20050610-0010 |