Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-ui-dev] released inline temp refactoring + tests for in

i released the inline temp refactoring and unit tests for it
to activate - select a temp (declaration or a reference) and choose 'inline
local variable' from the global refactor menu.

it does not check if the expression that is used to initialize the temp has
any side effects so it can be not-behavior preserving if you tell it to do
sth silly.

works only for initialized temps (i.e. the temp must be initialized when
it's declared)

limitations:
. it put brackets around the inlined accesses more often than needed.
(brackets are needed for cases like:
int i= 2 +0; //inline
int j= i * i;
)

currently, it puts brackets if the temp is initialized with ath else than a
message send or a literal

a.



Back to the top