org.eclipse.core.resources.ISavedState Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spotless-ext-greclipse Show documentation
Show all versions of spotless-ext-greclipse Show documentation
Groovy Eclipse's formatter bundled for Spotless
The newest version!
/*******************************************************************************
* Copyright (c) 2000, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.core.resources;
import org.eclipse.core.runtime.IPath;
/**
* A data structure returned by {@link IWorkspace#addSaveParticipant(org.eclipse.core.runtime.Plugin, ISaveParticipant)}
* containing a save number and an optional resource delta.
*
* @see IWorkspace#addSaveParticipant(org.eclipse.core.runtime.Plugin, ISaveParticipant)
* @noimplement This interface is not intended to be implemented by clients.
* @noextend This interface is not intended to be extended by clients.
*/
public interface ISavedState {
/**
* Returns the files mapped with the {@link ISaveContext#map(IPath, IPath)}
* facility. Returns an empty array if there are no mapped files.
*
* @return the files currently mapped by the participant
*
* @see #lookup(IPath)
* @see ISaveContext#map(IPath, IPath)
*/
public IPath[] getFiles();
/**
* Returns the save number for the save participant.
* This is the save number of the last successful save in which the plug-in
* actively participated, or 0
if the plug-in has
* never actively participated in a successful save.
*
* @return the save number
*/
public int getSaveNumber();
/**
* Returns the mapped location associated with the given path
* or null
if none.
*
* @return the mapped location of a given path
* @see #getFiles()
* @see ISaveContext#map(IPath, IPath)
*/
public IPath lookup(IPath file);
/**
* Used to receive notification of changes that might have happened
* while this plug-in was not active. The listener receives notifications of changes to
* the workspace resource tree since the time this state was saved. After this
* method is run, the delta is forgotten. Subsequent calls to this method
* will have no effect.
*
* No notification is received in the following cases:
*
* - if a saved state was never recorded ({@link ISaveContext#needDelta()}
* was not called)
*
* All clients should have a contingency plan in place in case * a changes are not available (the case should be very similar * to the first time a plug-in is activated, and only has the * current state of the workspace to work from). *
** The supplied event is of type {@link IResourceChangeEvent#POST_BUILD} * and contains the delta detailing changes since this plug-in last participated * in a save. This event object (and the resource delta within it) is valid only * for the duration of the invocation of this method. *
* * @param listener the listener * @see ISaveContext#needDelta() * @see IResourceChangeListener */ public void processResourceChangeEvents(IResourceChangeListener listener); }© 2015 - 2024 Weber Informatics LLC | Privacy Policy