This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 197221 - autocomplete on line before assert puts semicolon after assert keyword
Summary: autocomplete on line before assert puts semicolon after assert keyword
Status: VERIFIED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-30 09:02 UTC by _ hair
Modified: 2011-04-06 07:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Bug197221.java (376 bytes, text/x-java)
2011-04-01 20:51 UTC, _ hair
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ hair 2011-03-30 09:02:50 UTC
Yesterday's build from main-golden.

Having the lines in the editor and the cursor at |


        static Log LOG = LogFactory.getLog(AdIdReduceTest.class);
        ...
        LOG.|
        assert 0 == someCondition() : "someCondition non zero";


Then choosing the autocompletion for the "debug(Object)" method results in the lines

        LOG.debug(object)
        assert; 0 == someCondition() : "someCondition non zero";


Notice the semicolon on the second line.

wtf?
Comment 1 Dusan Balek 2011-04-01 17:39:51 UTC
Unfortunately, I cannot reproduce the problem in the current dev build. Could you please create a simple test case and attach it to the issue? Thanks.
Comment 2 _ hair 2011-04-01 20:51:00 UTC
Created attachment 107436 [details]
Bug197221.java

Open the file in netbeans.
Autocomplete line 8 (it doesn't matter which method from the autocomplete list you choose).
Comment 3 _ hair 2011-04-01 20:55:08 UTC
(remove the second import statement. it crept in).
Comment 4 _ hair 2011-04-01 21:15:52 UTC
Updated main-golden and rebuilt. still reproducible.
Comment 5 Dusan Balek 2011-04-04 08:26:52 UTC
I've just tested your case and I'm still not able to reproduce. Could you please make sure, that your build contains the following changeset: http://hg.netbeans.org/main/rev/0a374763a147 ?
Also, could you please download the latest dev build form http://bits.netbeans.org/dev/nightly/ ant test it using that build? Thanks.
Comment 6 _ hair 2011-04-04 15:31:26 UTC
dev nightly does not reproduce the problem.

The main-golden sources i'm building from does include that changeset so i have no suggestion why my main-golden fails but the nightly dev is ok.
Any ideas?

I used both with the same userdir.
Comment 7 Dusan Balek 2011-04-05 11:34:38 UTC
I have no idea what's wrong with your build. Did you perform full clean-build or did you perform some incremental building sequence? Also, have you tried to clean caches inside your NB userdir (or to start NB with the new userdir)?
Anyway, since the dev build works correctly - closing as WORKSFORME.
Comment 8 _ hair 2011-04-05 11:45:40 UTC
my builds are done with

# initial
hg clone http://hg.netbeans.org/main-golden
cd main-golden
ant build-nozip

# next time
hg pull
hg update -C
ant clean-untracked-files clean build-nozip


Is there anything wrong there?
Comment 9 _ hair 2011-04-05 13:30:42 UTC
`rm -fR var/*` didn't help.
Comment 10 Dusan Balek 2011-04-05 14:49:57 UTC
I've just tried

hg clone http://hg.netbeans.org/main-golden
cd main-golden
ant build-nozip

and it works for me. Really don't know what is wrong with your build.
Comment 11 _ hair 2011-04-05 16:44:52 UTC
Ok. there was a file sticking in the "final" netbeans install directory.
removing it fixed the problem. thanks for being persistent Dusan.
Comment 12 _ hair 2011-04-06 07:54:00 UTC
original issue was #177657