TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.hyades.ui.extension
Interface IAssociationDescriptor

All Superinterfaces:
IDisposable

public interface IAssociationDescriptor
extends IDisposable

An instance of this class represents an extension to be contributed to the Hyades framework. Examples of extensions:

  1. Type descriptor
  2. Editor definition
  3. Analyse view

This interface is not intended to be implemented by clients. Instances can be obtained by IAssociationMapping.createAssociationDescriptor().


Method Summary
 boolean addType(java.lang.String type)
          Adds a type that is associated to this instance.
 boolean applyTo(java.lang.String type)
          Returns true if this descriptor applies to a given type or false otherwise.
 boolean applyToAllTypes()
          Returns true if this descriptor applies to a all type or false otherwise.
 IAssociationDescriptor copy()
          Creates an association descriptor that has the same attributes values of this instance but that is not associated with the other objects of the extension framework.
 java.lang.Object createImplementationClassInstance()
          Creates an instance of the Extension Class.
 IAssociationMapping getAssociationMapping()
          Returns the association mapping that contains this descriptor.
 java.lang.String getDescription()
          Returns the description of this association descriptor.
 java.lang.String getExtension()
          Returns the extension defined for this association descriptor.
 java.lang.String getId()
          Returns the association descriptor's id.
 org.eclipse.swt.graphics.Image getImage()
          Returns the image created from the image descriptor.
 org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
          Returns this association descriptor's image descriptor.
 java.lang.Class getImplementationClass()
          Returns the class defined in this association descriptor or null if there isn't any class defined.
 java.lang.String getName()
          Returns the name of this association descriptor.
 boolean isPluginDefault()
          Returns true is this view is the default view for this type of association If the method returns true, this view will be opened when double click on an object having this type
 boolean removeType(java.lang.String type)
          Removes a type that is associated to this instance.
 void setConfigurationElement(org.eclipse.core.runtime.IConfigurationElement configurationElement)
          Sets the configuration element.
 void setDescription(java.lang.String description)
          Sets the description of this association descriptor.
 void setExtension(java.lang.String extension)
          Sets the extension for this association descriptor.
 void setId(java.lang.String id)
          Sets the id for this association descriptor.
 void setImageDescriptor(org.eclipse.jface.resource.ImageDescriptor imageDescriptor)
          Sets this test type's image descriptor.
 void setImplementationClass(java.lang.Class extensionClass)
          Sets the instance of the class that implements this association descriptor.
 void setName(java.lang.String name)
          Sets the name of this association descriptor.
 void setPluginDefault(boolean value)
           
 java.lang.String[] types()
          Returns the types that this association descriptor is related to.
 
Methods inherited from interface org.eclipse.hyades.ui.util.IDisposable
dispose
 

Method Detail

getAssociationMapping

IAssociationMapping getAssociationMapping()
Returns the association mapping that contains this descriptor.

Returns:
IAssociationMapping

setName

void setName(java.lang.String name)
Sets the name of this association descriptor.


getName

java.lang.String getName()
Returns the name of this association descriptor.

Returns:
String

setDescription

void setDescription(java.lang.String description)
Sets the description of this association descriptor.


getDescription

java.lang.String getDescription()
Returns the description of this association descriptor.

Returns:
String

setImageDescriptor

void setImageDescriptor(org.eclipse.jface.resource.ImageDescriptor imageDescriptor)
Sets this test type's image descriptor.

Parameters:
imageDescriptor -

getImageDescriptor

org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
Returns this association descriptor's image descriptor.

Returns:
imageDescriptor

getImage

org.eclipse.swt.graphics.Image getImage()
Returns the image created from the image descriptor.

Returns:
Image

setConfigurationElement

void setConfigurationElement(org.eclipse.core.runtime.IConfigurationElement configurationElement)
Sets the configuration element.

Parameters:
configurationElement -

setImplementationClass

void setImplementationClass(java.lang.Class extensionClass)
Sets the instance of the class that implements this association descriptor.

Parameters:
object -

getImplementationClass

java.lang.Class getImplementationClass()
Returns the class defined in this association descriptor or null if there isn't any class defined.

Returns:
Object

createImplementationClassInstance

java.lang.Object createImplementationClassInstance()
Creates an instance of the Extension Class. This method doesn't throw any exceptions returning null if the instance is not created.

Returns:
Object

getId

java.lang.String getId()
Returns the association descriptor's id.

This information is used by the association mapping registry to store the preferences related to this descriptor.

Returns:
String.

setId

void setId(java.lang.String id)
Sets the id for this association descriptor.

This information is used by the association mapping registry to store the preferences related to this descriptor.

Parameters:
id -

setExtension

void setExtension(java.lang.String extension)
Sets the extension for this association descriptor.

Parameters:
string -

getExtension

java.lang.String getExtension()
Returns the extension defined for this association descriptor.

Returns:
String

applyTo

boolean applyTo(java.lang.String type)
Returns true if this descriptor applies to a given type or false otherwise.

Parameters:
type -
Returns:
boolean

applyToAllTypes

boolean applyToAllTypes()
Returns true if this descriptor applies to a all type or false otherwise.

Parameters:
type -
Returns:
boolean

addType

boolean addType(java.lang.String type)
Adds a type that is associated to this instance.

Returns:
boolean true if the type was added or false otherwise.

removeType

boolean removeType(java.lang.String type)
Removes a type that is associated to this instance.

Returns:
boolean true if the type was removed or false otherwise.

types

java.lang.String[] types()
Returns the types that this association descriptor is related to.

Clients should not use this method to check if a descriptor applies to a type. The apply methods are the preferred way of doing this.

This method doesn't follow the "get" naming convention to reduce the change of being used in the wrong scenario.

Returns:
String[]

copy

IAssociationDescriptor copy()
Creates an association descriptor that has the same attributes values of this instance but that is not associated with the other objects of the extension framework.

Returns:
IAssociationDescriptor

isPluginDefault

boolean isPluginDefault()
Returns true is this view is the default view for this type of association If the method returns true, this view will be opened when double click on an object having this type

Returns:
default value

setPluginDefault

void setPluginDefault(boolean value)
Parameters:
value - default value

TPTP 4.5.0 Platform Project
Public API Specification