1 11 package org.eclipse.core.resources.team; 12 13 import org.eclipse.core.resources.*; 14 import org.eclipse.core.runtime.IStatus; 15 16 28 public abstract class FileModificationValidator implements IFileModificationValidator { 29 30 50 public final IStatus validateEdit(IFile[] files, Object context) { 51 FileModificationValidationContext validationContext; 52 if (context == null) 53 validationContext = null; 54 else if (context instanceof FileModificationValidationContext) 55 validationContext = (FileModificationValidationContext) context; 56 else 57 validationContext = new FileModificationValidationContext(context); 58 return validateEdit(files, validationContext); 59 } 60 61 77 public IStatus validateSave(IFile file) { 78 return validateEdit(new IFile[] {file}, (FileModificationValidationContext) null); 79 } 80 81 97 public abstract IStatus validateEdit(IFile[] files, FileModificationValidationContext context); 98 99 } 100 | Popular Tags |