TPTP 4.2.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().

Since:
0.0.1

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

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

Returns:
IAssociationMapping

setName

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

Returns:
String

getName

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

Returns:
String

setDescription

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

Returns:
String

getDescription

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

Returns:
String

setImageDescriptor

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

Parameters:
imageDescriptor -

getImageDescriptor

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

Returns:
imageDescriptor

getImage

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

Returns:
Image

setConfigurationElement

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

Parameters:
configurationElement -

setImplementationClass

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


getImplementationClass

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

Returns:
Object

createImplementationClassInstance

public 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

public 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

public 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

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


getExtension

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

Returns:
String

applyTo

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

Parameters:
type -
Returns:
boolean

applyToAllTypes

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

Returns:
boolean

addType

public 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

public 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

public 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

public 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

public 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

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

TPTP 4.2.0 Platform Project
Public API Specification