History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-31013
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Dmitry Jemerov
Reporter: Serge Baranov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

descendantClassesEnum macro includes only JDK enum classes in result list

Created: 03 Oct 08 21:11   Updated: 07 Oct 08 21:46
Component/s: Editor. Code Completion
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,757
Severity: Medium


 Description  « Hide
Support feedback:

I have a variable (actually it's a field) that I use for listing the columns in a CSV file that I'm parsing. I want to pull strings out of the line by enum ordinal rather than integer. For example,

fieldArray[fields.id.ordinal]

instead of

fieldArray[1]

I do this alot so I want to define a live template $enumclass$.$enum$.ordinal() and have idea give me a choice of enumerated types for $enumclass$ and a list of the enums for $enum$.

I can't get IDEA to suggest the enum class.



 All   Comments   Work Log   Change History      Sort Order:
Dmitry Jemerov - 07 Oct 08 21:22
The correct way to get a list of all enum classes in a live template macro is:
descendantClassesEnum("java.lang.Enum")

Dmitry Jemerov - 07 Oct 08 21:36
...only it doesn't work in IDEA 8.