Java 类org.eclipse.core.resources.ISaveContext 实例源码

项目:n4js    文件:WorkingSetManagerBrokerImpl.java   
/**
 * Creates a new working set broker instance with the given injector and status helper arguments. The injector is
 * used to inject members into the available contributions. Also restores its most recent state from the preference
 * store.
 *
 * @param injector
 *            the injector for initializing the contributions.
 * @param statusHelper
 *            convenient way to create {@link IStatus status} instances.
 *
 */
@Inject
private WorkingSetManagerBrokerImpl(final Injector injector, final StatusHelper statusHelper) {
    this.injector = injector;
    this.statusHelper = statusHelper;
    this.activeWorkingSetManager = new AtomicReference<>();
    this.workingSetTopLevel = new AtomicBoolean(false);
    this.alreadyQueuedNavigatorRefresh = new AtomicBoolean(false);
    this.contributions = initContributions();
    topLevelElementChangeListeners = newHashSet();
    workingSetManagerStateChangeListeners = newHashSet();
    restoreState(new NullProgressMonitor());
    if (EMFPlugin.IS_ECLIPSE_RUNNING) {
        final String pluginId = N4JSActivator.getInstance().getBundle().getSymbolicName();
        final IWorkspace workspace = ResourcesPlugin.getWorkspace();
        try {
            workspace.addSaveParticipant(pluginId, new SaveParticipantAdapter() {
                @Override
                public void saving(final ISaveContext context) throws CoreException {
                    saveState(new NullProgressMonitor());
                }
            });
        } catch (final CoreException e) {
            LOGGER.error("Error occurred while attaching save participant to workspace.", e);
        }
    }
}
项目:APICloud-Studio    文件:CoreIOPlugin.java   
public void saving(ISaveContext context) throws CoreException
{
    IPath savePath = new Path(ConnectionPointManager.STATE_FILENAME).addFileExtension(Integer.toString(context
            .getSaveNumber()));
    ConnectionPointManager.getInstance().saveState(getStateLocation().append(savePath));
    context.map(new Path(ConnectionPointManager.STATE_FILENAME), savePath);
    context.needSaveNumber();
}
项目:APICloud-Studio    文件:WebServerCorePlugin.java   
public void saving(ISaveContext context) throws CoreException
{
    IPath savePath = new Path(ServerManager.STATE_FILENAME).addFileExtension(Integer.toString(context
            .getSaveNumber()));
    ((ServerManager) getServerManager()).saveState(getStateLocation().append(savePath));
    context.map(new Path(ServerManager.STATE_FILENAME), savePath);
    context.needSaveNumber();
}
项目:ant-ivyde    文件:RetrieveSetupManager.java   
public void saving(ISaveContext context) throws CoreException {
    Map<IProject, IEclipsePreferences> toFlush = new HashMap<>();
    synchronized (projectPrefs) {
        toFlush.putAll(projectPrefs);
        projectPrefs.clear();
    }
    for (Entry<IProject, IEclipsePreferences> entry : toFlush.entrySet()) {
        try {
            entry.getValue().flush();
        } catch (BackingStoreException e) {
            IvyPlugin.logError("Failed to save the state of the Ivy preferences of "
                    + entry.getKey().getName(), e);
        }
    }
}
项目:FindBug-for-Domino-Designer    文件:FindbugsSaveParticipant.java   
public void saving(ISaveContext context) {
    switch (context.getKind()) {
    case ISaveContext.FULL_SAVE:
        fullSave();
        break;
    case ISaveContext.PROJECT_SAVE:
        saveBugCollection(context.getProject());
        break;
    default:
        break;
    }
}
项目:n4js    文件:SaveParticipantAdapter.java   
@Override
public void doneSaving(final ISaveContext context) {
    // Nothing by default.
}
项目:n4js    文件:SaveParticipantAdapter.java   
@Override
public void prepareToSave(final ISaveContext context) throws CoreException {
    // Nothing by default.
}
项目:n4js    文件:SaveParticipantAdapter.java   
@Override
public void rollback(final ISaveContext context) {
    // Nothing by default.
}
项目:n4js    文件:SaveParticipantAdapter.java   
@Override
public void saving(final ISaveContext context) throws CoreException {
    // Nothing by default.
}
项目:eclipse.jdt.ls    文件:ProjectsManager.java   
@Override
public void doneSaving(ISaveContext context) {
}
项目:eclipse.jdt.ls    文件:ProjectsManager.java   
@Override
public void prepareToSave(ISaveContext context) throws CoreException {
    if (context.getKind() == ISaveContext.FULL_SAVE) {
        GradleBuildSupport.saveModels();
    }
}
项目:eclipse.jdt.ls    文件:ProjectsManager.java   
@Override
public void rollback(ISaveContext context) {
}
项目:eclipse.jdt.ls    文件:ProjectsManager.java   
@Override
public void saving(ISaveContext context) throws CoreException {
}
项目:VariantSync    文件:ChangeListener.java   
@Override
public void doneSaving(ISaveContext context) {
    // not necessary
}
项目:VariantSync    文件:ChangeListener.java   
@Override
public void prepareToSave(ISaveContext context) throws CoreException {
    // not necessary
}
项目:VariantSync    文件:ChangeListener.java   
@Override
public void rollback(ISaveContext context) {
    // not necessary
}
项目:VariantSync    文件:ChangeListener.java   
@Override
public void saving(ISaveContext context) throws CoreException {
    // not necessary
}
项目:APICloud-Studio    文件:CoreIOPlugin.java   
public void prepareToSave(ISaveContext context) throws CoreException
{
}
项目:APICloud-Studio    文件:CoreIOPlugin.java   
public void doneSaving(ISaveContext context)
{
    IPath prevSavePath = new Path(ConnectionPointManager.STATE_FILENAME).addFileExtension(Integer
            .toString(context.getPreviousSaveNumber()));
    getStateLocation().append(prevSavePath).toFile().delete();
}
项目:APICloud-Studio    文件:CoreIOPlugin.java   
public void rollback(ISaveContext context)
{
    IPath savePath = new Path(ConnectionPointManager.STATE_FILENAME).addFileExtension(Integer.toString(context
            .getSaveNumber()));
    getStateLocation().append(savePath).toFile().delete();
}
项目:APICloud-Studio    文件:WebServerCorePlugin.java   
public void doneSaving(ISaveContext context)
{
    IPath prevSavePath = new Path(ServerManager.STATE_FILENAME).addFileExtension(Integer.toString(context
            .getPreviousSaveNumber()));
    getStateLocation().append(prevSavePath).toFile().delete();
}
项目:APICloud-Studio    文件:WebServerCorePlugin.java   
public void prepareToSave(ISaveContext context) throws CoreException
{
}
项目:APICloud-Studio    文件:WebServerCorePlugin.java   
public void rollback(ISaveContext context)
{
    IPath savePath = new Path(ServerManager.STATE_FILENAME).addFileExtension(Integer.toString(context
            .getSaveNumber()));
    getStateLocation().append(savePath).toFile().delete();
}
项目:eclipse-wtp-webresources    文件:WebResourcesCorePlugin.java   
/**
 * @see org.eclipse.core.resources.ISaveParticipant#doneSaving(org.eclipse.core.resources.ISaveContext)
 */
