1 12 package org.eclipse.team.internal.ccvs.ui.actions; 13 14 import java.lang.reflect.InvocationTargetException ; 15 import org.eclipse.core.runtime.IProgressMonitor; 16 import org.eclipse.jface.action.IAction; 17 import org.eclipse.jface.operation.IRunnableWithProgress; 18 import org.eclipse.team.internal.ccvs.core.EditorsInfo; 19 import org.eclipse.team.internal.ccvs.ui.EditorsView; 20 28 public class ShowEditorsAction extends WorkspaceAction { 29 30 protected void execute(IAction action) throws InvocationTargetException , InterruptedException { 31 final EditorsAction editorsAction = new EditorsAction(); 32 run(new IRunnableWithProgress() { 33 public void run(IProgressMonitor monitor) 34 throws InvocationTargetException , InterruptedException { 35 executeProviderAction(editorsAction, monitor); 36 } 37 }, true , PROGRESS_DIALOG); 38 EditorsInfo[] infos = editorsAction.getEditorsInfo(); 39 EditorsView view = (EditorsView)showView(EditorsView.VIEW_ID); 40 if (view != null) { 41 view.setInput(infos); 42 } 43 44 } 45 46 49 protected boolean isEnabledForAddedResources() { 50 return false; 51 } 52 53 56 protected boolean isEnabledForNonExistantResources() { 57 return true; 58 } 59 60 63 protected boolean isEnabledForMultipleResources() { 64 return false; 68 } 69 70 } 71 | Popular Tags |