Bug 114314 - Eclipse "crashes" when accessing auto-content on enum variable
Summary: Eclipse "crashes" when accessing auto-content on enum variable
Status: RESOLVED DUPLICATE of bug 107580
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-30 09:03 EST by Marco Massenzio CLA
Modified: 2005-10-30 21:42 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Massenzio CLA 2005-10-30 09:03:45 EST
I have reproduced the following on both Linux and Win2k installation of Eclipse 3.1

When entering the following code (or similar) Eclipst tries to access the
context content help if one enters a 'dot' after an enum variable (eg, after
MyEnumVar) and never 'comes back' - one chan hear it accessing the hard disk
continuously but no amount of waiting will do.  The only resort is to 'kill'
Eclipse and restard.

Although I am aware this is not intended and only the result of mis-typing, it
should not cause such a dramatic failure (especially as the ',' key - a natural
thing to enter in a list of enums - is just next to the '.' key - a not so
natural thing to type, admittedly) and might cause a significant amount of
typing to go to waste.

I have a feeling this is due to nested recursive calls when trying to resolve types.

Code example:

public enum MyEnum {
  MyEnumVar("myvar"),
// enter dot here -^  
  AnotherEnumVar("anothervar");

  private MyEnum(String s) {
    this.value = new String(s);
  }
  private final String value;

  public String value() { return s; }
}

the code otherwise compiles and works.
Comment 1 Marco Massenzio CLA 2005-10-30 09:06:34 EST
Just re-looked at the code - I realise that it should have been:

public String value() { return value; }

not that it makes any difference anyway.

M
Comment 2 Olivier Thomann CLA 2005-10-30 21:42:01 EST
Closing as a dup of bug 107580.
Please reopen if you get it again with either 3.2M2.

*** This bug has been marked as a duplicate of 107580 ***