1 /*************************************************************************
2 * @author Ali Echihabi (ali_echihabi@ieee.org, ali.echihabi@souss.ca)
4 * Plugin for PHP unit Testing.
7 *************************************************************************/
10 package net.sourceforge.phpeclipse.phpunit;
12 import net.sourceforge.phpeclipse.phpunit.testpool.TestPool;
14 import org.eclipse.jface.viewers.TreeViewer;
15 import org.eclipse.swt.SWT;
16 import org.eclipse.swt.layout.GridData;
17 import org.eclipse.swt.layout.GridLayout;
18 import org.eclipse.swt.widgets.Composite;
21 public class ResultsInfoComposite extends Composite {
25 private TreeViewer treeViewer;
31 public ResultsInfoComposite(Composite parent) {
33 super(parent, SWT.BORDER);
35 GridLayout layout = new GridLayout();
36 layout.numColumns = 1;
40 treeViewer = new TreeViewer(this, SWT.BORDER | SWT.SHADOW_ETCHED_IN);
42 treeViewer.getControl().setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.FILL_BOTH | GridData.GRAB_VERTICAL));
45 TestPoolLabelProvider labelProvider = new TestPoolLabelProvider();
46 TestPoolContentProvider contentProvider= new TestPoolContentProvider();
48 treeViewer.setContentProvider(contentProvider);
49 treeViewer.setLabelProvider(labelProvider);
54 public void resetInfo() {
56 treeViewer.setInput(null);
59 public void updateInfo(TestPool testPool) {
61 // take care of the TreeView and its content and label providers.
63 treeViewer.setInput(testPool.getRoot());