Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 148876 Details for
Bug 290549
Scheduling rule for IResource#setDerived(boolean, IProgressMonitor)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch_v01
290549_v01.txt (text/plain), 6.82 KB, created by
Pawel Pogorzelski
on 2009-10-06 08:49:53 EDT
(
hide
)
Description:
Patch_v01
Filename:
MIME Type:
Creator:
Pawel Pogorzelski
Created:
2009-10-06 08:49:53 EDT
Size:
6.82 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.core.resources >Index: src/org/eclipse/core/internal/resources/Rules.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Rules.java,v >retrieving revision 1.20 >diff -u -r1.20 Rules.java >--- src/org/eclipse/core/internal/resources/Rules.java 5 Oct 2009 21:40:29 -0000 1.20 >+++ src/org/eclipse/core/internal/resources/Rules.java 6 Oct 2009 12:52:34 -0000 >@@ -120,6 +120,15 @@ > } > > /** >+ * Obtains the scheduling rule from the appropriate factory for marking as derived operation. >+ */ >+ public ISchedulingRule derivedRule(IResource resource) { >+ if (resource.getType() == IResource.ROOT || resource.getType() == IResource.PROJECT) >+ return null; >+ return factoryFor(resource).derivedRule(resource); >+ } >+ >+ /** > * Obtains the scheduling rule from the appropriate factory for a marker change operation. > */ > public ISchedulingRule markerRule(IResource resource) { >Index: src/org/eclipse/core/resources/IResource.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/resources/IResource.java,v >retrieving revision 1.105 >diff -u -r1.105 IResource.java >--- src/org/eclipse/core/resources/IResource.java 5 Oct 2009 21:40:29 -0000 1.105 >+++ src/org/eclipse/core/resources/IResource.java 6 Oct 2009 12:52:34 -0000 >@@ -2345,6 +2345,7 @@ > * event notification. See <code>IResourceChangeEvent</code> for more details.</li> > * </ul> > * @see #isDerived() >+ * @see IResourceRuleFactory#derivedRule(IResource) > * @since 2.0 > * @deprecated Replaced by {@link #setDerived(boolean, IProgressMonitor)} which > * is a workspace operation and reports changes in resource deltas. >@@ -2402,6 +2403,7 @@ > * event notification. See <code>IResourceChangeEvent</code> for more details.</li> > * </ul> > * @see #isDerived() >+ * @see IResourceRuleFactory#derivedRule(IResource) > * @since 3.6 > */ > public void setDerived(boolean isDerived, IProgressMonitor monitor) throws CoreException; >Index: src/org/eclipse/core/resources/IResourceDelta.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceDelta.java,v >retrieving revision 1.28 >diff -u -r1.28 IResourceDelta.java >--- src/org/eclipse/core/resources/IResourceDelta.java 18 Sep 2009 14:47:34 -0000 1.28 >+++ src/org/eclipse/core/resources/IResourceDelta.java 6 Oct 2009 12:52:35 -0000 >@@ -405,6 +405,12 @@ > * <li><code>CONTENT</code> - The bytes contained by the resource have > * been altered, or <code>IResource.touch</code> has been called on > * the resource.</li> >+ * <li><code>COPIED_FROM</code> - The resource was copied from another location. >+ * The location in the "before" state can be retrieved using <code>getMovedFromPath()</code>. >+ * This flag is only used when describing potential changes using an >+ * {@link IResourceChangeDescriptionFactory}.</li> >+ * <li><code>DERIVED_CHANGED</code> - The derived flag of the resource may have >+ * been altered.</li> > * <li><code>ENCODING</code> - The encoding of the resource may have been altered. > * This flag is not set when the encoding changes due to the file being modified, > * or being moved.</li> >@@ -459,8 +465,11 @@ > * > * @return the flags > * @see IResourceDelta#CONTENT >+ * @see IResourceDelta#COPIED_FROM >+ * @see IResourceDelta#DERIVED_CHANGED > * @see IResourceDelta#DESCRIPTION > * @see IResourceDelta#ENCODING >+ * @see IResourceDelta#LOCAL_CHANGED > * @see IResourceDelta#OPEN > * @see IResourceDelta#MOVED_TO > * @see IResourceDelta#MOVED_FROM >Index: src/org/eclipse/core/resources/IResourceRuleFactory.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceRuleFactory.java,v >retrieving revision 1.14 >diff -u -r1.14 IResourceRuleFactory.java >--- src/org/eclipse/core/resources/IResourceRuleFactory.java 28 Apr 2009 21:37:06 -0000 1.14 >+++ src/org/eclipse/core/resources/IResourceRuleFactory.java 6 Oct 2009 12:52:35 -0000 >@@ -69,7 +69,17 @@ > * @return a scheduling rule, or <code>null</code> > * @since 3.1 > */ >- public ISchedulingRule charsetRule(IResource resource); >+ public ISchedulingRule charsetRule(IResource resource); >+ >+ /** >+ * Returns the scheduling rule that is required for marking resources >+ * as derived. >+ * >+ * @param resource the resource to be marked as derived >+ * @return a scheduling rule, or <code>null</code> >+ * @since 3.6 >+ */ >+ public ISchedulingRule derivedRule(IResource resource); > > /** > * Returns the scheduling rule that is required for copying a resource. >Index: src/org/eclipse/core/resources/team/ResourceRuleFactory.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/resources/team/ResourceRuleFactory.java,v >retrieving revision 1.12 >diff -u -r1.12 ResourceRuleFactory.java >--- src/org/eclipse/core/resources/team/ResourceRuleFactory.java 25 Jan 2008 23:17:10 -0000 1.12 >+++ src/org/eclipse/core/resources/team/ResourceRuleFactory.java 6 Oct 2009 12:52:35 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004, 2008 IBM Corporation and others. >+ * Copyright (c) 2004, 2009 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -68,6 +68,26 @@ > } > > /** >+ * Default implementation of <code>IResourceRuleFactory#derivedRule</code>. >+ * This default implementation always returns the resource that is to be >+ * marked as derived, or <code>null</code> if the resource is the workspace >+ * root or a project. >+ * <p> >+ * Subclasses may override this method. The rule provided by an overriding >+ * method must at least contain the rule from this default implementation. >+ * </p> >+ * >+ * @see org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule) >+ * @see org.eclipse.core.resources.IResourceRuleFactory#derivedRule(IResource) >+ * @since 3.6 >+ */ >+ public ISchedulingRule derivedRule(IResource resource) { >+ if (resource.getType() == IResource.ROOT || resource.getType() == IResource.PROJECT) >+ return null; >+ return resource; >+ } >+ >+ /** > * Default implementation of <code>IResourceRuleFactory#copyRule</code>. > * This default implementation always returns the parent of the destination > * resource.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 290549
:
148876
|
149230