Bug 413264 - Allow cancellation of long-running file-open operations
Summary: Allow cancellation of long-running file-open operations
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-18 11:46 EDT by Missing name CLA
Modified: 2013-07-23 14:33 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2013-07-18 11:46:10 EDT
Please consider adding a feature to allow cancellation or killing of long-running file-open operations.

Far too many times I've accidentally clicked on an SVG file or a compressed JS/CSS file in the Project Explorer/Resource pane, only to have Eclipse hang indefinitely as it tries to render millions of tiles for a file that was never meant to be manually edited.

In this dreadful case, I currently have only two options:
1. Wait an hour for Eclipse to consume all my memory, causing disk swapping and eventually my entire OS to crash.
2. Quickly open a terminal and kill Eclipse, re-launch Eclipse, and then wait an hour for Eclipse to rebuild itself.

Either way, a simple mistake has cost me a considerable amount of time. Some sort of button, similar to the "cancel" button in the Tasks panel, that would cancel the ongoing file-open operation, would be immensely useful.
Comment 1 Paul Webster CLA 2013-07-22 14:40:12 EDT
It's the opening editor that is reading the large file.  They basically have an InputStream they've extracted from their IFile.

They would have to implement some kind of cancel-able support.  What editor opens the SVG files?

PW
Comment 2 Missing name CLA 2013-07-22 15:42:16 EDT
I think most XML editors include SVG in their file associations. In my case, I'm using the Colorer XML Editor.
Comment 3 Paul Webster CLA 2013-07-23 13:26:06 EDT
You'll need to open a bug (as appropriate) for the Colorer editor then, to see if they can address cancelling of loading of a large file.

PW
Comment 4 Missing name CLA 2013-07-23 14:20:07 EDT
As this issue potentially effects every single editor, it doesn't really seem practical to open bug reports/feature requests for each editor. Eclipse has no way to wrap the open file request in some handler the way it does for most other tasks?
Comment 5 Paul Webster CLA 2013-07-23 14:33:56 EDT
The API involved here is the simple java io InputStream (and probably attendant wrapper streams).  That's not really progress-with-cancel material.

After identifying the file path object, eclipse leaves it up to each editor to load it's own information.  So we're left with opening a bug per editor.

PW