BufferRefreshOperation.java
Go to the documentation of this file.00001 package edu.rice.cs.hpc.traceviewer.operation;
00002
00003 import org.eclipse.core.commands.ExecutionException;
00004 import org.eclipse.core.commands.operations.AbstractOperation;
00005 import org.eclipse.core.commands.operations.IUndoContext;
00006 import org.eclipse.core.runtime.IAdaptable;
00007 import org.eclipse.core.runtime.IProgressMonitor;
00008 import org.eclipse.core.runtime.IStatus;
00009 import org.eclipse.core.runtime.Status;
00010 import org.eclipse.swt.graphics.ImageData;
00011
00012 public class BufferRefreshOperation extends AbstractOperation {
00013
00015 final private ImageData detailData;
00016 static final public IUndoContext context = new BufferOperationContext();
00017
00018 public BufferRefreshOperation(String label, ImageData detailData) {
00019 super(label);
00020 addContext(context);
00021 this.detailData = detailData;
00022 }
00023
00024 @Override
00025 public IStatus execute(IProgressMonitor monitor, IAdaptable info)
00026 throws ExecutionException {
00027 return Status.OK_STATUS;
00028 }
00029
00030 @Override
00031 public IStatus redo(IProgressMonitor monitor, IAdaptable info)
00032 throws ExecutionException {
00033 return execute(monitor, info);
00034 }
00035
00036 @Override
00037 public IStatus undo(IProgressMonitor monitor, IAdaptable info)
00038 throws ExecutionException {
00039 return Status.OK_STATUS;
00040 }
00041
00042 public ImageData getImageData() {
00043 return detailData;
00044 }
00045 }