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


Java EPartService.saveAll方法代码示例

本文整理汇总了Java中org.eclipse.e4.ui.workbench.modeling.EPartService.saveAll方法的典型用法代码示例。如果您正苦于以下问题:Java EPartService.saveAll方法的具体用法?Java EPartService.saveAll怎么用?Java EPartService.saveAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.e4.ui.workbench.modeling.EPartService的用法示例。


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

示例1: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
public void execute(EPartService partService, final IWorkbench workbench,
		Shell shell, DBManager dbManager, UISynchronize sync) {
	boolean saveAll = false;
	boolean close = false;
	if (!partService.getDirtyParts().isEmpty()) {
		saveAll = MessageDialog.openConfirm(shell, "Unsaved Data",
				"Unsaved data, do you want to save and restart?");

	} else {
		close = MessageDialog.openConfirm(shell, "Restart",
				"Restart application?");
	}

	if (saveAll) {
		partService.saveAll(false);
	}
	if (close || saveAll) {
		try {
			if (dbManager.optimizationRequired()) {
				// ask user if optimize
				dbManager.optimize();
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		sync.asyncExec(new Runnable() {
			@Override
			public void run() {
				workbench.restart();
			}
		});
	}

}
 
开发者ID:cplutte,项目名称:bts,代码行数:38,代码来源:RestartHandler.java

示例2: close

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Override
public boolean close(MWindow window) {
	
	EPartService partService = window.getContext().get(EPartService.class);
	partService.saveAll(true);

	return true;
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:9,代码来源:LifeCycleManager.java

示例3: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
void execute(EPartService partService) {
	partService.saveAll(true);
}
 
开发者ID:termsuite,项目名称:termsuite-ui,代码行数:5,代码来源:SaveAllHandler.java

示例4: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
public void execute(EPartService partService) {
	partService.saveAll(false);
}
 
开发者ID:DrBookings,项目名称:drbookings,代码行数:5,代码来源:SaveHandler.java

示例5: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
void execute(EPartService partService) {
	partService.saveAll(false);
}
 
开发者ID:cplutte,项目名称:bts,代码行数:5,代码来源:SaveAllHandler.java

示例6: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
void execute(final EPartService partService) {
	LOGGER.info(this.getClass().getSimpleName() + " called.");
	partService.saveAll(false);
}
 
开发者ID:scenarioo,项目名称:scenarioo-example-swtbot-e4,代码行数:6,代码来源:SaveAllHandler.java

示例7: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
public void execute(IWorkbench workbench, EPartService partService){
	
	partService.saveAll(true);
	workbench.close();
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:7,代码来源:ExitHandler.java


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