TMF must open several "trace" types, some of which are stored in directories 
and others as almost arbitrary text files. Thus, it does not fit too well with 
the usual file open dialog pattern. Yet, we often feel that TMF does not just 
open the file as it should... Here is a proposed "algorithm" to open files. 
Comments / use cases welcome. 

We start from a directory containing files and possibly sub-directories. Each 
will be passed to the "filters" registered by the different file handlers (e.g. 
CTF file handler, Text file handler...). 

The filter can return one of the following: 

- This is a file type I handle, allow it to be opened, place this icon to 
represent it. 
- This is a "trace" directory type I handle, it contains a single trace, allow 
it to be opened just as a trace file, place this icon to represent it. 
- This is a "trace" directory type I handle, it contains several traces, allow 
it to be opened as a "traceset" or to be stepped into, place this icon to 
represent it. 
- This is an unknown type, it may be a trace, allow it to be opened . 
- This is a known type that should not be allowed to be opened, gray it 

With the dialog showing the files and directories along with the associated 
icons, the following actions are available: 

- double click to open a file, a directory containing a single trace, or to 
descend into a directory. 
- click on a file to select it. 
- shift click on a file to add to the selection 
- click on open button to open the selected files 
- click on the open button to open all traces in the selected trace directory 
- click on open button to descend in the selected normal directory 
- click on cancel to not open anything 
- should we have a button to select all traces in the current directory? 
_______________________________________________
linuxtools-dev mailing list
linuxtools-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/linuxtools-dev

Reply via email to