Package org.eclipse.cdt.core.model
Class PathEntryContainerInitializer
java.lang.Object
org.eclipse.cdt.core.model.PathEntryContainerInitializer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canUpdatePathEntryContainer
(org.eclipse.core.runtime.IPath containerPath, ICProject project) Returnstrue
if this container initializer can be requested to perform updates on its own container values.getDescription
(org.eclipse.core.runtime.IPath containerPath, ICProject project) abstract void
initialize
(org.eclipse.core.runtime.IPath containerPath, ICProject project) void
requestPathEntryContainerUpdate
(org.eclipse.core.runtime.IPath containerPath, ICProject project, IPathEntryContainer containerSuggestion) Request a registered container definition to be updated according to a container suggestion.
-
Constructor Details
-
PathEntryContainerInitializer
public PathEntryContainerInitializer()Creates a new cpath container initializer.
-
-
Method Details
-
initialize
public abstract void initialize(org.eclipse.core.runtime.IPath containerPath, ICProject project) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
canUpdatePathEntryContainer
public boolean canUpdatePathEntryContainer(org.eclipse.core.runtime.IPath containerPath, ICProject project) Returnstrue
if this container initializer can be requested to perform updates on its own container values. If so, then an update request will be performed usingPathEntryContainerInitializer#requestPathEntryContainerUpdate
/- Parameters:
containerPath
- the path of the container which requires to be updatedproject
- the project for which the container is to be updated- Returns:
- returns
true
if the container can be updated
-
requestPathEntryContainerUpdate
public void requestPathEntryContainerUpdate(org.eclipse.core.runtime.IPath containerPath, ICProject project, IPathEntryContainer containerSuggestion) throws org.eclipse.core.runtime.CoreException Request a registered container definition to be updated according to a container suggestion. The container suggestion only acts as a place-holder to pass along the information to update the matching container definition(s) held by the container initializer. In particular, it is not expected to store the container suggestion as is, but rather adjust the actual container definition based on suggested changes.IMPORTANT: In reaction to receiving an update request, a container initializer will update the corresponding container definition (after reconciling changes) at its earliest convenience, using
CoreModel#setPathContainer(IPath, ICProject[], IPathEntryContainer[], IProgressMonitor)
. Until it does so, the update will not be reflected in the Java Model.In order to anticipate whether the container initializer allows to update its containers, the predicate
PathEntryContainerInitializer#canUpdatePathEntryContainer
should be used.- Parameters:
containerPath
- the path of the container which requires to be updatedproject
- the project for which the container is to be updatedcontainerSuggestion
- a suggestion to update the corresponding container definition- Throws:
org.eclipse.core.runtime.CoreException
- whenCoreModel#setPathEntryContainer
would throw any.- See Also:
-
getDescription
-