Eclipse CDT
Pre-release 3.0

org.eclipse.cdt.core.model
Class PathEntryContainerInitializer

java.lang.Object
  extended by org.eclipse.cdt.core.model.PathEntryContainerInitializer

public abstract class PathEntryContainerInitializer
extends Object


Constructor Summary
PathEntryContainerInitializer()
          Creates a new cpath container initializer.
 
Method Summary
 boolean canUpdatePathEntryContainer(IPath containerPath, ICProject project)
          Returns true if this container initializer can be requested to perform updates on its own container values.
 String getDescription(IPath containerPath, ICProject project)
           
abstract  void initialize(IPath containerPath, ICProject project)
           
 void requestPathEntryContainerUpdate(IPath containerPath, ICProject project, IPathEntryContainer containerSuggestion)
          Request a registered container definition to be updated according to a container suggestion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathEntryContainerInitializer

public PathEntryContainerInitializer()
Creates a new cpath container initializer.

Method Detail

initialize

public abstract void initialize(IPath containerPath,
                                ICProject project)
                         throws CoreException
Throws:
CoreException

canUpdatePathEntryContainer

public boolean canUpdatePathEntryContainer(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(IPath containerPath,
                                            ICProject project,
                                            IPathEntryContainer containerSuggestion)
                                     throws 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:
CoreException - when CoreModel#setPathEntryContainer would throw any.
See Also:
CoreModel#setPathEntryContainer(IPath, ICProject[], IPathEntryContainer[], org.eclipse.core.runtime.IProgressMonitor), PathContainerInitializer#canUpdatePathContainer(IPath, ICProject)

getDescription

public String getDescription(IPath containerPath,
                             ICProject project)

Eclipse CDT
Pre-release 3.0

Copyright (c) IBM Corp. and others 2004. All Rights Reserved.