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


Java BuildAction类代码示例

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


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

示例1: BuildActionGroup

import org.eclipse.ui.actions.BuildAction; //导入依赖的package包/类
private BuildActionGroup(IWorkbenchSite site, ISelectionProvider specialSelectionProvider, RefreshAction refreshAction) {
	fSelectionProvider= specialSelectionProvider != null ? specialSelectionProvider : site.getSelectionProvider();

	fBuildAction= new BuildAction(new ShellProviderAdapter(site.getShell()), IncrementalProjectBuilder.INCREMENTAL_BUILD);
	fBuildAction.setText(ActionMessages.BuildAction_label);
	fBuildAction.setActionDefinitionId(IWorkbenchCommandConstants.PROJECT_BUILD_PROJECT);

	fRefreshAction= refreshAction;
	fRefreshAction.setActionDefinitionId(IWorkbenchCommandConstants.FILE_REFRESH);

	if (specialSelectionProvider != null) {
		fRefreshAction.setSpecialSelectionProvider(specialSelectionProvider);
	}

	fSelectionProvider.addSelectionChangedListener(fBuildAction);
	fSelectionProvider.addSelectionChangedListener(fRefreshAction);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:18,代码来源:BuildActionGroup.java

示例2: startBuildJob

import org.eclipse.ui.actions.BuildAction; //导入依赖的package包/类
private static void startBuildJob(IProject proj) {
    BuildAction build = new BuildAction(
            PlatformUI.getWorkbench().getActiveWorkbenchWindow(),
            IncrementalProjectBuilder.FULL_BUILD);
    build.selectionChanged(new StructuredSelection(proj));
    build.runInBackground(null);
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:8,代码来源:PgDbParser.java

示例3: saveEditors

import org.eclipse.ui.actions.BuildAction; //导入依赖的package包/类
/**
 * Causes all editors to save any modified resources in the provided collection
 * of projects depending on the user's preference.
 * @param projects The projects in which to save editors, or <code>null</code>
 * to save editors in all projects.
 */
public static void saveEditors(Indexable<IProject> projects) {
	if (!BuildAction.isSaveAllSet()) {
		return;
	}
	IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
	for (int i = 0; i < windows.length; i++) {
		IWorkbenchPage[] pages = windows[i].getPages();
		for (int j = 0; j < pages.length; j++) {
			IWorkbenchPage page = pages[j];
			if (projects == null) {
				page.saveAllEditors(false);
			} else {
				IEditorPart[] editors = page.getDirtyEditors();
				for (int k = 0; k < editors.length; k++) {
					IEditorPart editor = editors[k];
					IFile inputFile = ResourceUtil.getFile(editor.getEditorInput());
					if (inputFile != null) {
						if (projects.contains(inputFile.getProject())) {
							page.saveEditor(editor, false);
						}
					}
				}
			}
		}
	}
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:33,代码来源:BuildUtilities.java

示例4: BuildOperationsActionGroup

import org.eclipse.ui.actions.BuildAction; //导入依赖的package包/类
public BuildOperationsActionGroup(IViewPart viewPart) {
	super(viewPart);
	
	buildAction = new BuildAction(() -> viewPart.getSite().getShell(), 
		IncrementalProjectBuilder.INCREMENTAL_BUILD);
	buildAction.setActionDefinitionId(IWorkbenchCommandConstants.PROJECT_BUILD_PROJECT);
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:8,代码来源:LangNavigatorActionProvider.java


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