org.eclipse.gmf.runtime.emf.type.core
Interface IElementType
-
All Superinterfaces:
-
IAdaptable
-
All Known Subinterfaces:
-
IHintedType,
IMetamodelType,
ISpecializationType
-
All Known Implementing Classes:
-
ElementType,
MetamodelType,
NullElementType,
SpecializationType
-
public interface IElementType
- extends
IAdaptable
Interface used to define application-layer types that describe the kinds of
elements that can be displayed, created, modified and destroyed. These types
extend the types defined for any given metamodel, so that
IElementType
s can be used to distinguish types of elements
that share the same metaclass.
Each element type defines how model objects that match its type are to be
displayed (by icon URL and display name), as well as how they are to be
created, modified and deleted (by edit helper and an accessor for edit
commands).
There are two known extensions of IElementType
. These are
IMetamodelType
and ISpecializationType
. Each
metamodel type maps directly to an EClass. Each specialization type matches a
metamodel type with further restrictions expressed in a
IElementMatcher
class.
Clients should not implement this interface directly, but should extend the
abstract implementation
ElementType
.
getId
java.lang.String getId()
- Gets the unique identifier for this element type.
-
-
-
Returns:
- the unique identifier
getIconURL
java.net.URL getIconURL()
- Gets the icon URL.
-
-
-
Returns:
- the icon URL
getDisplayName
java.lang.String getDisplayName()
- Gets the display name.
-
-
-
Returns:
- the display name
getEClass
org.eclipse.emf.ecore.EClass getEClass()
- Gets the metaclass for this element type.
-
-
-
Returns:
- the metaclass
getEditCommand
ICommand getEditCommand(
IEditCommandRequest request)
- Gets a command to edit an element of this type.
-
-
-
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.
canEdit
boolean canEdit(
IEditCommandRequest req)
- Answers whether or not the requested edit can be performed.
-
-
-
Parameters:
-
req
- the edit request
-
Returns:
-
true
if the requested edit can be performed,
false
otherwise.
getEditHelper
IEditHelper getEditHelper()
- Gets the edit helper for this element type.
-
-
-
Returns:
- the edit helper
getAllSuperTypes
IElementType[] getAllSuperTypes()
- Gets the element supertypes for this type.
Ordered from furthest supertype to nearest supertype.
-
-
-
Returns:
- the element supertypes
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.