~ubuntu-branches/ubuntu/wily/eclipse-linuxtools/wily

« back to all changes in this revision

Viewing changes to systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/treeviewer/StapTreeDoubleClickListener.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam, Jakub Adam, tony mancill
  • Date: 2014-10-11 11:44:05 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20141011114405-yazjvxfzzhmi5sgj
Tags: 3.1.0-1
[ Jakub Adam ]
* New upstream release (Closes: #761524).
* Refreshed d/patches.
* Don't build removed feature org.eclipse.linuxtools.tools.launch
  - merged into org.eclipse.linuxtools.profiling.
* Use javac target 1.7.
* Build new feature org.eclipse.linuxtools.dataviewers.feature
  - required by Valgrind integration.
* Build-depend on eclipse-remote-services-api and eclipse-cdt-autotools.
* Bump Standards-Version to 3.9.6.
* Override incompatible-java-bytecode-format - linuxtools needs Java 7.
* Remove unused codeless-jar override.

[ tony mancill ]
* Tweak short package description to make lintian happy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
public class StapTreeDoubleClickListener implements IDoubleClickListener {
23
23
 
24
 
        private StapGraph graph;
25
 
        private TreeViewer viewer;
26
 
 
27
 
        public StapTreeDoubleClickListener(TreeViewer t , StapGraph g) {
28
 
                this.graph  = g;
29
 
                this.viewer = t;
30
 
        }
31
 
 
32
 
        @Override
33
 
        public void doubleClick(DoubleClickEvent event) {
34
 
                if (!(event.getSelection() instanceof IStructuredSelection)) {
35
 
                        return;
36
 
                }
37
 
                IStructuredSelection selection = (IStructuredSelection) event.getSelection();
38
 
                if (selection.size() != 1) {
39
 
                        return;
40
 
                }
41
 
 
42
 
 
43
 
                //Expand the current node in the tree viewer and on the graph
 
24
    private StapGraph graph;
 
25
    private TreeViewer viewer;
 
26
 
 
27
    public StapTreeDoubleClickListener(TreeViewer t , StapGraph g) {
 
28
        this.graph  = g;
 
29
        this.viewer = t;
 
30
    }
 
31
 
 
32
    @Override
 
33
    public void doubleClick(DoubleClickEvent event) {
 
34
        if (!(event.getSelection() instanceof IStructuredSelection)) {
 
35
            return;
 
36
        }
 
37
        IStructuredSelection selection = (IStructuredSelection) event.getSelection();
 
38
        if (selection.size() != 1) {
 
39
            return;
 
40
        }
 
41
 
 
42
 
 
43
        //Expand the current node in the tree viewer and on the graph
44
44
        for (Iterator<?> iterator = selection.iterator(); iterator.hasNext();) {
45
 
                StapData data = (StapData) iterator.next();
46
 
                viewer.collapseToLevel(data, 1);
47
 
                viewer.expandToLevel(data, 1);
48
 
                graph.setCollapseMode(true);
49
 
                graph.draw(data.id);
50
 
                graph.getNode(data.id).unhighlight();
 
45
            StapData data = (StapData) iterator.next();
 
46
            viewer.collapseToLevel(data, 1);
 
47
            viewer.expandToLevel(data, 1);
 
48
            graph.setCollapseMode(true);
 
49
            graph.draw(data.id);
 
50
            graph.getNode(data.id).unhighlight();
51
51
        }
52
52
 
53
53
        graph.setFocus();
54
 
        }
 
54
    }
55
55
 
56
56
}