Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » enums in M3
enums in M3 [message #184610] Sat, 06 November 2004 12:34 Go to next message
Eclipse UserFriend
Hi, I installed M3 in order to try the new enum support. I already had a
project using enums, and used to build it with Ant, and it compiles
fine. But I did not see any improvement in enum support since M2:
1. In a file that refers an enumeration, I cannot Ctrl+click the
enumeration class to go to its definition. I can, however, Ctrl+click on
an enum constant to go to its definition. For instance, EventType being
an enumeration, and having the following statement in another file:
EventType theEventType = EventType.CONSTRUCTOR_ENTER;
I can ctrl+click on CONSTRUCTOR_ENTER but not on EventType.

2. Switch statement doesn't seem to support enums:
switch (theEventType)
{
case CONSTRUCTOR_ENTER:
//...
}

CONSTRUCTOR_ENTER has the red squiggle, and the error says:
CONSTRUCTOR_ENTER cannot be resolved.

3. Also, abstract methods in enumeration classes are not supported.

I'm not that surprised that the third point is not supported (although
it is not clear from the News and Noteworthy page what is supported or
not), but I am a bit puzzled by the second item, because in the same
News and Noteworthy page there is a screenshot of a switch statement
using an enum (in the "Searching enums, varargs and static imports" item).
Is there something special to do to enable enum support?

Guillaume
Re: enums in M3 [message #184620 is a reply to message #184610] Sat, 06 November 2004 13:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: olivier_thomannNOSPAM.ca.ibm.com

Guillaume Pothier a écrit :
> 2. Switch statement doesn't seem to support enums:
> switch (theEventType)
> {
> case CONSTRUCTOR_ENTER:
> //...
> }
This is the following bug.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=77430
You might find different workarounds till it is fixed.
--
Olivier
Re: enums in M3 [message #184656 is a reply to message #184610] Mon, 08 November 2004 04:07 Go to previous message
Eclipse UserFriend
Guillaume Pothier wrote:
[..]
> 1. In a file that refers an enumeration, I cannot Ctrl+click the
> enumeration class to go to its definition. I can, however, Ctrl+click on
> an enum constant to go to its definition. For instance, EventType being
> an enumeration, and having the following statement in another file:
> EventType theEventType = EventType.CONSTRUCTOR_ENTER;
> I can ctrl+click on CONSTRUCTOR_ENTER but not on EventType.
[..]

This is https://bugs.eclipse.org/bugs/show_bug.cgi?id=77184 .

Markus
Previous Topic:Finding The Start Of Program Flow
Next Topic:help: how get in editor cursor beyond end of line?
Goto Forum:
  


Current Time: Sun Jun 08 08:14:08 EDT 2025

Powered by FUDForum. Page generated in 0.04073 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top