> 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.

The TMF hack-a-thon yesterday was very interesting. Around 18 persons 
participated from Ericsson, EfficiOS, Google, Polytechnique and Concordia 
University. Various topics were discussed (some at high level, others at very 
detailed level) and worked on. Topics included state history tree and control 
flow view drawing optimizations, remote control, new views, statistics, 
critical path analysis, drawing the control flow view before the state history 
was fully computed. We may hear about some of these in separate messages. 

On the "Open" dialog topic, it was a good opportunity to better see the 
objectives, constraints and current status. 

Trace files are not easily identified. Text file "logs" do not have a special 
extension or magic number; you know it is one when the regular expressions 
match. You have almost no other choice than let the user select any file and 
tell you the type. CTF traces come as one or several traces in a hierarchy of 
directories with the leaf directories containing one trace (one metadata file, 
one index subdirectory and several channel files). A typical case is to have a 
session directory with one kernel trace and one or more ust traces. However, 
you can have a collection of traces, consisting of many session directories, 
and this recursively. You are in a trace collection when there are only 
subdirectories until you arrive at the last level and there is a metadata file. 

My proposal needed some smart at each level: in the presence of a CTF trace 
collection, put an icon and allow to either select the subdirectory and open it 
with the button (open the collection), or descend into the subdirectory to 
select a trace in the collection by double clicking. This does not appear to be 
available with the Eclipse file dialogs, since they rely on the platform 
specific dialogs. It explains the current setup in the TMF rich client platform 
(RCP) with the possibly confusing "open file" versus "open directory". 

If any of you knows a way to get proper hooks in the Eclipse file dialog which 
would allow to specify the files to show, show with an icon, allow to open or 
to descend into... this would provide a good solution. Otherwise, we need to 
either rework the menu to make the common case more straightforward (with 
possibly different audiences with different common cases), or to implement a 
trace open dialog which is not a standard file open dialog. 
_______________________________________________
linuxtools-dev mailing list
linuxtools-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/linuxtools-dev

Reply via email to