Bug 90578 - semicolon not inserted (3.1M6)
Summary: semicolon not inserted (3.1M6)
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1   Edit
Hardware: Sun Solaris-Motif
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2005-04-07 04:26 EDT by arne anka CLA
Modified: 2007-06-22 10:04 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description arne anka CLA 2005-04-07 04:26:11 EDT
the semicolon is not inserted anymore.
at least if typing something, like,
String s=new String()
i expect an automatically inserted ";" after the closing parentheses.
before, in 3.0.1 the semicolon used to jump around annoyingly f ex if implementing an anonymous inner 
class, say, an ActionListener. inserting ";" after "})" the ";" always jumped between brace and 
parenthesis, but now it's gone completely.
in Java->Editor->Typing i checked in "automatically close" everything but "Strings" and in "automatically 
insert at correct position" everything.
Comment 1 Dani Megert CLA 2005-04-08 07:23:51 EDT
This would be wrong since a '.' might be the right choice too:
String s=new String().<method goes here>
Comment 2 arne anka CLA 2005-04-08 07:52:03 EDT
nope.
String s=new String();<nothing/linebreak goes here>
at least after a linebreak after ")" a semicolon should be inserted.
btw, i just noticed the semicolon jumping around -- writing a try-catch-construct on _one_ line:
try{amethod()}catch(){...}
inserting ";" after amethod() the ; jumpes to catch...}_;_. backspace sets it back to another()_;_.
as this is repeatable i think, it's on purpose.
however, the only effect of "insert semicolon" i observe is that annoyingly jumping but no automatically 
inserted semicolon after a method-call as f ex
doMyStuff(myParm)_;_
Comment 3 Dani Megert CLA 2005-04-08 08:17:34 EDT
new String()
      .<method here>

is valid Java code.

Please file separate bug reports for other problems instead of adding them to
another bug.
Comment 4 arne anka CLA 2005-04-08 08:26:18 EDT
as _i_ opened the bug, _i_ may know what the bug means.
_you_ did misunderstand the bugreport and closed it overhasty.
of course is new String().... valid java code -- but i presumed anybody paying attention should read the 
code-example _and_ the message, instead of _only_ the code and react.
i wrote explicitely
String s=new String();
to make clearly i'm speaking about a _completed_ definition, not a maybe growing line of code.
if you think it's a wontfix provide a usable rationale.
Comment 5 Dani Megert CLA 2005-04-08 08:31:41 EDT
Please provide a step by step example of what you really mean.

In comment 4 you write:
>i wrote explicitely
>String s=new String();

However comment 0 reads:
>String s=new String()

Please do not reopen again until more details are provided.
Comment 6 arne anka CLA 2005-04-08 08:57:48 EDT
exactly what i said: you're still misunderstanding (yes, i know, in comment 4 i wrote "did misunderstand")
.
what kind of information do you want?
do the configuration given comment 1 and type the text given in comment 1 -- the problem should be 
clear.
to make it easy: 
when is a semicolon inserted automatically? 
what effect does "insert automatically at correct position: [x] semicolons" have?
Comment 7 Dani Megert CLA 2005-04-11 08:56:10 EDT
The preference does not insert the ';' automatically but places it at the right
location once you press ';'
Comment 8 arne anka CLA 2005-04-11 09:19:29 EDT
well, i think the description could be more informative (a tooltip?).
seems to me a pretty useless preference but anyway, somebody may like it.
if there's a smart solution possible, ok. else remove the "remind".
Comment 9 Dani Megert CLA 2005-04-11 10:43:37 EDT
.
Comment 10 Dani Megert CLA 2007-06-22 09:59:20 EDT
Get rid of deprecated state.
Comment 11 Dani Megert CLA 2007-06-22 10:04:35 EDT
.