Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse 'Anonymous Inner Type' - autocomplete

Sometimes I tend using autocomplete from eclipse (3.5) for anonymous inner types. For some reason eclipse always puts ending-parenthesis and semicolon in wrong order. A small example:

button.addActionListener( new Act... ) // <-- Pressing Autocomplete (strg+space)

results in:

button.addActionListener( new ActionListener()
{

  @Override
  public void actionPerformed( ActionEvent e )
  {
    // TODO Auto-generated method stub

  }
};) // <-- why?

Didnt found that anywhere in codingtemplates of eclipse. I also cant yet switch to 3.6, eventhough I dont know, if that is "fixed" there already (if that is even supposed to be an error), since eclipse probably just dont know, that it has to use the parenthesis behind autocomplete. Guess handling that is kinda complicated, since he wont check what chars are behind autocomplete, and so he cant use the ending-parenthesis? Correct me, if I should be wrong.

Guess I just have a bad day (common mondays!), which is why it annyoys me right now, but maybe someone has an idea how to influence this behaviour?

Greets, ymene

like image 385
crusam Avatar asked Aug 30 '10 13:08

crusam


2 Answers

It seems to (sort of) work in Helios (3.6). It doesn't put the semi-colon at all.

like image 102
Skip Head Avatar answered Nov 01 '22 16:11

Skip Head


Guess I just have a bad day (common mondays!), which is why it annyoys me right now, but maybe someone has an idea how to influence this behaviour?

File a bug with Eclipse.

This behavior does bother me somewhat, but not to the extent of filing a bug about it.

like image 43
Alexander Pogrebnyak Avatar answered Nov 01 '22 15:11

Alexander Pogrebnyak