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 92506 - Auto initialization for created local variables
Summary: Auto initialization for created local variables
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-15 05:56 UTC by belur_1d
Modified: 2013-09-02 14:24 UTC (History)
0 users

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 belur_1d 2007-01-15 05:56:18 UTC
Hi

Is it possible for nb to assign default value for local variable created
by netbeans .

For example:

public void run(){

int y=y1;
}
nb prompts for creation of y1 in 3 ways.
user clicks on local variable in run
Varible is created but not set with some value.

I know that nb will again suggest the user
with light bulb for setting the value, but if nb
can do it while creating the variable it will be nice.

Also i would suggest one more thing here...

Lets say the user does not want default value and wud want
to set the value to something...
Then
1> nb can still create the variable as per this request with default value
2> nb can then show a message somewhere in the bottom that such and such a 
variable was created with this value.
3> If the user feels that parameter shud have a different default value
then he can go and change it...

-Swaroop Belur