本文整理汇总了Java中org.eclipse.core.resources.IncrementalProjectBuilder.CLEAN_BUILD属性的典型用法代码示例。如果您正苦于以下问题:Java IncrementalProjectBuilder.CLEAN_BUILD属性的具体用法?Java IncrementalProjectBuilder.CLEAN_BUILD怎么用?Java IncrementalProjectBuilder.CLEAN_BUILD使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.core.resources.IncrementalProjectBuilder
的用法示例。
在下文中一共展示了IncrementalProjectBuilder.CLEAN_BUILD属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: build
/**
* {@inheritDoc}
*/
@Override
protected IProject[] build(final int kind, final Map<String, String> args, final IProgressMonitor monitor) throws CoreException {
try {
final Optional<? extends FeedbackJavaProject> javaProjectOptional = this.getFeedbackJavaResourceFactory().create(getProject());
if (javaProjectOptional.isPresent()) {
final FeedbackJavaProject project = javaProjectOptional.get();
Logger.print(String.format("Triggered %S.", BuildTypes.INSTANCE.get(kind)));
if (kind == IncrementalProjectBuilder.FULL_BUILD || kind == IncrementalProjectBuilder.CLEAN_BUILD) {
fullBuild(project);
}
else {
incrementalBuild(project);
}
}
}
catch (final RequestException e) {
new RequestExceptionHandler().handle(getProject(), e);
}
return null;
}
示例2: 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;
}
示例3: 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;
}
示例4: invokeBuild
@Override
public boolean invokeBuild(int kind, IProject project,
IConfiguration configuration, IBuilder builder, IConsole console,
IMarkerGenerator markerGenerator,
IncrementalProjectBuilder projectBuilder, IProgressMonitor monitor)
throws CoreException {
/*
* wrap the passed-in builder into one that gets its build command from the
* Cmake-generator. First do a sanity check.
*/
if (builder.getBaseId().equals("de.marw.cdt.cmake.core.genscriptbuilder")) {
final ICConfigurationDescription cfgd = ManagedBuildManager
.getDescriptionForConfiguration(configuration);
if (kind == IncrementalProjectBuilder.CLEAN_BUILD) {
// avoid calling 'rm -rf' if it is a clean build and the build dir was
// deleted
final IPath builderCWD = cfgd.getBuildSetting().getBuilderCWD();
final IPath location = ResourcesPlugin.getWorkspace().getRoot().getFile(builderCWD).getLocation();
if (location == null || !location.toFile().exists()) {
return true; // is clean
}
}
final CMakePreferences prefs = ConfigurationManager.getInstance()
.getOrLoad(cfgd);
final AbstractOsPreferences osPrefs = AbstractOsPreferences
.extractOsPreferences(prefs);
// try to get CMAKE_BUILD_TOOL entry from CMakeCache.txt...
final CmakeGenerator generator = osPrefs.getGenerator();
String buildscriptProcessorCmd = getCommandFromCMakeCache(cfgd,
generator != osPrefs.getGeneratedWith());
if (buildscriptProcessorCmd == null) {
// fall back to values from OS preferences
buildscriptProcessorCmd = osPrefs.getBuildscriptProcessorCommand();
if (buildscriptProcessorCmd == null) {
// fall back to built-in defaults from CMake generator
buildscriptProcessorCmd = generator.getBuildscriptProcessorCommand();
}
}
builder = new CmakeBuildToolInjectorBuilder(builder,
buildscriptProcessorCmd, generator);
}
return super.invokeBuild(kind, project, configuration, builder, console,
markerGenerator, projectBuilder, monitor);
}