Bug 59788 - [DOM/AST] rename AST.LEVEL_* constants
Summary: [DOM/AST] rename AST.LEVEL_* constants
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Jim des Rivieres CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 59849 59972
Blocks:
  Show dependency tree
 
Reported: 2004-04-23 10:42 EDT by Jim des Rivieres CLA
Modified: 2004-05-19 13:19 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim des Rivieres CLA 2004-04-23 10:42:23 EDT
/**
 * Constant for indicating the AST 2.0 API (handles
 * JLS2). The 2.0 API is capable of handling all constructs
 * in the Java language as described in the Java Language
 * Specification, Second Edition (JLS2).
 * JLS2 is a superset of all earlier versions of the
 * Java language, and the 2.0 API can be used to manipulate
 * programs written in all versions of the Java language
 * up to and including J2SE 1.4.
 *
 * @since 3.0
 */
public static final int LEVEL_2_0 = 2;
	
/**
 * Constant for indicating the AST 3.0 API (handles JLS3).
 * The 3.0 API is capable of handling all constructs in the
 * Java language as described in the Java Language
 * Specification, Third Edition (JLS3).
 * JLS3 is a superset of all earlier versions of the
 * Java language, and the 3.0 API can be used to manipulate
 * programs written in all versions of the Java language
 * up to and including J2SE 1.5.
 * <p>
 * <b>NOTE:</b>In Eclipse 3.0, there is no underlying parser support for
 * level 3 ASTs. This support is planned for the follow-on release of
 * Eclipse which includes support for J2SE 1.5. Without a parser to create
 * level 3 ASTs, they are not much use. Use level 2 ASTs instead.
 * </p>
 *
 * @since 3.0
 */
public static final int LEVEL_3_0 = 3;

So right now it is intentionally ambiguous whether 3 means Eclipse 3.0
or JLS3. We should change the reading to JLS3 explicitly by renaming:
LEVEL_2_0 => JLS2
LEVEL_3_0 => JLS3
Comment 1 Jim des Rivieres CLA 2004-04-23 13:53:32 EDT
Changed released (to HEAD).

Leaving PR open until deprecated fields have been deleted (pre M9).
Comment 2 Jim des Rivieres CLA 2004-04-27 11:40:08 EDT
All references gone. Old constants deleted. Closing.
Comment 3 Frederic Fusier CLA 2004-05-19 07:01:29 EDT
Verified for 3.0 M9 with build I200405190010.
(deprecated constants were effectively removed).

Jeem, there's still a TODO task related to deprecation:
	// TODO (jeem) deprecated Clients should use the JLS3 API.
shouldn't it be also removed?
Comment 4 Jim des Rivieres CLA 2004-05-19 11:12:24 EDT
Those TODOs mark where we will deprecate in next release once J2SE 1.5 support 
has been completed. I will revise the wording to make this clearer.
Comment 5 Jim des Rivieres CLA 2004-05-19 13:19:23 EDT
Updated comments on TODOs. e.g.,
   // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated 
Clients should use the JLS3 API.