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 7121 - Dull behaviour of Wizard of new from template causes loss of just dessigned class
Summary: Dull behaviour of Wizard of new from template causes loss of just dessigned c...
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P3 enhancement (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-07-20 11:02 UTC by dmladek
Modified: 2007-09-26 09:14 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dmladek 2000-07-20 11:02:02 UTC
BOSTON Build 1061 (but it's from beggining of implementation of this wizard)
=======================
I'm net experinced developer, so I do probably mistake myself.But There is
still something wrong.
I'radher describe it on example.
=====================
New from Template
Classes/Applet
1.screen "Customize supperclass..."->Next
2."Override..."
   There is probably BUG. It offers me to select inherited classes.
   so I like to select Applet('cause I'm doing Applet now).
   and I also know Applet's got a void method init(), so I like want to add
   just this one.
   Probably it shouldn't me offer this one (and maybe others) 'cause Applet
   template putst by default init()method to automaticaly generated code.
3.screen "Add new.."->Next
4."Add or customize..." There I can select the init()method and adjust it,
   like add Method's Parameters, but by my knowledge of Java than this method
   won't be overriden but it'll be new diference method, so I don't do there
   anything.Just press FINISH
This will open Error dialog "A method named init already exist in the class
MujApplet1" OK?
which causes loss of your just designed class if I press OK button.(Nothing
happens, no class is created, no move me back to wizard to have change to
correct this...

Maybe as I previously mentioned I could do something strange and wrong.
But This wizard should put me back to its dialogs to give me a change to repair
things, not to f...me out.
Comment 1 Jesse Glick 2000-07-20 12:07:59 UTC
Why was this assigned to apisupport? Looks like a Java new-class-wizard bug.
Comment 2 Svata Dedic 2000-07-20 12:22:59 UTC
Well, the Applet template (and the Form ones too) impose some additional
restrictions or features on the Wizard:
- some methods can't be created or removed
- some methods can't be customized entirely, the user might e.g. change
modifiers. Some methods can't be ever customized (initComponents)
- some attributes can't be changed (e.g. inheritance in Form objects).
- some of the code can't be modified (the template can contain guarded blocks)
The Wizard doesn't currently support such restrictions - it will in the future.
The restrictions can be then specified for each template individually.

I agree that the user should not lose all his work if he does something bad.
I'll correct the behavious so the offending change will be ignored and the IDE
will display a warning message about what happened.
Comment 3 Svata Dedic 2001-03-23 14:43:20 UTC
Fixed in new impl. of NFT wizard.
Comment 4 dmladek 2001-04-03 15:27:14 UTC
Big improvement has been done:,)
Thanks
Comment 5 Quality Engineering 2003-07-01 13:18:08 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.