I’ve been looking for the Eclipse JDT refactoring tool which allows me to quickly change
if (...) {
Object x = blablabla;
}
to
Object x;
if (...) {
x = blablabla;
}
// insert code using x here
But I can’t find it. Does something like that exist?
No.
But, you can use the “Split Variable Declaration” refactoring (CTRL+1 on the declaration gets you a list of possible refactoring options) and than relocate the declaration yourself using Cut/Paste or drag&drop.