Bug 150393 - [model] API to get type kind of a CU or class file
Summary: [model] API to get type kind of a CU or class file
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2006-07-12 10:36 EDT by Martin Aeschlimann CLA
Modified: 2007-03-29 04:56 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 Martin Aeschlimann CLA 2006-07-12 10:36:13 EDT
3.2

The type kind indicator needs to know what kind the first type in a compilation unit or class file is:

- class
- abstract class
- interface
- annotation
- enum

As discussed at the JDT summit, a possibility is to offer that in API on CU or CF that can avoid the eager poulation of the model
Comment 1 Philipe Mulet CLA 2006-07-19 12:01:03 EDT
IJavaFile#getFirstTypeModifiers() would first peak at the Java model info cache, and if not available use searchAllTypeNames(...).
Comment 2 Frederic Fusier CLA 2006-10-27 06:16:36 EDT
Unfortunately, I had not enough time to implement this requirement for 3.3 M3.
Need to make decision for M4 if this bug will still stay in plan or not...
Comment 3 Martin Aeschlimann CLA 2006-11-14 10:10:00 EST
Discussed on the call: No need for new API at the moment: I implemented the suggested improvement directly in the decorator. Unless I find a second usecase for this, we can set this bug to CLOSED