de.cau.cs.kieler.kiml.ui.service
Class EclipseLayoutDataService

java.lang.Object
  extended by de.cau.cs.kieler.kiml.LayoutDataService
      extended by de.cau.cs.kieler.kiml.service.ExtensionLayoutDataService
          extended by de.cau.cs.kieler.kiml.ui.service.EclipseLayoutDataService

public class EclipseLayoutDataService
extends ExtensionLayoutDataService

A special layout data service for use in an Eclipse instance.

Rating proposed yellow
(2009-12-11) msp

Nested Class Summary
 
Nested classes/interfaces inherited from class de.cau.cs.kieler.kiml.LayoutDataService
LayoutDataService.Registry
 
Field Summary
static String ATTRIBUTE_PREVIEW
          name of the 'preview' attribute in the extension points.
 
Fields inherited from class de.cau.cs.kieler.kiml.service.ExtensionLayoutDataService
ATTRIBUTE_ADVANCED, ATTRIBUTE_APPLIESTO, ATTRIBUTE_CATEGORY, ATTRIBUTE_CLASS, ATTRIBUTE_DEFAULT, ATTRIBUTE_DESCRIPTION, ATTRIBUTE_ENUMVALUES, ATTRIBUTE_ID, ATTRIBUTE_IMPLEMENTATION, ATTRIBUTE_NAME, ATTRIBUTE_OPTION, ATTRIBUTE_PARAMETER, ATTRIBUTE_PRIORITY, ATTRIBUTE_TYPE, ELEMENT_CATEGORY, ELEMENT_KNOWN_OPTION, ELEMENT_LAYOUT_ALGORITHM, ELEMENT_LAYOUT_OPTION, ELEMENT_LAYOUT_TYPE, ELEMENT_SUPPORTED_DIAGRAM, EXTP_ID_LAYOUT_PROVIDERS
 
Fields inherited from class de.cau.cs.kieler.kiml.LayoutDataService
DIAGRAM_TYPE_GENERAL, ECLIPSEDATASERVICE, REMOTEDATASERVICE, SERVICEDATASERVICE
 
Constructor Summary
EclipseLayoutDataService()
           
 
Method Summary
static void create()
          Create the layout data service and read extension point.
protected  LayoutAlgorithmData createLayoutAlgorithmData(IConfigurationElement element)
          Create a layout algorithm data instance and configure it with platform-specific extensions.
static void readSupportPriorities(int[][] priorityData, String[] layoutProviders, String[] diagramTypes)
          Fills the given table of priorities with data from the extension point.
protected  void reportError(CoreException exception)
          Report an error that occurred while reading extensions.
protected  void reportError(String extensionPoint, IConfigurationElement element, String attribute, Throwable exception)
          Report an error that occurred while reading extensions.
 
Methods inherited from class de.cau.cs.kieler.kiml.service.ExtensionLayoutDataService
getLayoutProviderFactory, getProviderExtensions, loadClass, loadLayoutProviderExtensions
 
Methods inherited from class de.cau.cs.kieler.kiml.LayoutDataService
addService, getAlgorithmData, getAlgorithmData, getAlgorithmDataBySuffix, getCategoryName, getInstance, getInstanceOf, getMode, getOptionData, getOptionData, getOptionData, getOptionDataBySuffix, getRegistry, getTypeData, getTypeData, getTypeDataBySuffix, removeService, setMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_PREVIEW

public static final String ATTRIBUTE_PREVIEW
name of the 'preview' attribute in the extension points.

See Also:
Constant Field Values
Constructor Detail

EclipseLayoutDataService

public EclipseLayoutDataService()
Method Detail

create

public static void create()
Create the layout data service and read extension point.


reportError

protected void reportError(String extensionPoint,
                           IConfigurationElement element,
                           String attribute,
                           Throwable exception)
Report an error that occurred while reading extensions.

Specified by:
reportError in class ExtensionLayoutDataService
Parameters:
extensionPoint - the identifier of the extension point
element - the configuration element
attribute - the attribute that contains an invalid entry
exception - an optional exception that was caused by the invalid entry

reportError

protected void reportError(CoreException exception)
Report an error that occurred while reading extensions.

Specified by:
reportError in class ExtensionLayoutDataService
Parameters:
exception - a core exception holding a status with further information

createLayoutAlgorithmData

protected LayoutAlgorithmData createLayoutAlgorithmData(IConfigurationElement element)
Create a layout algorithm data instance and configure it with platform-specific extensions.

Overrides:
createLayoutAlgorithmData in class ExtensionLayoutDataService
Parameters:
element - a configuration element to use for configuration
Returns:
a new layout algorithm data instance

readSupportPriorities

public static void readSupportPriorities(int[][] priorityData,
                                         String[] layoutProviders,
                                         String[] diagramTypes)
Fills the given table of priorities with data from the extension point. The number of rows in the table must be equal to the number of layout providers, and the number of columns must be equal to the number of diagram types.

Parameters:
priorityData - two dimensional array that is filled with data
layoutProviders - array of layout provider identifiers
diagramTypes - array of diagram type identifiers