Kill Eclipse background operation without killing Eclipse
I was able to stop/terminate the hanging SVN commit process by briefly disconnecting the network adapter. This saved me from killing the Eclipse process, which if not terminated gracefully is known to cause other headaches.
I was able to unstuck Eclipse (it was stuck on a large file diff) using the following steps.
- Preparations: I always start Eclipse with the eclipse-console: Add start parameter -console in eclipse.ini (first line)
- The console always remains responsive even when the eclipse UI freezes
- I found the following commands in the console: help threads
- List all threads: threads
- Stop a thread: threads stop THREAD-NAME
UPDATE: I found out, that usually the "main" thread causes the freezing. Thus the solution is:
Type this in the eclipse console:
threads stop main
This will trigger/throw an Exception in that thread, effectively interrupting what it was doing (being stuck).
This might cause other side-effects (depending on what action was interrupted and where), but i had no problems with it so far.
Killing the task from the Progress window (Window->Show View->Other|General->Progress or Alt+Shift+Q, Q | General->Progress).
Then choose the offending thread and click the red square.
Note it sometimes takes a delay before the kill occur, you may also have to kill other thread in there to get what you want. Lastly it does not always work, if this fails I usually just restart eclipse.
Hope this helps