CallerScopeView.java

Go to the documentation of this file.
00001 
00004 package edu.rice.cs.hpc.viewer.scope.bottomup;
00005 
00006 import org.eclipse.jface.action.IMenuManager;
00007 import org.eclipse.jface.viewers.CellLabelProvider;
00008 import org.eclipse.swt.widgets.Composite;
00009 import org.eclipse.swt.widgets.CoolBar;
00010 import org.eclipse.swt.widgets.Event;
00011 import org.eclipse.ui.IWorkbenchWindow;
00012 
00013 import edu.rice.cs.hpc.data.experiment.Experiment;
00014 import edu.rice.cs.hpc.data.experiment.scope.Scope;
00015 import edu.rice.cs.hpc.viewer.scope.AbstractContentProvider;
00016 import edu.rice.cs.hpc.viewer.scope.BaseScopeView;
00017 import edu.rice.cs.hpc.viewer.scope.BaseScopeViewActions;
00018 import edu.rice.cs.hpc.viewer.scope.ScopeViewActions;
00019 import edu.rice.cs.hpc.viewer.scope.StyledScopeLabelProvider;
00020 
00026 public class CallerScopeView extends BaseScopeView {
00027     public static final String ID = "edu.rice.cs.hpc.viewer.scope.CallerScopeView";
00028 
00029     /* (non-Javadoc)
00030      * @see edu.rice.cs.hpc.viewer.scope.BaseScopeView#createActions(org.eclipse.swt.widgets.Composite, org.eclipse.swt.widgets.CoolBar)
00031      */
00032     //@Override
00033     protected ScopeViewActions createActions(Composite parent, CoolBar coolbar) {
00034         IWorkbenchWindow window = this.getSite().getWorkbenchWindow();
00035         return new BaseScopeViewActions(this.getViewSite().getShell(), window, parent, coolbar); 
00036     }
00037 
00038     //@Override
00039     protected CellLabelProvider getLabelProvider() {
00040         return new StyledScopeLabelProvider(this.getSite().getWorkbenchWindow());
00041     }
00042 
00043     //@Override
00044     protected void createAdditionalContextMenu(IMenuManager mgr, Scope scope) {}
00045 
00046     //@Override
00047     protected void mouseDownEvent(Event event) {}
00048 
00049     @Override
00050     protected AbstractContentProvider getScopeContentProvider() {
00051         return new CallerViewContentProvider();
00052     }
00053 
00054     //@Override
00055     protected void updateDatabase(Experiment newDatabase) {
00056         
00057         // ---------------------------------------------------------------------------
00058         // it is important to notify the content provider that we have new database
00059         // ---------------------------------------------------------------------------
00060         CallerViewContentProvider objContent = (CallerViewContentProvider) this.treeViewer.getContentProvider();
00061         if (objContent != null)
00062             objContent.setDatabase(newDatabase);
00063     }
00064 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1