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 235385

Summary: Template wizard invokes node action twice
Product: platform Reporter: Alexander Simon <alexvsimon>
Component: Data SystemsAssignee: Jaroslav Havlin <jhavlin>
Status: NEW ---    
Severity: normal    
Priority: P4    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 235317    
Attachments: Stack trace

Description Alexander Simon 2013-09-02 08:02:51 UTC
Created attachment 139561 [details]
Stack trace

Steps to rteproduse:
- create new file->Other->Empty file
- Next
- Type file name "test.txt"
- Finish

Default node cation is called twice
- TemplateWizard.instantiate() line 924
- ProjectUtilities.openAndSelectNewObject() line 288
Comment 1 Alexander Simon 2013-09-02 08:05:16 UTC
typo: rteproduse->reproduce, cation->action
Comment 2 Jaroslav Havlin 2013-09-02 09:55:39 UTC
Fixing this would be quite difficult, as both methods should invoke
the default action:

TemplateWizard is part of the API, so removing invocation of the default action
would be backward incompatible.

Custom TemplateWizard.Iterator instances are not required to invoke the default
action, so if the invocation is removed from ProjectUtilities, it would be
again backward incompatible change.

This behavior is in NetBeans for 9 years, so I'm quite afraid to change it.

Could you workaround the issue on your side?
Thank you.
Comment 3 Alexander Simon 2013-09-02 11:04:37 UTC
(In reply to Jaroslav Havlin from comment #2)
> Could you workaround the issue on your side?
I did.
Comment 4 Jaroslav Havlin 2013-09-02 11:28:25 UTC
(In reply to Alexander Simon from comment #3)
> > Could you workaround the issue on your side?
> I did.
Thank you very much.

I'm decreasing the priority, as the bug is quite harmless in most cases,
and fixing it is complicated.