Runtime

## org.eclipse.gmf.runtime.emf.type.core
Interface IClientContext

All Known Implementing Classes:
  ClientContext, MultiClientContext

public interface IClientContext

Interface of an object that defines a context to which clients of the element type registry may bind element types and advice. This effectively selects the types and advice that are applicable to the model defined by a client.

This interface is not intended to be implemented outside of the element type framework.

Method Summary
`void` `bindId(java.lang.String typeId)` Binds a specific element type or advice to me.
`void` `bindPattern(java.util.regex.Pattern pattern)` Binds a pattern of element types and advice to me.
`java.util.Collection` `getChildren()` Returns a list of `IClientContext`s contained in this multi-context, or an empty list if this is not a multi-context.
`java.lang.String` `getId()` Returns the context ID defined by the client if this is not a multi-context.
`IElementMatcher` `getMatcher()` Obtains the element matcher that determines the elements belong to me.
`boolean` `includes(org.eclipse.gmf.runtime.emf.type.core.internal.descriptors.IEditHelperAdviceDescriptor adviceDescriptor)` Queries whether I am bound to the specified `adviceDescriptor`.
`boolean` `includes(IElementType elementType)` Queries whether I am bound to the specified `elementType`.
`boolean` `includes(IElementTypeDescriptor elementTypeDescriptor)` Queries whether I am bound to the specified `elementTypeDescriptor`.
`boolean` `isMultiClientContext()` Returns whether this context is a multi-context, which is a compound context representing a group of client contexts.

Method Detail

### getId

    public java.lang.String getId()

  Returns the context ID defined by the client if this is not a multi-context. It is is a mult-context, returns the multi-context ID.

  Returns:
    my context ID

### isMultiClientContext

    public boolean isMultiClientContext()

  Returns whether this context is a multi-context, which is a compound context representing a group of client contexts.

  Returns:
    `true` for a multi-context, `false` otherwise

### getChildren

    public java.util.Collection getChildren()

  Returns a list of `IClientContext`s contained in this multi-context, or an empty list if this is not a multi-context.

  Returns:
    an array of client context objects

### getMatcher

    public IElementMatcher getMatcher()

  Obtains the element matcher that determines the elements belong to me.

  Returns:
    my selector

### bindId

    public void bindId(java.lang.String typeId)

  Binds a specific element type or advice to me.

  Parameters:
    `typeId` - the ID of a element type or advice that is to be bound to me

### bindPattern

    public void bindPattern(java.util.regex.Pattern pattern)

  Binds a pattern of element types and advice to me.

  Parameters:
    `pattern` - the pattern of element type and advice IDs that are bound to me

### includes

    public boolean includes(IElementTypeDescriptor elementTypeDescriptor)

  Queries whether I am bound to the specified `elementTypeDescriptor`.

  Parameters:
    `elementTypeDescriptor` - an element type descriptor
  Returns:
    `true` if I am bound to the `elementTypeDescriptor`; `false`, otherwise

### includes

    public boolean includes(IElementType elementType)

  Queries whether I am bound to the specified `elementType`.

  Parameters:
    `elementType` - an element type
  Returns:
    `true` if I am bound to the `elementType`; `false`, otherwise

### includes

    public boolean includes(org.eclipse.gmf.runtime.emf.type.core.internal.descriptors.IEditHelperAdviceDescriptor adviceDescriptor)

  Queries whether I am bound to the specified `adviceDescriptor`.

  Returns:
    `true` if I am bound to the `a`; `false`, otherwise

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.