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
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.


Method Summary
 boolean canEdit ( IEditCommandRequest req)
          Answers whether or not the requested edit can be performed.
  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 metaclass for this element type.
  ICommand getEditCommand ( IEditCommandRequest request)
          Gets a command to edit an element of this type.
  IEditHelper getEditHelper ()
          Gets the edit helper for this element type.
 java.net.URL getIconURL ()
          Gets the icon URL.
 java.lang.String getId ()
          Gets the unique identifier for this element type.
 
Methods inherited from interface org.eclipse.core.runtime. IAdaptable
getAdapter
 

Method Detail

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

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