Mylyn Task Focus UI
You can uncheck "Window -> Preferences -> Mylyn -> Context -> Auto expand tree views when focused", this may help to some extend.
I don't generally need the structure inside the Java file, so I just disable that in the Package Explorer completely. To do that:
- go to the View menu (the little triangle)
- choose "Filters"
- check "Java Members"
Unfortunately, this doesn't work in Project Explorer.