org.eclipse.gmf.runtime.emf.type.core
Class ElementType
java.lang.Object
org.eclipse.gmf.runtime.emf.type.core.ElementType
-
All Implemented Interfaces:
-
IAdaptable,
IElementType
-
Direct Known Subclasses:
-
MetamodelType,
SpecializationType
-
public abstract class ElementType
- extends java.lang.Object
- implements
IElementType
Abstract implementation for application element types.
Constructor Summary
|
protected
|
ElementType
(java.lang.String id,
java.net.URL iconURL,
java.lang.String displayName)
Constructs a new element type. |
protected
|
ElementType
(java.lang.String id,
java.net.URL iconURL,
java.lang.String displayName,
org.eclipse.emf.ecore.EClass eClass)
Constructs a new element type. |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
ElementType
protected ElementType(java.lang.String id,
java.net.URL iconURL,
java.lang.String displayName)
- Constructs a new element type.
-
Parameters:
-
id
- the type ID -
iconURL
- the URL for the icon, or null if none. -
displayName
- the display name
ElementType
protected ElementType(java.lang.String id,
java.net.URL iconURL,
java.lang.String displayName,
org.eclipse.emf.ecore.EClass eClass)
- Constructs a new element type.
-
Parameters:
-
id
- the type ID -
iconURL
- the URL for the icon, or null if none. -
displayName
- the display name -
eClass
- the metaclass associated with the element type
getId
public java.lang.String getId()
- Gets the unique identifier.
-
-
Specified by:
-
getId
in interface
IElementType
-
-
Returns:
- the unique identifier.
getIconURL
public java.net.URL getIconURL()
- Gets the icon.
-
-
Specified by:
-
getIconURL
in interface
IElementType
-
-
Returns:
- the icon.
getDisplayName
public java.lang.String getDisplayName()
- Gets the display name.
-
-
Specified by:
-
getDisplayName
in interface
IElementType
-
-
Returns:
- the display name.
getEClass
public org.eclipse.emf.ecore.EClass getEClass()
- Gets the metamodel type.
-
-
Specified by:
-
getEClass
in interface
IElementType
-
-
Returns:
- the metamodel type.
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
-
-
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
public boolean canEdit(
IEditCommandRequest req)
-
Description copied from interface:
IElementType
- Answers whether or not the requested edit can be performed.
-
-
Specified by:
-
canEdit
in interface
IElementType
-
-
Parameters:
-
req
- the edit request
-
Returns:
-
true
if the requested edit can be performed,
false
otherwise.
getAdapter
public java.lang.Object getAdapter(java.lang.Class adapter)
-
-
Specified by:
-
getAdapter
in interface
IAdaptable
-
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
-
-
Returns:
- the element supertypes
setAllSupertypes
protected void setAllSupertypes(
IElementType[] supertypes)
-
-
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.