Runtime

## org.eclipse.gmf.runtime.emf.type.core
Class MetamodelType

    java.lang.Object
      org.eclipse.gmf.runtime.emf.type.core.ElementType
          org.eclipse.gmf.runtime.emf.type.core.MetamodelType

All Implemented Interfaces:
  IAdaptable, IElementType, IMetamodelType

Direct Known Subclasses:
  NullElementType

public class MetamodelType
extends ElementType
implements IMetamodelType

Represents an element type that maps directly to a metamodel element type ( `EClass`). There is only one metamodel type registered with the `ElementTypeRegistry`for a given EClass.

Provides an edit helper for editing model elements with the same `EClass`.

Constructor Summary
`MetamodelType(IMetamodelTypeDescriptor descriptor)` Constructs a new metamodel type using values from the type descriptor.
`MetamodelType(java.lang.String id, java.net.URL iconURL, java.lang.String displayName, EClass eClass, IEditHelper editHelper)` Constructs a new metamodel type.

Method Summary
`IElementType[]` `getAllSuperTypes()` Gets the element supertypes for this type.
`ICommand` `getEditCommand(IEditCommandRequest request)` Gets a command to edit an element of this type.
`IEditHelper` `getEditHelper()` Gets the edit helper.
`java.lang.String` `toString()`

Methods inherited from class org.eclipse.gmf.runtime.emf.type.core.ElementType
`canEdit, getAdapter, getDisplayName, getEClass, getIconURL, getId, setAllSupertypes`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.eclipse.gmf.runtime.emf.type.core.IElementType
`canEdit, getDisplayName, getEClass, getIconURL, getId`

Methods inherited from interface org.eclipse.core.runtime.IAdaptable
`getAdapter`

Constructor Detail

### MetamodelType

    public MetamodelType(java.lang.String id,
                         java.net.URL iconURL,
                         java.lang.String displayName,
                         EClass eClass,
                         IEditHelper editHelper)

  Constructs a new metamodel type.

Parameters:
  `id` - the id
  `iconURL` - the URL for the icon
  `displayName` - the display name
  `eClass` - the metaclass
  `editHelper` - the edit helper

### MetamodelType

    public MetamodelType(IMetamodelTypeDescriptor descriptor)

  Constructs a new metamodel type using values from the type descriptor.

Parameters:
  `descriptor` - the metamodel type descriptor.

Method Detail

### getEditHelper

    public IEditHelper getEditHelper()

  Gets the edit helper. May activate the plugin in which the edit helper is defined.

  Specified by:
    `getEditHelper` in interface `IElementType`
  Returns:
    the edit helper.

### getEditCommand

    public ICommand getEditCommand(IEditCommandRequest request)

  Description copied from interface: `IElementType`
  Gets a command to edit an element of this type.

  Specified by:
    `getEditCommand` in interface `IElementType`
  Overrides:
    `getEditCommand` in class `ElementType`

### getAllSuperTypes

    public IElementType[] getAllSuperTypes()

  Description copied from interface: `IElementType`
  Gets the element supertypes for this type. Ordered from furthest supertype to nearest supertype.

  Specified by:
    `getAllSuperTypes` in interface `IElementType`
  Overrides:
    `getAllSuperTypes` in class `ElementType`

### toString

    public java.lang.String toString()

Runtime

Guidelines for using Eclipse APIs.

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