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

Collapse All | Expand All

(-)src/org/eclipse/core/internal/resources/Rules.java (+9 lines)
Lines 120-125 Link Here
120
	}
120
	}
121
121
122
	/**
122
	/**
123
	 * Obtains the scheduling rule from the appropriate factory for marking as derived operation.
124
	 */
125
	public ISchedulingRule derivedRule(IResource resource) {
126
		if (resource.getType() == IResource.ROOT || resource.getType() == IResource.PROJECT)
127
			return null;
128
		return factoryFor(resource).derivedRule(resource);
129
	}
130
131
	/**
123
	 * Obtains the scheduling rule from the appropriate factory for a marker change operation.
132
	 * Obtains the scheduling rule from the appropriate factory for a marker change operation.
124
	 */
133
	 */
125
	public ISchedulingRule markerRule(IResource resource) {
134
	public ISchedulingRule markerRule(IResource resource) {
(-)src/org/eclipse/core/resources/IResource.java (+2 lines)
Lines 2345-2350 Link Here
2345
	 *       event notification. See <code>IResourceChangeEvent</code> for more details.</li>
2345
	 *       event notification. See <code>IResourceChangeEvent</code> for more details.</li>
2346
	 * </ul>
2346
	 * </ul>
2347
	 * @see #isDerived()
2347
	 * @see #isDerived()
2348
	 * @see IResourceRuleFactory#derivedRule(IResource)
2348
	 * @since 2.0
2349
	 * @since 2.0
2349
	 * @deprecated Replaced by {@link #setDerived(boolean, IProgressMonitor)} which 
2350
	 * @deprecated Replaced by {@link #setDerived(boolean, IProgressMonitor)} which 
2350
	 * is a workspace operation and reports changes in resource deltas.
2351
	 * is a workspace operation and reports changes in resource deltas.
Lines 2402-2407 Link Here
2402
	 *       event notification. See <code>IResourceChangeEvent</code> for more details.</li>
2403
	 *       event notification. See <code>IResourceChangeEvent</code> for more details.</li>
2403
	 * </ul>
2404
	 * </ul>
2404
	 * @see #isDerived()
2405
	 * @see #isDerived()
2406
	 * @see IResourceRuleFactory#derivedRule(IResource)
2405
	 * @since 3.6
2407
	 * @since 3.6
2406
	 */
2408
	 */
2407
	public void setDerived(boolean isDerived, IProgressMonitor monitor) throws CoreException;
2409
	public void setDerived(boolean isDerived, IProgressMonitor monitor) throws CoreException;
(-)src/org/eclipse/core/resources/IResourceDelta.java (+9 lines)
Lines 405-410 Link Here
405
	 * <li><code>CONTENT</code> - The bytes contained by the resource have 
405
	 * <li><code>CONTENT</code> - The bytes contained by the resource have 
406
	 * 		been altered, or <code>IResource.touch</code> has been called on 
406
	 * 		been altered, or <code>IResource.touch</code> has been called on 
407
	 * 		the resource.</li>
407
	 * 		the resource.</li>
408
	 * <li><code>COPIED_FROM</code> - The resource was copied from another location.
409
	 * The location in the "before" state can be retrieved using <code>getMovedFromPath()</code>.
410
	 * This flag is only used when describing potential changes using an
411
	 * {@link IResourceChangeDescriptionFactory}.</li>
412
	 * <li><code>DERIVED_CHANGED</code> - The derived flag of the resource may have
413
	 * been altered.</li>
408
	 * <li><code>ENCODING</code> - The encoding of the resource may have been altered.
414
	 * <li><code>ENCODING</code> - The encoding of the resource may have been altered.
409
	 * This flag is not set when the encoding changes due to the file being modified, 
415
	 * This flag is not set when the encoding changes due to the file being modified, 
410
	 * or being moved.</li>
416
	 * or being moved.</li>
Lines 459-466 Link Here
459
	 *
465
	 *
460
	 * @return the flags
466
	 * @return the flags
461
	 * @see IResourceDelta#CONTENT
467
	 * @see IResourceDelta#CONTENT
468
	 * @see IResourceDelta#COPIED_FROM
469
	 * @see IResourceDelta#DERIVED_CHANGED
462
	 * @see IResourceDelta#DESCRIPTION
470
	 * @see IResourceDelta#DESCRIPTION
463
	 * @see IResourceDelta#ENCODING
471
	 * @see IResourceDelta#ENCODING
472
	 * @see IResourceDelta#LOCAL_CHANGED
464
	 * @see IResourceDelta#OPEN
473
	 * @see IResourceDelta#OPEN
465
	 * @see IResourceDelta#MOVED_TO
474
	 * @see IResourceDelta#MOVED_TO
466
	 * @see IResourceDelta#MOVED_FROM
475
	 * @see IResourceDelta#MOVED_FROM
(-)src/org/eclipse/core/resources/IResourceRuleFactory.java (-1 / +11 lines)
Lines 69-75 Link Here
69
	 * @return a scheduling rule, or <code>null</code>
69
	 * @return a scheduling rule, or <code>null</code>
70
	 * @since 3.1
70
	 * @since 3.1
71
	 */
71
	 */
72
	public ISchedulingRule charsetRule(IResource resource);	
72
	public ISchedulingRule charsetRule(IResource resource);
73
74
	/**
75
	 * Returns the scheduling rule that is required for marking resources
76
	 * as derived.
77
	 *
78
	 * @param resource the resource to be marked as derived
79
	 * @return a scheduling rule, or <code>null</code>
80
	 * @since 3.6
81
	 */
82
	public ISchedulingRule derivedRule(IResource resource);
73
83
74
	/**
84
	/**
75
	 * Returns the scheduling rule that is required for copying a resource.
85
	 * Returns the scheduling rule that is required for copying a resource.
(-)src/org/eclipse/core/resources/team/ResourceRuleFactory.java (-1 / +21 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004, 2008 IBM Corporation and others.
2
 * Copyright (c) 2004, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 68-73 Link Here
68
	}
68
	}
69
69
70
	/**
70
	/**
71
	 * Default implementation of <code>IResourceRuleFactory#derivedRule</code>.
72
	 * This default implementation always returns the resource that is to be
73
	 * marked as derived, or <code>null</code> if the resource is the workspace
74
	 * root or a project.
75
	 * <p>
76
	 * Subclasses may override this method. The rule provided by an overriding 
77
	 * method must at least contain the rule from this default implementation.
78
	 * </p>
79
	 * 
80
	 * @see org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
81
	 * @see org.eclipse.core.resources.IResourceRuleFactory#derivedRule(IResource)
82
	 * @since 3.6
83
	 */
84
	public ISchedulingRule derivedRule(IResource resource) {
85
		if (resource.getType() == IResource.ROOT || resource.getType() == IResource.PROJECT)
86
			return null;
87
		return resource;
88
	}
89
90
	/**
71
	 * Default implementation of <code>IResourceRuleFactory#copyRule</code>.
91
	 * Default implementation of <code>IResourceRuleFactory#copyRule</code>.
72
	 * This default implementation always returns the parent of the destination
92
	 * This default implementation always returns the parent of the destination
73
	 * resource. 
93
	 * resource. 

Return to bug 290549