当前位置: 首页>>代码示例>>Java>>正文


Java ISaveContext类代码示例

本文整理汇总了Java中org.eclipse.core.resources.ISaveContext的典型用法代码示例。如果您正苦于以下问题:Java ISaveContext类的具体用法?Java ISaveContext怎么用?Java ISaveContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ISaveContext类属于org.eclipse.core.resources包,在下文中一共展示了ISaveContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: WorkingSetManagerBrokerImpl

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
/**
 * 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);
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:38,代码来源:WorkingSetManagerBrokerImpl.java

示例2: saving

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
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();
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:9,代码来源:CoreIOPlugin.java

示例3: saving

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
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();
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:9,代码来源:WebServerCorePlugin.java

示例4: saving

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
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);
        }
    }
}
 
开发者ID:apache,项目名称:ant-ivyde,代码行数:16,代码来源:RetrieveSetupManager.java

示例5: saving

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
public void saving(ISaveContext context) {
    switch (context.getKind()) {
    case ISaveContext.FULL_SAVE:
        fullSave();
        break;
    case ISaveContext.PROJECT_SAVE:
        saveBugCollection(context.getProject());
        break;
    default:
        break;
    }
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:13,代码来源:FindbugsSaveParticipant.java

示例6: doneSaving

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void doneSaving(final ISaveContext context) {
	// Nothing by default.
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:SaveParticipantAdapter.java

示例7: prepareToSave

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void prepareToSave(final ISaveContext context) throws CoreException {
	// Nothing by default.
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:SaveParticipantAdapter.java

示例8: rollback

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void rollback(final ISaveContext context) {
	// Nothing by default.
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:SaveParticipantAdapter.java

示例9: saving

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void saving(final ISaveContext context) throws CoreException {
	// Nothing by default.
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:SaveParticipantAdapter.java

示例10: doneSaving

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void doneSaving(ISaveContext context) {
}
 
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:4,代码来源:ProjectsManager.java

示例11: prepareToSave

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void prepareToSave(ISaveContext context) throws CoreException {
	if (context.getKind() == ISaveContext.FULL_SAVE) {
		GradleBuildSupport.saveModels();
	}
}
 
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:7,代码来源:ProjectsManager.java

示例12: rollback

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void rollback(ISaveContext context) {
}
 
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:4,代码来源:ProjectsManager.java

示例13: saving

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void saving(ISaveContext context) throws CoreException {
}
 
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:4,代码来源:ProjectsManager.java

示例14: doneSaving

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void doneSaving(ISaveContext context) {
	// not necessary
}
 
开发者ID:1Tristan,项目名称:VariantSync,代码行数:5,代码来源:ChangeListener.java

示例15: prepareToSave

import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void prepareToSave(ISaveContext context) throws CoreException {
	// not necessary
}
 
开发者ID:1Tristan,项目名称:VariantSync,代码行数:5,代码来源:ChangeListener.java


注:本文中的org.eclipse.core.resources.ISaveContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。