| Summary: | [implementation] Use ASTProvider.SHARED_AST_LEVEL instead of AST.JLS3 where it makes sense | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> | ||||
| Component: | UI | Assignee: | Markus Keller <markus.kell.r> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | daniel_megert, deepakazad, markus.kell.r, Olivier_Thomann, raksha.vasisht | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | 3.7 M7 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Fixed in HEAD. FYI: I've tagged BETA_JAVA7 of jdt.ui with v20110318-1550_BETA_JAVA7 and then I've thrown the switch in ASTProvider#SHARED_AST_LEVEL to use AST.JLS4.
New rules:
Normal jdt.ui code that just needs the latest AST level should always use ASTProvider.SHARED_AST_LEVEL.
Only backwards-compatibility code should refer to AST.JLS* (e.g. in case you need to check the level because you got the AST via an API and you need to test whether new JLS4 constructs are available or not). Such checks will usually use a lower bound, e.g. if (node.getAST().apiLevel() >= AST.JLS4) {...}.
|
Created attachment 191542 [details] Fix HEAD Use ASTProvider.SHARED_AST_LEVEL instead of AST.JLS3 where it makes sense. The patch is based on Deepaks initial patch to use JLS4 in the BETA_JAVA7 branch, but it also includes test projects and is against HEAD.