public void doneSaving(ISaveContext context) {
    // ignore
}
项目:eclipse-wtp-webresources    文件:WebResourcesCorePlugin.java   
/**
 * @see org.eclipse.core.resources.ISaveParticipant#prepareToSave(org.eclipse.core.resources.ISaveContext)
 */
public void prepareToSave(ISaveContext context) throws CoreException {
    // ignore
}
项目:eclipse-wtp-webresources    文件:WebResourcesCorePlugin.java   
/**
 * @see org.eclipse.core.resources.ISaveParticipant#rollback(org.eclipse.core.resources.ISaveContext)
 */
public void rollback(ISaveContext context) {
    // ignore
}
项目:eclipse-wtp-webresources    文件:WebResourcesCorePlugin.java   
/**
 * @see org.eclipse.core.resources.ISaveParticipant#saving(org.eclipse.core.resources.ISaveContext)
 */
public void saving(ISaveContext context) throws CoreException {
    context.needDelta();
}
项目:ant-ivyde    文件:RetrieveSetupManager.java   
public void prepareToSave(ISaveContext context) throws CoreException {
    // nothing to do
}
项目:ant-ivyde    文件:RetrieveSetupManager.java   
public void rollback(ISaveContext context) {
    // nothing to do
}
项目:ant-ivyde    文件:RetrieveSetupManager.java   
public void doneSaving(ISaveContext context) {
    // nothing to do
}
项目:eclipse-timekeeper    文件:TimekeeperPlugin.java   
@Override
public void doneSaving(ISaveContext context) {
}
项目:eclipse-timekeeper    文件:TimekeeperPlugin.java   
@Override
public void prepareToSave(ISaveContext context) throws CoreException {
}
项目:eclipse-timekeeper    文件:TimekeeperPlugin.java   
@Override
public void rollback(ISaveContext context) {
}
项目:eclipse-timekeeper    文件:TimekeeperPlugin.java   
@Override
public void saving(ISaveContext context) throws CoreException {
    saveDatabaseJob.setSystem(true);
    saveDatabaseJob.schedule();
}
项目:FindBug-for-Domino-Designer    文件:FindbugsSaveParticipant.java   
public void doneSaving(ISaveContext context) {
    // noop
}
项目:FindBug-for-Domino-Designer    文件:FindbugsSaveParticipant.java   
public void prepareToSave(ISaveContext context) {
    // noop
}
项目:FindBug-for-Domino-Designer    文件:FindbugsSaveParticipant.java   
public void rollback(ISaveContext context) {
    // noop
}
项目:subclipse    文件:FileModificationManager.java   
/**
 * @see org.eclipse.core.resources.ISaveParticipant#doneSaving(org.eclipse.core.resources.ISaveContext)
 */
public void doneSaving(ISaveContext context) {
}
项目:subclipse    文件:FileModificationManager.java   
/**
 * @see org.eclipse.core.resources.ISaveParticipant#prepareToSave(org.eclipse.core.resources.ISaveContext)
 */
public void prepareToSave(ISaveContext context) {
}
项目:subclipse    文件:FileModificationManager.java   
/**
 * @see org.eclipse.core.resources.ISaveParticipant#rollback(org.eclipse.core.resources.ISaveContext)
 */
public void rollback(ISaveContext context) {
}