org.eclipse.gmf.runtime.emf.type.core
Class SpecializationType
java.lang.Object
org.eclipse.gmf.runtime.emf.type.core.ElementType
org.eclipse.gmf.runtime.emf.type.core.SpecializationType
-
All Implemented Interfaces:
-
IAdaptable,
IElementType,
ISpecializationType
-
public class SpecializationType
- extends
ElementType
- implements
ISpecializationType
Represents an application type that specializes other application types.
Specializations can contribute 'before' and 'after' advice to the editing
commands associated with the application types that they specialize.
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
|
SpecializationType
public SpecializationType(java.lang.String id,
java.net.URL iconURL,
java.lang.String displayName,
IElementType[] elementTypes,
IElementMatcher matcher,
IContainerDescriptor descriptor,
IEditHelperAdvice editHelperAdvice)
- Constructs a new specialization type.
-
Parameters:
-
id
- the type id -
iconURL
- the URL for the icon -
displayName
- the display name -
elementTypes
- the element types that are specialized by this type -
matcher
- the element matcher -
descriptor
- the container descriptor -
editHelperAdvice
- the edit helper advice
SpecializationType
public SpecializationType(
ISpecializationTypeDescriptor descriptor)
- Constructs a new instance using values from the type descriptor.
-
Parameters:
-
descriptor
- the specialization type descriptor
getEContainerDescriptor
public
IContainerDescriptor getEContainerDescriptor()
- Gets the container descriptor.
-
-
Specified by:
-
getEContainerDescriptor
in interface
ISpecializationType
-
-
Returns:
- the container descriptor.
getMatcher
public
IElementMatcher getMatcher()
- Gets the element matcher.
-
-
Specified by:
-
getMatcher
in interface
ISpecializationType
-
-
Returns:
- the element matcher.
getSpecializedTypes
public
IElementType[] getSpecializedTypes()
- Gets the element types that this type specializes.
-
-
Specified by:
-
getSpecializedTypes
in interface
ISpecializationType
-
-
Returns:
- an array of types that are specialized by this type.
getSpecializedTypeIds
public java.lang.String[] getSpecializedTypeIds()
- Gets the IDs of the specialized types.
-
-
Specified by:
-
getSpecializedTypeIds
in interface
ISpecializationType
-
-
Returns:
- the IDs of the specialized types
isSpecializationOf
public boolean isSpecializationOf(
IElementType type)
- Answers whether or not I am a specialization of
type
.
-
-
Specified by:
-
isSpecializationOf
in interface
ISpecializationType
-
-
Parameters:
-
type
- the type to be tested
-
Returns:
-
true
if I am a specialization of type
,
false
otherwise.
getEditHelperAdvice
public
IEditHelperAdvice getEditHelperAdvice()
- Gets my edit helper advice. The advice can return 'before' or 'after'
editing commands for editing elements of the types that I specialize.
-
-
Specified by:
-
getEditHelperAdvice
in interface
ISpecializationType
-
-
Returns:
- the edit helper advice.
getEClass
public org.eclipse.emf.ecore.EClass getEClass()
- Gets the metaclass that is specialized by this type.
-
-
Specified by:
-
getEClass
in interface
IElementType
-
Overrides:
-
getEClass
in class
ElementType
-
-
Returns:
- the metaclass
getMetamodelType
public
IMetamodelType getMetamodelType()
-
Description copied from interface:
ISpecializationType
- Gets the metamodel type that this type is a specialization of. This type
may be a direct specialization of the metamodel type, or indirect through
other specializations. It can specialize any number of other
specializations, so long as they in turn all specialize the same
metamodel type.
-
-
Specified by:
-
getMetamodelType
in interface
ISpecializationType
-
-
Returns:
- the metamodel type that I specialize
getEditHelper
public
IEditHelper getEditHelper()
-
Description copied from interface:
IElementType
- Gets the edit helper for this element type.
-
-
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.