Package org.eclipse.cdt.core.resources
Class RefreshExclusion
- java.lang.Object
-
- org.eclipse.cdt.core.resources.RefreshExclusion
-
- All Implemented Interfaces:
java.lang.Cloneable
public abstract class RefreshExclusion extends java.lang.Object implements java.lang.CloneableA RefreshExclusion represents a rule for excluding certain resources from being refreshed. Clients should extend this class to provide support for their own custom exclusions. EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the CDT team.- Since:
- 5.3
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCLASS_ATTRIBUTE_NAMEstatic java.lang.StringCONTRIBUTOR_ID_ATTRIBUTE_NAMEstatic java.lang.StringDISPLAY_STRING_ATTRIBUTE_NAMEstatic java.lang.StringEXCLUSION_ELEMENT_NAMEstatic java.lang.StringEXCLUSION_TYPE_ATTRIBUTE_NAMEstatic java.lang.StringEXTENSION_DATA_ELEMENT_NAMEprotected java.lang.StringfContributorIdprotected java.util.List<ExclusionInstance>fExclusionInstanceListprotected ExclusionTypefExclusionTypestatic java.lang.StringFILE_VALUEprotected java.util.List<RefreshExclusion>fNestedExclusionsstatic java.lang.StringFOLDER_VALUEprotected RefreshExclusionfParentExclusionprotected org.eclipse.core.resources.IResourcefParentResourcestatic java.lang.StringINSTANCE_ELEMENT_NAMEstatic java.lang.StringRESOURCE_VALUEstatic java.lang.StringWORKSPACE_PATH_ATTRIBUTE_NAME
-
Constructor Summary
Constructors Constructor Description RefreshExclusion()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddExclusionInstance(ExclusionInstance exclusionInstance)Adds an instance to the list of instances of this exclusion.voidaddNestedExclusion(RefreshExclusion exclusion)abstract java.lang.Objectclone()protected voidcopyTo(RefreshExclusion destination)Duplicate this refresh exclusion to the given one.java.lang.StringgetContributorId()java.util.List<ExclusionInstance>getExclusionInstances()ExclusionTypegetExclusionType()abstract java.lang.StringgetName()java.util.List<RefreshExclusion>getNestedExclusions()RefreshExclusiongetParentExclusion()If this is a nested exclusion, returns the exclusion which is the direct parent of this one.org.eclipse.core.resources.IResourcegetParentResource()If this exclusion is a direct descendant of a resource, returns that resource.static java.util.List<RefreshExclusion>loadData(ICStorageElement parentElement, RefreshExclusion parentExclusion, org.eclipse.core.resources.IResource parentResource, RefreshScopeManager manager)protected voidloadExtendedData(ICStorageElement grandchild)voidpersistData(ICStorageElement parentElement)protected voidpersistExtendedData(ICStorageElement extensionElement)voidremoveExclusionInstance(ExclusionInstance exclusionInstance)Removes an exclusion instance from the list of instances of this exclusion.voidremoveNestedExclusion(RefreshExclusion exclusion)Removes the given nested exclusion.voidsetContributorId(java.lang.String id)voidsetExclusionType(ExclusionType exclusionType)voidsetParentExclusion(RefreshExclusion parent)voidsetParentResource(org.eclipse.core.resources.IResource parentResource)Sets the parent resource of this exclusion.abstract booleansupportsExclusionInstances()abstract booleantestExclusion(org.eclipse.core.resources.IResource resource)Tests a given resource to see if this exclusion applies to it.booleantestExclusionChain(org.eclipse.core.resources.IResource resource)Tests this exclusion and recursively test all of its nested exclusions to determine whether this exclusion should be triggered or not.
-
-
-
Field Detail
-
CLASS_ATTRIBUTE_NAME
public static final java.lang.String CLASS_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
CONTRIBUTOR_ID_ATTRIBUTE_NAME
public static final java.lang.String CONTRIBUTOR_ID_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
DISPLAY_STRING_ATTRIBUTE_NAME
public static final java.lang.String DISPLAY_STRING_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
EXCLUSION_ELEMENT_NAME
public static final java.lang.String EXCLUSION_ELEMENT_NAME
- See Also:
- Constant Field Values
-
EXCLUSION_TYPE_ATTRIBUTE_NAME
public static final java.lang.String EXCLUSION_TYPE_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
EXTENSION_DATA_ELEMENT_NAME
public static final java.lang.String EXTENSION_DATA_ELEMENT_NAME
- See Also:
- Constant Field Values
-
FILE_VALUE
public static final java.lang.String FILE_VALUE
- See Also:
- Constant Field Values
-
FOLDER_VALUE
public static final java.lang.String FOLDER_VALUE
- See Also:
- Constant Field Values
-
INSTANCE_ELEMENT_NAME
public static final java.lang.String INSTANCE_ELEMENT_NAME
- See Also:
- Constant Field Values
-
RESOURCE_VALUE
public static final java.lang.String RESOURCE_VALUE
- See Also:
- Constant Field Values
-
WORKSPACE_PATH_ATTRIBUTE_NAME
public static final java.lang.String WORKSPACE_PATH_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
fContributorId
protected java.lang.String fContributorId
-
fExclusionInstanceList
protected java.util.List<ExclusionInstance> fExclusionInstanceList
-
fExclusionType
protected ExclusionType fExclusionType
-
fNestedExclusions
protected java.util.List<RefreshExclusion> fNestedExclusions
-
fParentExclusion
protected RefreshExclusion fParentExclusion
-
fParentResource
protected org.eclipse.core.resources.IResource fParentResource
-
-
Method Detail
-
loadData
public static java.util.List<RefreshExclusion> loadData(ICStorageElement parentElement, RefreshExclusion parentExclusion, org.eclipse.core.resources.IResource parentResource, RefreshScopeManager manager) throws org.eclipse.core.runtime.CoreException
- Throws:
org.eclipse.core.runtime.CoreException
-
addExclusionInstance
public void addExclusionInstance(ExclusionInstance exclusionInstance)
Adds an instance to the list of instances of this exclusion.- Parameters:
exclusionInstance-
-
addNestedExclusion
public void addNestedExclusion(RefreshExclusion exclusion)
-
getContributorId
public java.lang.String getContributorId()
- Returns:
- a String corresponding to the ID of the RefreshExclusionContributor that was used to create this exclusion.
-
getExclusionInstances
public java.util.List<ExclusionInstance> getExclusionInstances()
- Returns:
- an unmodifiable list of all the instance of this exclusion
-
getExclusionType
public ExclusionType getExclusionType()
-
getName
public abstract java.lang.String getName()
- Returns:
- a String corresponding to the human-readable name for this exclusion.
-
getNestedExclusions
public java.util.List<RefreshExclusion> getNestedExclusions()
- Returns:
- an unmodifiable list of exclusions to this exclusion.
-
getParentExclusion
public RefreshExclusion getParentExclusion()
If this is a nested exclusion, returns the exclusion which is the direct parent of this one.- Returns:
- RefreshExclusion
-
getParentResource
public org.eclipse.core.resources.IResource getParentResource()
If this exclusion is a direct descendant of a resource, returns that resource. Otherwise, returns null;- Returns:
- IResource
-
loadExtendedData
protected void loadExtendedData(ICStorageElement grandchild)
-
persistData
public void persistData(ICStorageElement parentElement)
-
persistExtendedData
protected void persistExtendedData(ICStorageElement extensionElement)
-
removeExclusionInstance
public void removeExclusionInstance(ExclusionInstance exclusionInstance)
Removes an exclusion instance from the list of instances of this exclusion.- Parameters:
exclusionInstance-
-
removeNestedExclusion
public void removeNestedExclusion(RefreshExclusion exclusion)
Removes the given nested exclusion. The exclusion must be a direct child of this exclusion.- Parameters:
exclusion-
-
setContributorId
public void setContributorId(java.lang.String id)
-
setExclusionType
public void setExclusionType(ExclusionType exclusionType)
-
setParentExclusion
public void setParentExclusion(RefreshExclusion parent)
-
setParentResource
public void setParentResource(org.eclipse.core.resources.IResource parentResource)
Sets the parent resource of this exclusion.- Parameters:
parentResource- the parent resource to set
-
supportsExclusionInstances
public abstract boolean supportsExclusionInstances()
- Returns:
- true if this exclusion supports exclusion instances
-
testExclusion
public abstract boolean testExclusion(org.eclipse.core.resources.IResource resource)
Tests a given resource to see if this exclusion applies to it.- Parameters:
resource- the resource to be tested.- Returns:
- true if the resource triggers the exclusion, false otherwise (including if this exclusion does not apply).
-
testExclusionChain
public boolean testExclusionChain(org.eclipse.core.resources.IResource resource)
Tests this exclusion and recursively test all of its nested exclusions to determine whether this exclusion should be triggered or not.- Parameters:
resource- the resource to be tested- Returns:
- true if the exclusion is triggered, false otherwise (including if this exclusion does not apply)
-
copyTo
protected void copyTo(RefreshExclusion destination)
Duplicate this refresh exclusion to the given one.- Parameters:
destination- - the refresh exclusion to be modified- Since:
- 5.4
-
clone
public abstract java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
-