~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/model/AbstractTreeElement.java

  • Committer: Package Import Robot
  • Author(s): tony mancill
  • Date: 2013-05-13 21:43:22 UTC
  • mfrom: (1.2.1) (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130513214322-6frgd9du1n0w2uo7
Tags: 1.2.1-1
* Team upload.
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
                this.instrumentedLines = instrumentedLines;
35
35
        }
36
36
        
 
37
        @Override
37
38
        public TreeElement getParent() {
38
39
                return parent;
39
40
        }
40
41
        
 
42
        @Override
41
43
        public boolean hasChildren() {
42
44
                return (children.size()>0);
43
45
        }
44
46
 
 
47
        @Override
45
48
        public LinkedList<? extends TreeElement> getChildren() {
46
49
                return children;
47
50
        }
48
51
 
 
52
        @Override
49
53
        public String getName() {
50
54
                return name;
51
55
        }
52
56
        
 
57
        @Override
53
58
        public TreeElement getRoot() {
54
59
                if (parent == null) return this;
55
60
                return parent.getRoot();
56
61
        }
57
62
 
 
63
        @Override
58
64
        public int getExecutedLines() {
59
65
                return executedLines;
60
66
        }
61
67
        
 
68
        @Override
62
69
        public int getInstrumentedLines() {
63
70
                return instrumentedLines;
64
71
        }
65
72
 
 
73
        @Override
66
74
        public float getCoveragePercentage() {
67
75
                 if (instrumentedLines !=0 )
68
76
                        return (100.f*executedLines)/(instrumentedLines);
73
81
                children.add(child);
74
82
        }
75
83
        
 
84
        @Override
76
85
        public int getTotalLines() {
77
86
                return totalLines;
78
87
        }