FileModificationValidatorinstead of implementing this interface
public interface IFileModificationValidator
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.
null, the validator must attempt to perform the validation in a headless manner. The returned status is
IStatus.OKif 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
org.eclipse.swt.widgets.Shellthat is to be used to parent any dialogs with the user, or
nullif there is no UI context (declared as an
Objectto avoid any direct references on the SWT component)
IFile#appendContentsbefore any attempt to write data to disk. The returned status is
IStatus.OKif this validator believes the given file can be successfully saved. In all other cases the return value is a non-OK status. Note that a return value of
IStatus.OKdoes not guarantee that the save will succeed.
file- the file that is to be modified; this file must exist in the workspace
IStatus.OKindicates a save should be attempted.
IFile.setContents(java.io.InputStream, int, org.eclipse.core.runtime.IProgressMonitor),
IFile.appendContents(java.io.InputStream, int, org.eclipse.core.runtime.IProgressMonitor)
Copyright (c) 2000, 2013 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.