1 11 package org.eclipse.core.filebuffers.manipulation; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.core.runtime.IProgressMonitor; 15 16 import org.eclipse.core.resources.IWorkspace; 17 import org.eclipse.core.resources.IWorkspaceRunnable; 18 import org.eclipse.core.resources.ResourcesPlugin; 19 20 import org.eclipse.core.filebuffers.IFileBuffer; 21 import org.eclipse.core.filebuffers.IFileBufferManager; 22 23 24 35 public class FileBufferOperationRunner extends GenericFileBufferOperationRunner { 36 37 43 public FileBufferOperationRunner(IFileBufferManager fileBufferManager, Object validationContext) { 44 super(fileBufferManager, validationContext); 45 } 46 47 protected void commit(final IFileBuffer[] fileBuffers, final IProgressMonitor progressMonitor) throws CoreException { 48 IWorkspaceRunnable runnable= new IWorkspaceRunnable() { 49 public void run(IProgressMonitor monitor) throws CoreException { 50 doCommit(fileBuffers, progressMonitor); 51 } 52 }; 53 ResourcesPlugin.getWorkspace().run(runnable, computeCommitRule(fileBuffers), IWorkspace.AVOID_UPDATE, progressMonitor); 54 } 55 } 56 | Popular Tags |