TraceProgressReport.java

Go to the documentation of this file.
00001 package edu.rice.cs.hpc.traceviewer.util;
00002 
00003 import org.eclipse.jface.action.IStatusLineManager;
00004 import org.eclipse.ui.PlatformUI;
00005 
00006 import edu.rice.cs.hpc.data.util.IProgressReport;
00007 
00008 public class TraceProgressReport implements IProgressReport 
00009 {
00010     final private IStatusLineManager _statusMgr;
00011     
00012     public TraceProgressReport(IStatusLineManager statusMgr )
00013     {
00014         this._statusMgr = statusMgr;
00015     }
00016     
00017     public void begin(String title, int num_tasks) {
00018         _statusMgr.setMessage(title);
00019         PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().update();
00020         _statusMgr.getProgressMonitor().beginTask("Starting: "+title, num_tasks);
00021     }
00022 
00023     public void advance() {
00024         _statusMgr.getProgressMonitor().worked(1);
00025     }
00026 
00027     public void end() {
00028         _statusMgr.getProgressMonitor().done();
00029     }   
00030 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1