org.eclipse.xtext.resource.containers
Class StateBasedContainerManager

java.lang.Object
  extended by org.eclipse.xtext.resource.containers.StateBasedContainerManager
All Implemented Interfaces:
IContainer.Manager

public class StateBasedContainerManager
extends java.lang.Object
implements IContainer.Manager

Author:
Sebastian Zarnekow - Initial contribution and API, Sven Efftinge

Constructor Summary
StateBasedContainerManager()
           
 
Method Summary
protected  IContainer createContainer(java.lang.String handle, IResourceDescriptions resourceDescriptions)
           
 IContainer getContainer(IResourceDescription desc, IResourceDescriptions resourceDescriptions)
           
 IAllContainersState.Provider getStateProvider()
           
 java.util.List<IContainer> getVisibleContainers(IResourceDescription desc, IResourceDescriptions resourceDescriptions)
           
protected  java.util.List<IContainer> getVisibleContainers(java.util.List<java.lang.String> handles, IResourceDescriptions resourceDescriptions)
           
protected  java.lang.String internalGetContainerHandle(IResourceDescription desc, IResourceDescriptions resourceDescriptions)
           
 void setStateProvider(IAllContainersState.Provider stateProvider)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateBasedContainerManager

public StateBasedContainerManager()
Method Detail

getContainer

public IContainer getContainer(IResourceDescription desc,
                               IResourceDescriptions resourceDescriptions)
Specified by:
getContainer in interface IContainer.Manager
Returns:
returns the container for a given IResourceDescription. The result is never null.

getVisibleContainers

public java.util.List<IContainer> getVisibleContainers(IResourceDescription desc,
                                                       IResourceDescriptions resourceDescriptions)
Specified by:
getVisibleContainers in interface IContainer.Manager
Returns:
a sorted list of all IContainer, which are visible from the given IResourceDescription. In an Java environment this would correspond to the list of class-path entries. The list includes the container that contains the given resource description. However, the result may be empty due to internal errors.

createContainer

protected IContainer createContainer(java.lang.String handle,
                                     IResourceDescriptions resourceDescriptions)

getVisibleContainers

protected java.util.List<IContainer> getVisibleContainers(java.util.List<java.lang.String> handles,
                                                          IResourceDescriptions resourceDescriptions)

internalGetContainerHandle

protected java.lang.String internalGetContainerHandle(IResourceDescription desc,
                                                      IResourceDescriptions resourceDescriptions)

getStateProvider

public IAllContainersState.Provider getStateProvider()

setStateProvider

public void setStateProvider(IAllContainersState.Provider stateProvider)