本文整理汇总了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);
}
}
}
示例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();
}
示例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();
}
示例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);
}
}
}
示例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;
}
}
示例6: doneSaving
import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void doneSaving(final ISaveContext context) {
// Nothing by default.
}
示例7: prepareToSave
import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void prepareToSave(final ISaveContext context) throws CoreException {
// Nothing by default.
}
示例8: rollback
import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void rollback(final ISaveContext context) {
// Nothing by default.
}
示例9: saving
import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void saving(final ISaveContext context) throws CoreException {
// Nothing by default.
}
示例10: doneSaving
import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void doneSaving(ISaveContext context) {
}
示例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();
}
}
示例12: rollback
import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void rollback(ISaveContext context) {
}
示例13: saving
import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void saving(ISaveContext context) throws CoreException {
}
示例14: doneSaving
import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void doneSaving(ISaveContext context) {
// not necessary
}
示例15: prepareToSave
import org.eclipse.core.resources.ISaveContext; //导入依赖的package包/类
@Override
public void prepareToSave(ISaveContext context) throws CoreException {
// not necessary
}