Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.resources
Interface IFileModificationValidator

All Known Implementing Classes:
FileModificationValidator

Deprecated. clients should subclass FileModificationValidator instead of implementing this interface

public interface IFileModificationValidator

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.

Since:
2.0

Method Summary
  IStatus validateEdit ( IFile[] files, Object context)
          Deprecated. Validates that the given files can be modified.
  IStatus validateSave ( IFile file)
          Deprecated. Validates that the given file can be saved.
 

Method Detail

validateEdit

IStatus validateEdit(
IFile[] files,
                     
Object context)
Deprecated. 
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.

Parameters:
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)
Returns:
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)

validateSave

IStatus validateSave(
IFile file)
Deprecated. 
Validates that the given file can be saved. This method is called from IFile#setContents and IFile#appendContents before any attempt to write data to disk. The returned status is IStatus.OK if 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.OK does not guarantee that the save will succeed.

Parameters:
file - the file that is to be modified; this file must exist in the workspace
Returns:
a status indicating whether or not it is reasonable to try writing to the given file; IStatus.OK indicates a save should be attempted.
See Also:
IFile.setContents(java.io.InputStream, int, org.eclipse.core.runtime.IProgressMonitor), IFile.appendContents(java.io.InputStream, int, org.eclipse.core.runtime.IProgressMonitor)

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire