Interface IFileModificationValidator

  • All Known Implementing Classes:

    public interface IFileModificationValidator
    clients should subclass FileModificationValidator instead of implementing this interface
    The file modification validator is a Team-related hook for pre-checking operations that modify the contents of files.

    This interface is used only in conjunction with the "org.eclipse.core.resources.fileModificationValidator" extension point. It is intended to be implemented only by the Eclipse Platform Team plug-in.

    • Method Detail

      • validateEdit

        IStatus validateEdit​(IFile[] files,
                             Object context)
        Validates that the given files can be modified. The files must all exist in the workspace. The optional context object may be supplied if UI-based validation is required. If the context is null, the validator must attempt to perform the validation in a headless manner. The returned status is IStatus.OK if this validator believes the given file can be modified. Other return statuses indicate the reason why the individual files cannot be modified.
        files - the files that are to be modified; these files must all exist in the workspace
        context - the org.eclipse.swt.widgets.Shell that is to be used to parent any dialogs with the user, or null if there is no UI context (declared as an Object to avoid any direct references on the SWT component)
        a status object that is OK if things are fine, otherwise a status describing reasons why modifying the given files is not reasonable
        See Also:
        IWorkspace.validateEdit(IFile[], Object)