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.
type `class Aaaaaaaaaaaa`, next open code completion. start deleting characters using backspace. on code completion will appear names like: "Aaaaaa" "Aaaaaaa" "Aaaaaaaa" "Aaaaaaaaa" "Aaaaaaaaa" "Aaaaaaaaaa" "Aaaaaaaaaaa" this items will stay in code completion even if you delete this line complicity. only way to remove it (except reparsing whole project) is create class with exactly name and delete it.
I cannot reproduce the bug. My steps: - create C/C++ application with C++ main file. - type class Aaaaaaaaaaaa` in main method, before main method. Completion works right (there is no series of Aaaa... in the list)
(In reply to Alexander Simon from comment #1) > I cannot reproduce the bug. > My steps: > - create C/C++ application with C++ main file. > - type class Aaaaaaaaaaaa` in main method, before main method. > Completion works right (there is no series of Aaaa... in the list) I can reproduce this bug. Cause is... `return` keyword :D --->%--->%--->%--- class ffffff //edit there int main(int argc, char** argv) //errors: unable to resolve `main`, unexpected `int` { // return 0; //comment is required! } --->%--->%--->%--- When you start typing new class you cant add `{}` to fix it.
(In reply to Yankes from comment #2) > (In reply to Alexander Simon from comment #1) > > I cannot reproduce the bug. > > My steps: > > - create C/C++ application with C++ main file. > > - type class Aaaaaaaaaaaa` in main method, before main method. > > Completion works right (there is no series of Aaaa... in the list) > > I can reproduce this bug. Cause is... `return` keyword :D > > --->%--->%--->%--- > > class ffffff //edit there > > int main(int argc, char** argv) //errors: unable to resolve `main`, > unexpected `int` > { > > // return 0; //comment is required! > } > --->%--->%--->%--- > > When you start typing new class you cant add `{}` to fix it. Thanks for test. Problem conformed. This is a dump of code model with "trash" class forward declarations: ========== Dumping model of PROJECT CppApplication_1 CLASS ff (ff ) [2:1/1-2:12/12] lcurly=10 SCOPE: $Global$ BASE CLASSES: MEMBERS: CLASS fff (fff ) [2:1/1-2:10/10] lcurly=9 SCOPE: $Global$ BASE CLASSES: MEMBERS: CLASS ffff (ffff ) [2:1/1-2:11/11] lcurly=10 SCOPE: $Global$ BASE CLASSES: MEMBERS: CLASS fffff (fffff ) [2:1/1-2:12/12] lcurly=11 SCOPE: $Global$ BASE CLASSES: MEMBERS: CLASS ffffff (ffffff ) [2:1/1-2:13/13] lcurly=12 SCOPE: $Global$ BASE CLASSES: MEMBERS: CLASS fffffff (fffffff ) [2:1/1-2:14/14] lcurly=13 SCOPE: $Global$ BASE CLASSES: MEMBERS: CLASS ffffffff (ffffffff ) [2:1/1-2:15/15] lcurly=14 SCOPE: $Global$ BASE CLASSES: MEMBERS: CLASS fffffffff (fffffffff ) [2:1/1-2:16/16] lcurly=15 SCOPE: $Global$ BASE CLASSES: MEMBERS: CLASS ffffffffff (ffffffffff ) [2:1/1-2:17/17] lcurly=16 SCOPE: $Global$ BASE CLASSES: MEMBERS: CLASS fffffffffff (fffffffffff ) [2:1/1-2:18/18] lcurly=17 SCOPE: $Global$ BASE CLASSES: MEMBERS: CLASS ffffffffffff (ffffffffffff ) [2:1/1-2:19/19] lcurly=18 SCOPE: $Global$ BASE CLASSES: MEMBERS: CLASS fffffffffffff (fffffffffffff ) [2:1/1-2:20/20] lcurly=19 SCOPE: $Global$ BASE CLASSES: MEMBERS: CLASS ffffffffffffff (ffffffffffffff ) [2:1/1-2:21/21] lcurly=20 SCOPE: FUNCTION DEFINITION main [4:1/27-8:2/155] FunctionDDImpl SCOPE: $Global$ SIGNATURE main(int,char**) UNIQUE NAME f:main(int,char**) DECLARATION: main [4:1/27-8:2/155] PARAMETERS: argc [4:10/36-4:18/44] TYPE: int TEXT=int [4:10/36-4:13/39] INIT: null SCOPE: main argv [4:20/46-4:31/57] TYPE: **char TEXT=char** [4:20/46-4:26/52] INIT: null SCOPE: main RETURNS int TEXT=int [4:1/27-4:4/30] STATEMENT COMPOUND [5:1/112-8:2/155] SCOPE: main **********************
(In reply to Yankes from comment #2) > When you start typing new class you cant add `{}` to fix it. There is a nice workaround for you: instead of ------ class fff ------- type ----- cls ---- and then just press Tab. If you'd like to personalize what is inserted, go to Tools->Options->Editor->Code Templates tab and choose C/C++ language then modify "cls" and "clss" templates