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


Java IncrementalProjectBuilder.FULL_BUILD属性代码示例

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


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

示例1: getParserForBuilder

/**
 * @param buildType single element array; element may be altered to indicate
 *                  actual required build type
 */
public static PgDbParser getParserForBuilder(IProject proj, int[] buildType) {
    PgDbParser pnew = new PgDbParser();
    PgDbParser p = PROJ_PARSERS.putIfAbsent(proj, pnew);
    if (p == null) {
        p = pnew;
        // prepare newly created parser
        ResourcesPlugin.getWorkspace().addResourceChangeListener(p,
                IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE);

        if (buildType == null) {
            // not a builder call, start builder
            startBuildJob(proj);
        } else {
            // builder call, change build type to FULL for new parsers
            buildType[0] = IncrementalProjectBuilder.FULL_BUILD;
        }
    }
    return p;
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:23,代码来源:PgDbParser.java

示例2: build

@Override
protected IProject[] build(int kind, Map<String, String> args, IProgressMonitor monitor) throws CoreException {

	if (AsciidocInstance.INSTANCE.getAsciidoctor() == null) {
		return new IProject[0];
	}

	try {
		if (kind == IncrementalProjectBuilder.FULL_BUILD) {
			AsciidocBuildHelper.fullBuild(getProject(), monitor);
		} else {
			AsciidocBuildHelper.incrementalBuild(getProject(), getDelta(getProject()), monitor);
		}
	} catch (Exception e) {
		Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e));
	}
	return new IProject[0];
}
 
开发者ID:awltech,项目名称:eclipse-asciidoctools,代码行数:18,代码来源:AsciidocProjectBuilder.java

示例3: build

@Override
protected IProject[] build(int kind, Map<String, String> args, IProgressMonitor monitor) throws CoreException {
	
	if (kind == IncrementalProjectBuilder.FULL_BUILD) {
		fullBuild(monitor);
	} else {
		IResourceDelta delta = getDelta(getProject());
		if (delta == null) {
			fullBuild(monitor);
		} else {
			incrementalBuild(delta, monitor);
		}
	}
	
	return null;
}
 
开发者ID:Imhotup,项目名称:LibertyEiffel-Eclipse-Plugin,代码行数:16,代码来源:EiffelProjectBuilder.java

示例4: 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;
}
 
开发者ID:sealuzh,项目名称:PerformanceHat,代码行数:23,代码来源:FeedbackBuilder.java

示例5: 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;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:20,代码来源:PlanResourceIncrementalProjectBuilder.java

示例6: 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;
}
 
开发者ID:rungemar,项目名称:cmake4cdt,代码行数:17,代码来源:CMakeProjectBuilderImpl.java

示例7: build

@Override
protected IProject[] build(final int kind, @SuppressWarnings("rawtypes") final Map args, final IProgressMonitor monitor) throws CoreException {
    final IProject project = getProject();

    monitor.beginTask("Building Apache Karaf project: " + project.getName(), 1);

    try {
        if (kind == IncrementalProjectBuilder.FULL_BUILD) {
            fullBuild(monitor);
        } else {
            final IResourceDelta delta = getDelta(getProject());
            if (delta == null) {
                fullBuild(monitor);
            } else {
                incrementalBuild(delta, monitor);
            }
        }

        getProject().refreshLocal(IResource.DEPTH_INFINITE, monitor);
    } finally {
        monitor.done();
    }

    return null;
}
 
开发者ID:apache,项目名称:karaf-eik,代码行数:25,代码来源:KarafProjectBuilder.java

示例8: build

@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
protected IProject[] build(int kind, Map args, IProgressMonitor monitor)
		throws CoreException {
	IProject[] retval = super.build(kind, args, monitor);
	if (kind == IncrementalProjectBuilder.FULL_BUILD) {
		fullBuild(monitor);
	} else {
		IResourceDelta delta = getDelta(project);
		if (delta == null) {
			fullBuild(monitor);
		} else {
			incrementalBuild(delta, monitor);
		}
	}
	return retval;
}
 
开发者ID:interdroid,项目名称:cuckoo-plugin,代码行数:17,代码来源:CuckooBuilder.java

示例9: startBuildJob

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,代码行数:7,代码来源:PgDbParser.java

示例10: build

@Override
protected IProject[] build(int kind, Map args, IProgressMonitor monitor) {
	if (kind == IncrementalProjectBuilder.FULL_BUILD) {
		fullBuild(monitor);
	} else {
		IResourceDelta delta = getDelta(getProject());
		if (delta == null) {
			fullBuild(monitor);
		} else {
			incrementalBuild(delta, monitor);
		}
	}
	return null;
}
 
开发者ID:glovas,项目名称:psd-ui-generator,代码行数:14,代码来源:Builder.java

示例11: build

protected IProject[] build(int kind, Map args, IProgressMonitor monitor) {
	if (kind == IncrementalProjectBuilder.FULL_BUILD) {
		build(monitor);
	} else {
		IResourceDelta delta = getDelta(getProject());
		if (delta == null) {
			build(monitor);
		} else {
			incrementalBuild(delta, monitor);
		}
	}
	return null;
}
 
