feature: suggest create local variable outside block

I wished to have this more than twice, so it's time for
a feature request ;)

I would like to have the intention "create local variable"
to ask me WHERE I want to create the local variable: directly before the current statement, or before the enclosing block (and also upwards the block structure).

e.g.:
you have a for loop with an if statement inside:
for (int i=0;i<10;i++)
{
if (i<5)
{
createThisForMe.add(new Integer(i));
}
}

assume I want to create a Vector for the yet unknown
"createThisForMe".

Here is where the feature request comes:
I want the Vector variable to be declared outside the
for statement.
So the "create local variable"-intention should just offer:
create local variable -> before: if (i<5)
-> before: for (int i;...


1 comment
Comment actions Permalink

I wished that several times!

Franklin.

Michael Damberger wrote:

I wished to have this more than twice, so it's time for
a feature request ;)

I would like to have the intention "create local variable"
to ask me WHERE I want to create the local variable: directly before the current statement, or before the enclosing block (and also upwards the block structure).

e.g.:
you have a for loop with an if statement inside:
for (int i=0;i<10;i++)
{
if (i<5)
{
createThisForMe.add(new Integer(i));
}
}

assume I want to create a Vector for the yet unknown
"createThisForMe".

Here is where the feature request comes:
I want the Vector variable to be declared outside the
for statement.
So the "create local variable"-intention should just offer:
create local variable -> before: if (i<5)
-> before: for (int i;...

0

Please sign in to leave a comment.