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
It seems to (sort of) work in Helios (3.6). It doesn't put the semi-colon at all.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With