Package org.eclipse.cdt.core.resources
Class RefreshExclusion
java.lang.Object
org.eclipse.cdt.core.resources.RefreshExclusion
- All Implemented Interfaces:
Cloneable
A 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
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
protected String
protected List<ExclusionInstance>
protected ExclusionType
static final String
protected List<RefreshExclusion>
static final String
protected RefreshExclusion
protected org.eclipse.core.resources.IResource
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExclusionInstance
(ExclusionInstance exclusionInstance) Adds an instance to the list of instances of this exclusion.void
addNestedExclusion
(RefreshExclusion exclusion) abstract Object
clone()
protected void
copyTo
(RefreshExclusion destination) Duplicate this refresh exclusion to the given one.abstract String
getName()
If this is a nested exclusion, returns the exclusion which is the direct parent of this one.org.eclipse.core.resources.IResource
If this exclusion is a direct descendant of a resource, returns that resource.static List<RefreshExclusion>
loadData
(ICStorageElement parentElement, RefreshExclusion parentExclusion, org.eclipse.core.resources.IResource parentResource, RefreshScopeManager manager) protected void
loadExtendedData
(ICStorageElement grandchild) void
persistData
(ICStorageElement parentElement) protected void
persistExtendedData
(ICStorageElement extensionElement) void
removeExclusionInstance
(ExclusionInstance exclusionInstance) Removes an exclusion instance from the list of instances of this exclusion.void
removeNestedExclusion
(RefreshExclusion exclusion) Removes the given nested exclusion.void
void
setExclusionType
(ExclusionType exclusionType) void
setParentExclusion
(RefreshExclusion parent) void
setParentResource
(org.eclipse.core.resources.IResource parentResource) Sets the parent resource of this exclusion.abstract boolean
abstract boolean
testExclusion
(org.eclipse.core.resources.IResource resource) Tests a given resource to see if this exclusion applies to it.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.
-
Field Details
-
CLASS_ATTRIBUTE_NAME
- See Also:
-
CONTRIBUTOR_ID_ATTRIBUTE_NAME
- See Also:
-
DISPLAY_STRING_ATTRIBUTE_NAME
- See Also:
-
EXCLUSION_ELEMENT_NAME
- See Also:
-
EXCLUSION_TYPE_ATTRIBUTE_NAME
- See Also:
-
EXTENSION_DATA_ELEMENT_NAME
- See Also:
-
FILE_VALUE
- See Also:
-
FOLDER_VALUE
- See Also:
-
INSTANCE_ELEMENT_NAME
- See Also:
-
RESOURCE_VALUE
- See Also:
-
WORKSPACE_PATH_ATTRIBUTE_NAME
- See Also:
-
fContributorId
-
fExclusionInstanceList
-
fExclusionType
-
fNestedExclusions
-
fParentExclusion
-
fParentResource
protected org.eclipse.core.resources.IResource fParentResource
-
-
Constructor Details
-
RefreshExclusion
public RefreshExclusion()
-
-
Method Details
-
loadData
public static 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
Adds an instance to the list of instances of this exclusion.- Parameters:
exclusionInstance
-
-
addNestedExclusion
-
getContributorId
- Returns:
- a String corresponding to the ID of the RefreshExclusionContributor that was used to create this exclusion.
-
getExclusionInstances
- Returns:
- an unmodifiable list of all the instance of this exclusion
-
getExclusionType
-
getName
- Returns:
- a String corresponding to the human-readable name for this exclusion.
-
getNestedExclusions
- Returns:
- an unmodifiable list of exclusions to this exclusion.
-
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
-
persistData
-
persistExtendedData
-
removeExclusionInstance
Removes an exclusion instance from the list of instances of this exclusion.- Parameters:
exclusionInstance
-
-
removeNestedExclusion
Removes the given nested exclusion. The exclusion must be a direct child of this exclusion.- Parameters:
exclusion
-
-
setContributorId
-
setExclusionType
-
setParentExclusion
-
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
Duplicate this refresh exclusion to the given one.- Parameters:
destination
- - the refresh exclusion to be modified- Since:
- 5.4
-
clone
-