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 |
} |