Class PathEntryContainerInitializer


  • public abstract class PathEntryContainerInitializer
    extends Object
    • Constructor Detail

      • PathEntryContainerInitializer

        public PathEntryContainerInitializer()
        Creates a new cpath container initializer.
    • Method Detail

      • 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)
        Returns true if this container initializer can be requested to perform updates on its own container values. If so, then an update request will be performed using PathEntryContainerInitializer#requestPathEntryContainerUpdate/

        Parameters:
        containerPath - the path of the container which requires to be updated
        project - 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 updated
        project - the project for which the container is to be updated
        containerSuggestion - a suggestion to update the corresponding container definition
        Throws:
        org.eclipse.core.runtime.CoreException - when CoreModel#setPathEntryContainer would throw any.
        See Also:
        CoreModel.setPathEntryContainer(ICProject[], IPathEntryContainer, org.eclipse.core.runtime.IProgressMonitor), canUpdatePathEntryContainer(IPath, ICProject)
      • getDescription

        public String getDescription​(org.eclipse.core.runtime.IPath containerPath,
                                     ICProject project)