All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.core.resources.IFileModificationValidator Maven / Gradle / Ivy

Go to download

AspectJ tools most notably contains the AspectJ compiler (AJC). AJC applies aspects to Java classes during compilation, fully replacing Javac for plain Java classes and also compiling native AspectJ or annotation-based @AspectJ syntax. Furthermore, AJC can weave aspects into existing class files in a post-compile binary weaving step. This library is a superset of AspectJ weaver and hence also of AspectJ runtime.

There is a newer version: 1.9.22.1
Show newest version
/*******************************************************************************
 * Copyright (c) 2000, 2014 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.core.resources;

import org.eclipse.core.resources.team.FileModificationValidator;
import org.eclipse.core.runtime.IStatus;

/**
 * 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 * @deprecated clients should subclass {@link FileModificationValidator} instead * of implementing this interface */ @Deprecated public interface IFileModificationValidator { /** * 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. * * @param files the files that are to be modified; these files must all exist in the workspace * @param 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) * @return a status object that is OK if things are fine, otherwise a status describing * reasons why modifying the given files is not reasonable * @see IWorkspace#validateEdit(IFile[], Object) */ IStatus validateEdit(IFile[] files, Object context); /** * 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. * * @param file the file that is to be modified; this file must exist in the workspace * @return 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 IFile#setContents(java.io.InputStream, int, org.eclipse.core.runtime.IProgressMonitor) * @see IFile#appendContents(java.io.InputStream, int, org.eclipse.core.runtime.IProgressMonitor) */ IStatus validateSave(IFile file); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy