use of org.eclipse.linuxtools.internal.gcov.model.TreeElement in project linuxtools by eclipse.
the class CovFolderContentProvider method getChildren.
@Override
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof TreeElement) {
TreeElement elem = (TreeElement) parentElement;
LinkedList<? extends TreeElement> list = elem.getChildren();
if (list != null)
return list.toArray();
}
return null;
}
use of org.eclipse.linuxtools.internal.gcov.model.TreeElement in project linuxtools by eclipse.
the class CovFunctionContentProvider method getElementChildrenList.
@Override
protected LinkedList<? extends TreeElement> getElementChildrenList(CovRootTreeElement root) {
LinkedList<? extends TreeElement> list = super.getElementChildrenList(root);
LinkedList<TreeElement> ret = new LinkedList<>();
for (TreeElement histTreeElem : list) {
LinkedList<? extends TreeElement> partialList = histTreeElem.getChildren();
ret.addAll(partialList);
}
return ret;
}
use of org.eclipse.linuxtools.internal.gcov.model.TreeElement in project linuxtools by eclipse.
the class FieldCoveragePercentage method compare.
@Override
public int compare(Object obj1, Object obj2) {
TreeElement e1 = (TreeElement) obj1;
TreeElement e2 = (TreeElement) obj2;
float f1 = e1.getCoveragePercentage();
float f2 = e2.getCoveragePercentage();
return Float.compare(f1, f2);
}
use of org.eclipse.linuxtools.internal.gcov.model.TreeElement in project linuxtools by eclipse.
the class FieldName method getValue.
@Override
public String getValue(Object obj) {
if (obj instanceof TreeElement) {
TreeElement e = (TreeElement) obj;
String nm = e.getName();
nm = nm.substring(nm.lastIndexOf('/') + 1);
nm = nm.substring(nm.lastIndexOf('\\') + 1);
return nm;
}
// $NON-NLS-1$
return "";
}
use of org.eclipse.linuxtools.internal.gcov.model.TreeElement in project linuxtools by eclipse.
the class CovFileContentProvider method getElementChildrenList.
protected LinkedList<? extends TreeElement> getElementChildrenList(CovRootTreeElement root) {
LinkedList<TreeElement> ret = new LinkedList<>();
LinkedList<? extends TreeElement> list = root.getChildren();
for (TreeElement folderlist : list) {
LinkedList<? extends TreeElement> partialList = folderlist.getChildren();
ret.addAll(partialList);
}
return ret;
}
Aggregations