View | Details | Raw Unified | Return to bug 306822 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/core/internal/events/BuildManager.java (-2 / +2 lines)
Lines 996-1002 Link Here
996
					try {
996
					try {
997
						IncrementalProjectBuilder builder = getBuilder(project, command, i, status);
997
						IncrementalProjectBuilder builder = getBuilder(project, command, i, status);
998
						if (builder != null) {
998
						if (builder != null) {
999
							ISchedulingRule builderRule = builder.getRule();
999
							ISchedulingRule builderRule = builder.getRule(trigger, args);
1000
							if (builderRule != null)
1000
							if (builderRule != null)
1001
								rules.add(builderRule);
1001
								rules.add(builderRule);
1002
						}
1002
						}
Lines 1014-1020 Link Here
1014
			try {
1014
			try {
1015
				IncrementalProjectBuilder builder = getBuilder(project, command, -1, status);
1015
				IncrementalProjectBuilder builder = getBuilder(project, command, -1, status);
1016
				if (builder != null)
1016
				if (builder != null)
1017
					return builder.getRule();
1017
					return builder.getRule(trigger, args);
1018
1018
1019
			} catch (CoreException e) {
1019
			} catch (CoreException e) {
1020
				status.add(e.getStatus());
1020
				status.add(e.getStatus());
(-)src/org/eclipse/core/resources/IncrementalProjectBuilder.java (+51 lines)
Lines 388-391 Link Here
388
	public ISchedulingRule getRule() {
388
	public ISchedulingRule getRule() {
389
		return ResourcesPlugin.getWorkspace().getRoot();
389
		return ResourcesPlugin.getWorkspace().getRoot();
390
	}
390
	}
391
392
	/**
393
	 * Returns the scheduling rule that is required for building 
394
	 * the project for which this builder is defined. The default 
395
	 * is {@link #getRule()}.
396
	 * <p>
397
	 * The scheduling rule determines which resources in the workspace are 
398
	 * protected from being modified by other threads while the builder is running. Up until
399
	 * Eclipse 3.5, the entire workspace was always locked during a build;
400
	 * since Eclipse 3.6, builders can allow resources outside their scheduling
401
	 * rule to be modified.
402
	 * <p>
403
	 * <strong>Notes:</strong>
404
	 * <ul>
405
	 * <li>
406
	 * If the builder rule is non-<code>null</code> it must be "contained" in the workspace root rule.
407
	 * I.e. {@link ISchedulingRule#contains(ISchedulingRule)} must return 
408
	 * <code>true</code> when invoked on the workspace root with the builder rule.
409
	 * </li>
410
	 * <li>
411
	 * The rule returned here may have no effect if the build is invoked within the 
412
	 * scope of another operation that locks the entire workspace.
413
     * </li>
414
     * <li>
415
	 * If this method returns any rule other than the workspace root,
416
	 * resources outside of the rule scope can be modified concurrently with the build. 
417
	 * The delta returned by {@link #getDelta(IProject)} for any project
418
	 * outside the scope of the builder's rule will not contain changes that occurred 
419
	 * concurrently with the build.
420
	 * </ul>
421
	 * </p>
422
	 * 
423
	 * @param trigger the type of build being triggered. Valid values are
424
	 * <ul>
425
	 * <li>{@link #FULL_BUILD} - indicates a full build.</li>
426
	 * <li>{@link #INCREMENTAL_BUILD}- indicates an incremental build.</li>
427
	 * <li>{@link #AUTO_BUILD} - indicates an automatically triggered
428
	 * incremental build (autobuilding on).</li>
429
	 * <li>{@link #CLEAN_BUILD} - indicates a clean build
430
	 * </ul>
431
	 * This may be different {@link #build(int, Map, IProgressMonitor)} kind.
432
	 * @param args a table of builder-specific arguments keyed by argument name
433
	 * (key type: <code>String</code>, value type: <code>String</code>);
434
	 * <code>null</code> is equivalent to an empty map
435
	 * @return a scheduling rule which is contained in the workspace root rule or <code>null</code>
436
	 * 
437
	 * @since 3.6
438
	 */
439
	public ISchedulingRule getRule(int trigger, Map args) {
440
		return getRule();
441
	}
391
}
442
}

Return to bug 306822