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,
org.eclipse.emf.ecore.EClass eClass,
IEditHelper editHelper)
Constructs a new metamodel type. |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
|
MetamodelType
public MetamodelType(java.lang.String id,
java.net.URL iconURL,
java.lang.String displayName,
org.eclipse.emf.ecore.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.
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
-
-
Parameters:
-
request
- the edit request
-
Returns:
- the edit command, or
null
if none is found. The
command returned may not be executable, and this should be tested
before it is executed.
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
-
-
Returns:
- the element supertypes
toString
public java.lang.String toString()
-
-
Overrides:
-
toString
in class java.lang.Object
-
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.