开发者ID:ibcn-cloudlet,项目名称:androsgi,代码行数:13,代码来源:AndroidOSGiBuilder.java

示例12: build

@SuppressWarnings("rawtypes")
@Override
protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException
{
	traceParticipantsEnabled = IdeLog.isTraceEnabled(BuildPathCorePlugin.getDefault(),
			IDebugScopes.BUILDER_PARTICIPANTS);

	boolean logTraceEnabled = traceLoggingEnabled();

	IProject project = getProjectHandle();
	String projectName = project.getName();
	long startTime = System.nanoTime();

	SubMonitor sub = SubMonitor.convert(monitor, 100);

	// Keep these build participant instances and use them in the build process, rather than grabbing new ones
	// in sub-methods. We do pre- and post- setups on them, so we need to retain instances.
	IBuildParticipantManager manager = getBuildParticipantManager();
	if (manager == null)
	{
		return new IProject[0];
	}
	List<IBuildParticipant> participants = manager.getAllBuildParticipants();
	participants = filterToEnabled(participants, project);
	buildStarting(participants, kind, sub.newChild(10));

	if (kind == IncrementalProjectBuilder.FULL_BUILD)
	{
		if (logTraceEnabled)
		{
			logTrace(MessageFormat.format(Messages.UnifiedBuilder_PerformingFullBuld, projectName));
		}
		fullBuild(participants, sub.newChild(80));
	}
	else
	{
		IResourceDelta delta = getResourceDelta();
		if (delta == null)
		{
			if (logTraceEnabled)
			{
				logTrace(MessageFormat.format(Messages.UnifiedBuilder_PerformingFullBuildNullDelta, projectName));
			}
			fullBuild(participants, sub.newChild(80));
		}
		else
		{
			if (logTraceEnabled)
			{
				logTrace(MessageFormat.format(Messages.UnifiedBuilder_PerformingIncrementalBuild, projectName));
			}
			incrementalBuild(participants, delta, sub.newChild(80));
		}
	}

	buildEnding(participants, sub.newChild(10));

	if (logTraceEnabled)
	{
		double endTime = ((double) System.nanoTime() - startTime) / 1000000;
		logTrace(MessageFormat.format(Messages.UnifiedBuilder_FinishedBuild, projectName, endTime));
	}
	return null;
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:64,代码来源:UnifiedBuilder.java

示例13: 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;
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:47,代码来源:FindBugsBuilder.java

示例14: doBuild

/**
 * Performs the build process. This method gets all files in the current
 * project and has a <code>FindBugsVisitor</code> run on them.
 *
 * @param args
 *            A <code>Map</code> containing additional build parameters.
 * @param monitor
 *            The <code>IProgressMonitor</code> displaying the build
 *            progress.
 * @param kind
 *            kind the kind of build being requested, see
 *            IncrementalProjectBuilder
 * @throws CoreException
 */
private void doBuild(final Map<?, ?> args, final IProgressMonitor monitor, int kind) throws CoreException {
    boolean incremental = (kind != IncrementalProjectBuilder.FULL_BUILD);
    IProject project = getProject();
    IResource resource = project;
    List<WorkItem> files;
    if (incremental) {
        IResourceDelta resourceDelta = getDelta(project);
        boolean configChanged = !isConfigUnchanged(resourceDelta);
        boolean fullBuildEnabled = FindbugsPlugin.getCorePreferences(getProject(), configChanged).isRunAtFullBuild();
        if (configChanged && fullBuildEnabled) {
            files = new ArrayList<WorkItem>();
            files.add(new WorkItem(project));
        } else {
            files = ResourceUtils.collectIncremental(resourceDelta);
            /*
             * Here we expect to have only ONE file as a result of a
             * post-save trigger. In this case incremental builder should
             * run and analyse 1 file again. For some reason, JDT uses
             * "AUTO" kind for such incremental compile. Unfortunately,
             * Eclipse also triggers "AUTO" build on startup, if it detects
             * that some project files are changed (I think also on team
             * update operations). This causes sometimes a real startup
             * slowdown for workspaces with many projects. Because we cannot
             * distinguish between first and second build, and if
             * "fullBuildEnabled" id OFF, we will analyse incrementally ONLY
             * ONE SINGLE FILE. This is not nice, but there is no other ways
             * today... May be we can use preferences to define "how many"
             * is "incremental"...
             */
            if (files.size() > 1) {
                if (DEBUG) {
                    FindbugsPlugin.getDefault()
                            .logInfo(
                                    "Incremental builder: too many resources to analyse for project " + project + ", files: "
                                            + files);
                }
                return;
            } else if(files.size() == 1){
                IResource corespondingResource = files.get(0).getCorespondingResource();
                if(corespondingResource != null) {
                    resource = corespondingResource;
                }
            }
        }
    } else {
        files = new ArrayList<WorkItem>();
        files.add(new WorkItem(project));
    }

    work(resource, files, monitor);
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:65,代码来源:FindBugsBuilder.java


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