Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.emf.type.core
Class SpecializationType

java.lang.Object
  extended by 

org.eclipse.gmf.runtime.emf.type.core.ElementType
      extended by 
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.


Constructor Summary
SpecializationType ( ISpecializationTypeDescriptor descriptor)
          Constructs a new instance using values from the type descriptor.
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.
 
Method Summary
  IElementType[] getAllSuperTypes ()
          Gets the element supertypes for this type.
 org.eclipse.emf.ecore.EClass getEClass ()
          Gets the metaclass that is specialized by this type.
  IContainerDescriptor getEContainerDescriptor ()
          Gets the container descriptor.
  ICommand getEditCommand ( IEditCommandRequest request)
          Gets a command to edit an element of this type.
  IEditHelper getEditHelper ()
          Gets the edit helper for this element type.
  IEditHelperAdvice getEditHelperAdvice ()
          Gets my edit helper advice.
  IElementMatcher getMatcher ()
          Gets the element matcher.
  IMetamodelType getMetamodelType ()
          Gets the metamodel type that this type is a specialization of.
 java.lang.String[] getSpecializedTypeIds ()
          Gets the IDs of the specialized types.
  IElementType[] getSpecializedTypes ()
          Gets the element types that this type specializes.
 boolean isSpecializationOf ( IElementType type)
          Answers whether or not I am a specialization of type.
 java.lang.String toString ()
           
 
Methods inherited from class org.eclipse.gmf.runtime.emf.type.core. ElementType
canEdit, getAdapter, getDisplayName, 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, getIconURL, getId
 
Methods inherited from interface org.eclipse.core.runtime. IAdaptable
getAdapter
 

Constructor Detail

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
Method Detail

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

Runtime

Guidelines for using Eclipse APIs.

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


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire