本文整理匯總了Java中org.eclipse.core.resources.IncrementalProjectBuilder.AUTO_BUILD屬性的典型用法代碼示例。如果您正苦於以下問題:Java IncrementalProjectBuilder.AUTO_BUILD屬性的具體用法?Java IncrementalProjectBuilder.AUTO_BUILD怎麽用?Java IncrementalProjectBuilder.AUTO_BUILD使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.eclipse.core.resources.IncrementalProjectBuilder
的用法示例。
在下文中一共展示了IncrementalProjectBuilder.AUTO_BUILD屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: build
@Override
protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
if (!PlatformUI.isWorkbenchRunning()) {
return new IProject[0];
}
IProject[] projects = null;
switch (kind) {
case IncrementalProjectBuilder.CLEAN_BUILD:
clean(monitor);
break;
case IncrementalProjectBuilder.FULL_BUILD:
projects = fullBuild(args, monitor);
break;
case IncrementalProjectBuilder.AUTO_BUILD:
case IncrementalProjectBuilder.INCREMENTAL_BUILD:
projects = incrementalBuild(args, monitor);
break;
}
return projects;
}
示例2: shouldBuild
protected boolean shouldBuild(int kind, IManagedBuildInfo info) {
IConfiguration cfg = info.getDefaultConfiguration();
IBuilder builder = null;
if (cfg != null) {
builder = cfg.getEditableBuilder();
switch (kind) {
case IncrementalProjectBuilder.AUTO_BUILD :
return true;
case IncrementalProjectBuilder.INCREMENTAL_BUILD : // now treated as the same!
case IncrementalProjectBuilder.FULL_BUILD :
return builder.isFullBuildEnabled() | builder.isIncrementalBuildEnabled() ;
case IncrementalProjectBuilder.CLEAN_BUILD :
return builder.isCleanBuildEnabled();
}
}
return true;
}
示例3: build
/**
* Run the builder.
*
* @see IncrementalProjectBuilder#build
*/
@SuppressWarnings("rawtypes")
@Override
protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
monitor.subTask("Running FindBugs...");
switch (kind) {
case IncrementalProjectBuilder.FULL_BUILD: {
FindBugs2Eclipse.cleanClassClache(getProject());
if (FindbugsPlugin.getUserPreferences(getProject()).isRunAtFullBuild()) {
if (DEBUG) {
System.out.println("FULL BUILD");
}
doBuild(args, monitor, kind);
} else {
// TODO probably worth to cleanup?
// MarkerUtil.removeMarkers(getProject());
}
break;
}
case IncrementalProjectBuilder.INCREMENTAL_BUILD: {
if (DEBUG) {
System.out.println("INCREMENTAL BUILD");
}
doBuild(args, monitor, kind);
break;
}
case IncrementalProjectBuilder.AUTO_BUILD: {
if (DEBUG) {
System.out.println("AUTO BUILD");
}
doBuild(args, monitor, kind);
break;
}
default: {
FindbugsPlugin.getDefault()
.logWarning("UKNOWN BUILD kind" + kind);
doBuild(args, monitor, kind);
break;
}
}
return null;
}
示例4: build
@Override
protected IProject[] build(int kind, Map<String, String> args, IProgressMonitor monitor) throws CoreException {
assertTrue(kind != CLEAN_BUILD);
if(kind == IncrementalProjectBuilder.AUTO_BUILD) {
return null; // Ignore auto build
}
ArrayList2<IProject> referenced =
ArrayList2.createFrom(getContext().getAllReferencedBuildConfigs())
.map((buildConfig) -> buildConfig.getProject())
.filterx(new ArrayList2<>(), (project) -> project.hasNature(LangCore.NATURE_ID))
;
ArrayList2<IProject> referencing =
ArrayList2.createFrom(getContext().getAllReferencingBuildConfigs())
.map((buildConfig) -> buildConfig.getProject())
.filterx(new ArrayList2<>(), (project) -> project.hasNature(LangCore.NATURE_ID))
;
boolean firstCall = referenced.isEmpty();
ArrayList2<IProject> allOurProjects = referencing;
allOurProjects.add(getProject());
if(!firstCall) {
return null;
}
try {
EclipseUtils.execute_asCore(monitor, (om) -> {
EclipseJobOperation job = buildManager.requestMultiBuild(om, allOurProjects, false);
if(!runAsynchronousBuild()) {
try {
job.join();
} catch(InterruptedException e) {
throw new OperationCancellation();
}
}
});
return null;
}
catch(OperationCancellation cancel) {
return null;
} catch(CoreException ce) {
if(monitor.isCanceled()) {
// This shouldn't usually happen, a OperationCancellation should have been thrown,
// but sometimes its not wrapped correctly.
return null;
}
EclipseCore.logStatus(ce);
throw ce;
}
}