1 11 12 package org.eclipse.jdt.internal.corext.buildpath; 13 14 import java.lang.reflect.InvocationTargetException ; 15 import java.util.ArrayList ; 16 import java.util.List ; 17 18 import org.eclipse.core.runtime.CoreException; 19 import org.eclipse.core.runtime.IProgressMonitor; 20 21 import org.eclipse.jdt.core.IJavaProject; 22 import org.eclipse.jdt.core.JavaModelException; 23 24 import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; 25 26 29 public class ResetAllOutputFoldersOperation extends ClasspathModifierOperation { 30 31 42 public ResetAllOutputFoldersOperation(IClasspathModifierListener listener, IClasspathInformationProvider informationProvider) { 43 super(listener, informationProvider, NewWizardMessages.NewSourceContainerWorkbookPage_ToolBar_Reset_tooltip, IClasspathInformationProvider.RESET); 44 } 45 46 53 public void run(IProgressMonitor monitor) throws InvocationTargetException { 54 List result= new ArrayList (); 55 fException= null; 56 try { 57 IJavaProject project= fInformationProvider.getJavaProject(); 58 resetOutputFolders(project, monitor); 59 } catch (CoreException e) { 60 fException= e; 61 result= null; 62 } 63 super.handleResult(result, monitor); 64 } 65 66 80 public boolean isValid(List elements, int[] types) throws JavaModelException { 81 return true; } 83 84 96 public String getDescription(int type) { 97 return NewWizardMessages.PackageExplorerActionGroup_FormText_Default_ResetAllOutputFolders; 98 } 99 } 100 | Popular Tags |