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 - Template wizard invokes node action twice
Summary: Template wizard invokes node action twice
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 7.4
Hardware: All All
: P4 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
Depends on:
Blocks: 235317
  Show dependency tree
 
Reported: 2013-09-02 08:02 UTC by Alexander Simon
Modified: 2013-09-02 11:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace (41.95 KB, text/plain)
2013-09-02 08:02 UTC, Alexander Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
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.