Bug 104877 - [1.5] TypeDeclarationStatement should use DECLARATION_PROPERTY in JLS3 API
Summary: [1.5] TypeDeclarationStatement should use DECLARATION_PROPERTY in JLS3 API
Status: VERIFIED FIXED
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.2 M1   Edit
Assignee: Jim des Rivieres CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-22 16:00 EDT by Markus Keller CLA
Modified: 2005-08-09 11:06 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 Markus Keller CLA 2005-07-22 16:00:34 EDT
N20050722-0010

The "declaration" property of a TypeDeclarationStatement has the wrong
getLocationInParent() in JLS3 API.
Expected: DECLARATION_PROPERTY
Is: TYPE_DECLARATION_PROPERTY

This manifests e.g. in the ASTView's inability to focus on a local type:
- have this class in a 5.0 project (JLS3 AST):
class Outer {
	void m() {
		class Local {}
	}
}

- select 'Local'
- open ASTView and press F5
-> tree doesn't expand to selection (since it compares getLocationInParent())
Comment 1 Jim des Rivieres CLA 2005-07-23 14:04:26 EDT
Fixed in builds > N20050723. Improved tests; updated build notes.
Comment 2 Olivier Thomann CLA 2005-08-09 10:50:56 EDT
F5 doesn't work, but debugging the code seems to show the right location.
Verified in 3.2M1 (I20050808-2000)
Comment 3 Markus Keller CLA 2005-08-09 11:06:41 EDT
Works for me too. F5 should be bound to the retargetable 'Refresh' action by
default and execute 'Show AST of active editor' in the ASTView. However, this
may not work if you're in a debugging session and debug has stolen F5 for 'Step
Into'.