1 /*************************************************************************
2 * @author Ali Echihabi (ali_echihabi@ieee.org, ali.echihabi@souss.ca)
4 * Plugin for PHP unit Testing.
7 *************************************************************************/
9 package net.sourceforge.phpeclipse.phpunit.reporthandling;
11 import java.io.BufferedReader;
12 import java.io.IOException;
13 import java.io.InputStreamReader;
14 import java.net.Socket;
16 import net.sourceforge.phpeclipse.phpunit.PHPUnitView;
18 public class ReportListener extends Thread {
24 public ReportListener(Socket serviceSocket, PHPUnitView view) {
26 this.serviceSocket = serviceSocket;
32 InputStreamReader reader;
35 reader = new InputStreamReader(serviceSocket.getInputStream());
37 BufferedReader in = new BufferedReader(reader);
40 // keep listening until the
41 while ((report = in.readLine()) != null
42 && (report != "end_all_tests")) {
44 // System.out.println("received something...");
45 view.handleReport(report);
46 // System.out.println(report);
49 // reportArea.append("Finished!");
50 System.out.println("Finished");
51 serviceSocket.close();
53 } catch (IOException e) {
54 // TODO Auto-generated catch block