• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IBuildConfiguration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: vertexOrderToProjectBuildConfigOrder

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
/**
 * Converts the {@link VertexOrder vertex order} into the appropriate {@link ProjectBuildConfigOrder build
 * configuration order}.
 *
 * @param order
 *            the order to convert.
 * @return the converted vertex order as a build configuration order. The returning configuration can be consumed by
 *         the Eclipse build framework.
 */
private static ProjectBuildConfigOrder vertexOrderToProjectBuildConfigOrder(final VertexOrder order) {
	final IBuildConfiguration[] buildConfigs = new IBuildConfiguration[order.vertexes.length];
	System.arraycopy(order.vertexes, 0, buildConfigs, 0, order.vertexes.length);
	final IBuildConfiguration[][] knots = new IBuildConfiguration[order.knots.length][];
	for (int i = 0; i < order.knots.length; i++) {
		knots[i] = new IBuildConfiguration[order.knots[i].length];
		System.arraycopy(order.knots[i], 0, knots[i], 0, order.knots[i].length);
	}
	return new ProjectBuildConfigOrder(buildConfigs, order.hasCycles, knots);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:20,代码来源:ExternalProjectBuildOrderProvider.java


示例2: compare

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
@Override
public int compare(final IBuildConfiguration px, final IBuildConfiguration py) {
	int cmp = py.getProject().getName().compareTo(px.getProject().getName());
	if (cmp == 0) {
		cmp = py.getName().compareTo(px.getName());
	}
	return cmp;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:9,代码来源:ExternalProjectBuildOrderProvider.java


示例3: internalGetDescription

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
/**
 * Like {@link #getActiveBuildConfig()} but doesn't check accessibility. Project must be accessible.
 *
 * @see #getActiveBuildConfig()
 */
/* default */ IBuildConfiguration unsafeGetActiveBuildConfig() {
	String configName = internalGetDescription().getActiveBuildConfig();
	try {
		if (configName != null)
			return getBuildConfig(configName);
	} catch (CoreException e) {
		// Build configuration doesn't exist; treat the first as active.
	}
	return internalGetBuildConfigs(false)[0];
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:ExternalProject.java


示例4: RebuildWorkspaceProjectsJob

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
/**
 * Creates a new job with the already ordered configurations to builder.
 *
 * @param configs
 *            the configurations to build.
 *
 */
public RebuildWorkspaceProjectsJob(final IBuildConfiguration[] configs) {
	super("Building workspace");
	checkState(Platform.isRunning(), "This job requires a running platform");
	this.configs = checkNotNull(configs, "configs");
	setSystem(false);
	setUser(true);
	setRule(BUILD_RULE);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:RebuildWorkspaceProjectsJob.java


示例5: scheduleBuildIfNecessary

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
/**
 * Schedules a build with the given projects. Does nothing if the {@link Platform platform} is not running, or the
 * iterable of projects is empty.
 *
 * @param toUpdate
 *            an iterable of projects to build.
 */
public void scheduleBuildIfNecessary(final Iterable<IProject> toUpdate) {
	if (Platform.isRunning() && !Iterables.isEmpty(toUpdate)) {
		final Workspace workspace = (Workspace) ResourcesPlugin.getWorkspace();
		final IBuildConfiguration[] projectsToReBuild = from(asList(workspace.getBuildOrder()))
				.filter(config -> Iterables.contains(toUpdate, config.getProject()))
				.toArray(IBuildConfiguration.class);

		if (!Arrays2.isEmpty(projectsToReBuild)) {
			new RebuildWorkspaceProjectsJob(projectsToReBuild).schedule();
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:20,代码来源:RebuildWorkspaceProjectsScheduler.java


示例6: internalGetReferencedBuildConfigs

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
@Override
public IBuildConfiguration[] internalGetReferencedBuildConfigs(final String configName,
		final boolean includeMissing) {

	final IBuildConfiguration[] filteredConfigs = from(referencedBuildConfigs)
			.filter(config -> !includeMissing ? config.getProject().exists() : true)
			.toArray(IBuildConfiguration.class);
	return filteredConfigs;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:10,代码来源:N4JSExternalProject.java


示例7: refreshAndFullBuild

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
private void refreshAndFullBuild(IProgressMonitor monitor) throws InvocationTargetException {
	
	List<IProject> projects = Arrays.asList(ResourcesPlugin.getWorkspace().getRoot().getProjects());
	boolean isAutoBuildEnabled = isAutoBuildEnabled();	
	 try
     {
		 if (isAutoBuildEnabled)
		 {
			 enableAutoBuild(false);
		 }
		
		// refresh all projects one by one  
		for (IProject project : projects)
		{
			if (project.isOpen())
			{
				project.refreshLocal(IResource.DEPTH_INFINITE, null);
			}
		}
		// do a full build
        ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.CLEAN_BUILD, monitor);
        IBuildConfiguration[] platformBuildConfig = { ResourcesPlugin.getWorkspace().newBuildConfig("platform","platform-build")};
        // build the platform first since other projects depend on it
        ResourcesPlugin.getWorkspace().build(platformBuildConfig, IncrementalProjectBuilder.FULL_BUILD, true, monitor);
        ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, monitor);
      }
      catch (CoreException e)
      {
    	Activator.logError("Failed to synchronize with the platform", e);
        throw new InvocationTargetException(e);
      }
	 if (isAutoBuildEnabled)
	 {
		 enableAutoBuild(true);
	 }
}
 
开发者ID:SAP,项目名称:hybris-commerce-eclipse-plugin,代码行数:37,代码来源:EclipseRefreshAndBuildHandler.java


示例8: build

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
@Override
public void build(
    IBuildConfiguration[] iBuildConfigurations,
    int i,
    boolean b,
    IProgressMonitor iProgressMonitor)
    throws CoreException {
  throw new UnsupportedOperationException();
}
 
开发者ID:eclipse,项目名称:che,代码行数:10,代码来源:Workspace.java


示例9: isFirstProjectOfKind

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
protected boolean isFirstProjectOfKind() throws CoreException {
	for (IBuildConfiguration buildConfig : getContext().getAllReferencedBuildConfigs()) {
		if(buildConfig.getProject().hasNature(LangCore.NATURE_ID)) {
			return false;
		}
	}
	return true;
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:9,代码来源:LangProjectBuilder.java


示例10: isLastProjectOfKind

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
protected boolean isLastProjectOfKind() throws CoreException {
	for (IBuildConfiguration buildConfig : getContext().getAllReferencingBuildConfigs()) {
		if(buildConfig.getProject().hasNature(LangCore.NATURE_ID)) {
			return false;
		}
	}
	return true;
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:9,代码来源:LangProjectBuilder.java


示例11: getActiveBuildConfig

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
@Override
public IBuildConfiguration getActiveBuildConfig() throws CoreException {
	return new BuildConfiguration(this);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:ExternalProject.java


示例12: doPerformOperation

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
private void doPerformOperation(final IBuildConfiguration[] configs, final BuildOperation operation,
		final IProgressMonitor monitor) {

	if (Arrays2.isEmpty(configs)) {
		return;
	}

	final ISchedulingRule rule = getRule();
	try {
		Job.getJobManager().beginRule(rule, monitor);

		final List<ExternalProject> projects = transform(configs, config -> (ExternalProject) config.getProject());
		final List<IBuildConfiguration> buildOrder = newArrayList(getBuildOrder(projects));
		if (BuildOperation.CLEAN.equals(operation)) {
			Collections.reverse(buildOrder);
		}

		// Remove external projects that have the workspace counterpart if it is a build operation.
		if (BuildOperation.BUILD.equals(operation)) {
			for (final Iterator<IBuildConfiguration> itr = buildOrder.iterator(); itr.hasNext(); /**/) {
				if (hasWorkspaceCounterpart(itr.next())) {
					itr.remove();
				}
			}
		}

		checkState(buildOrder.size() == configs.length,
				"Inconsistency between build configuration and the ordered projects:" +
						"\n\tInput was: " + getProjectNames(configs) +
						"\n\tOrdered was: " + getProjectNames(buildOrder));

		ensureDynamicDependenciesSetForWorkspaceProjects();
		final String prefix = Strings.toFirstUpper(operation.toString().toLowerCase());
		final String projectNames = getProjectNames(buildOrder);
		LOGGER.info(prefix + "ing external libraries: " + projectNames);
		final SubMonitor subMonitor = SubMonitor.convert(monitor, buildOrder.size());
		for (final IBuildConfiguration configuration : buildOrder) {
			final IProject project = configuration.getProject();
			LOGGER.info(prefix + "ing external library: " + project.getName());
			operation.run(this, project, subMonitor.newChild(1));
		}
	} finally {
		Job.getJobManager().endRule(rule);
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:46,代码来源:ExternalLibraryBuilderHelper.java


示例13: hasWorkspaceCounterpart

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
/**
 * Returns with {@code true} if the external project is accessible in the workspace as well.
 */
private boolean hasWorkspaceCounterpart(IBuildConfiguration config) {
	final URI uri = URI.createPlatformResourceURI(config.getProject().getName(), true);
	final IN4JSProject n4Project = core.findProject(uri).orNull();
	return null != n4Project && n4Project.exists() && !n4Project.isExternal();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:9,代码来源:ExternalLibraryBuilderHelper.java


示例14: getProjectNames

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
private String getProjectNames(final Iterable<IBuildConfiguration> buildOrder) {
	return Iterables.toString(from(buildOrder).transform(c -> c.getProject().getName()));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:4,代码来源:ExternalLibraryBuilderHelper.java


示例15: getBuildConfiguration

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
private IBuildConfiguration getBuildConfiguration(final IProject project) {
	return TO_CONFIG_FUNC.apply(project);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:4,代码来源:ExternalLibraryBuilderHelper.java


示例16: build

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
@Override
public void build(
    IBuildConfiguration iBuildConfiguration, int i, IProgressMonitor iProgressMonitor)
    throws CoreException {
  throw new UnsupportedOperationException();
}
 
开发者ID:eclipse,项目名称:che,代码行数:7,代码来源:Project.java


示例17: getActiveBuildConfig

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
@Override
public IBuildConfiguration getActiveBuildConfig() throws CoreException {
  throw new UnsupportedOperationException();
}
 
开发者ID:eclipse,项目名称:che,代码行数:5,代码来源:Project.java


示例18: getBuildConfig

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
@Override
public IBuildConfiguration getBuildConfig(String s) throws CoreException {
  throw new UnsupportedOperationException();
}
 
开发者ID:eclipse,项目名称:che,代码行数:5,代码来源:Project.java


示例19: getBuildConfigs

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
@Override
public IBuildConfiguration[] getBuildConfigs() throws CoreException {
  throw new UnsupportedOperationException();
}
 
开发者ID:eclipse,项目名称:che,代码行数:5,代码来源:Project.java


示例20: getReferencedBuildConfigs

import org.eclipse.core.resources.IBuildConfiguration; //导入依赖的package包/类
@Override
public IBuildConfiguration[] getReferencedBuildConfigs(String s, boolean b) throws CoreException {
  throw new UnsupportedOperationException();
}
 
开发者ID:eclipse,项目名称:che,代码行数:5,代码来源:Project.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java XsiTypeLoader类代码示例发布时间:2022-05-23
下一篇:
Java StateStoreSupplier类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap