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

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 ElementType

java.lang.Object
  extended by 
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.
 
Method Summary
 boolean canEdit ( IEditCommandRequest req)
          Answers whether or not the requested edit can be performed.
 java.lang.Object getAdapter (java.lang.Class adapter)
           
  IElementType[] getAllSuperTypes ()
          Gets the element supertypes for this type.
 java.lang.String getDisplayName ()
          Gets the display name.
 org.eclipse.emf.ecore.EClass getEClass ()
          Gets the metamodel type.
  ICommand getEditCommand ( IEditCommandRequest request)
          Gets a command to edit an element of this type.
 java.net.URL getIconURL ()
          Gets the icon.
 java.lang.String getId ()
          Gets the unique identifier.
protected  void setAllSupertypes ( IElementType[] supertypes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.gmf.runtime.emf.type.core. IElementType
getEditHelper
 

Constructor Detail

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

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)

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