|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kiml.service.LayoutInfoService
de.cau.cs.kieler.kiml.ui.service.EclipseLayoutInfoService
public final class EclipseLayoutInfoService
An extension of the layout info service for diagram layout managers and preference handling.
Field Summary | |
---|---|
static String |
ATTRIBUTE_PRIORITY
name of the 'priority' attribute in the extension points. |
static String |
ELEMENT_ENGINE
name of the 'engine' element in the 'layout managers' extension point. |
static String |
ELEMENT_MANAGER
name of the 'manager' element in the 'layout managers' extension point. |
static String |
EXTP_ID_LAYOUT_MANAGERS
identifier of the extension point for layout managers. |
static String |
PREF_OBLIQUE_ROUTE
preference identifier for oblique edge routing. |
static String |
PREF_REG_ELEMENTS
preference identifier for the list of registered diagram elements. |
Fields inherited from class de.cau.cs.kieler.kiml.service.LayoutInfoService |
---|
ATTRIBUTE_CLASS, ATTRIBUTE_CONFIG, ATTRIBUTE_ID, ATTRIBUTE_NAME, ATTRIBUTE_OPTION, ATTRIBUTE_VALUE, ELEMENT_BINDING, ELEMENT_DIAGRAM_TYPE, ELEMENT_OPTION, ELEMENT_SEMANTIC_OPTION, EXTP_ID_LAYOUT_INFO |
Method Summary | |
---|---|
static void |
create()
Create the layout info service and load extension points. |
static EclipseLayoutInfoService |
getInstance()
Returns the singleton instance of the layout info service. |
IGraphLayoutEngine |
getLayoutEngine()
Returns the active graph layout engine with highest priority. |
IDiagramLayoutManager<?> |
getManager(IWorkbenchPart workbenchPart,
Object diagramPart)
Returns the most suitable layout manager for the given workbench and diagram part. |
static String |
getPreferenceName(String id1,
String id2)
Returns the preference name associated with the two identifiers. |
Set<String> |
getRegisteredElements()
Returns the set of registered diagram elements. |
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. |
void |
storeOption(EditPart editPart,
LayoutOptionData<?> optionData,
String valueString,
boolean storeDomainModel)
Stores the layout option with given value for the edit part. |
void |
storeOption(String diagramType,
LayoutOptionData<?> optionData,
String valueString)
Stores the layout option with given value for the diagram type. |
void |
storePreferences()
Stores preferences for KIML. |
Methods inherited from class de.cau.cs.kieler.kiml.service.LayoutInfoService |
---|
addDiagramType, addOptionValue, addSemanticConfig, getDiagramTypeName, getDiagramTypes, getOptionValue, getOptionValue, getOptionValues, getOptionValues, getSemanticConfigs, loadLayoutInfoExtensions, removeOptionValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EXTP_ID_LAYOUT_MANAGERS
public static final String ELEMENT_MANAGER
public static final String ELEMENT_ENGINE
public static final String ATTRIBUTE_PRIORITY
public static final String PREF_REG_ELEMENTS
public static final String PREF_OBLIQUE_ROUTE
Method Detail |
---|
public static EclipseLayoutInfoService getInstance()
public static void create()
protected void reportError(String extensionPoint, IConfigurationElement element, String attribute, Throwable exception)
reportError
in class LayoutInfoService
extensionPoint
- the identifier of the extension pointelement
- the configuration elementattribute
- the attribute that contains an invalid entryexception
- an optional exception that was caused by the invalid entryprotected void reportError(CoreException exception)
reportError
in class LayoutInfoService
exception
- a core exception holding a status with further informationpublic IDiagramLayoutManager<?> getManager(IWorkbenchPart workbenchPart, Object diagramPart)
workbenchPart
- the workbench part for which the layout manager should be fetcheddiagramPart
- the diagram part for which the layout manager should be
fetched, or null
public IGraphLayoutEngine getLayoutEngine()
public static String getPreferenceName(String id1, String id2)
id1
- first identifierid2
- second identifier
public void storeOption(String diagramType, LayoutOptionData<?> optionData, String valueString)
diagramType
- a diagram type identifieroptionData
- a layout option datavalueString
- the value to store for the diagram type and optionpublic void storeOption(EditPart editPart, LayoutOptionData<?> optionData, String valueString, boolean storeDomainModel)
editPart
- an edit partoptionData
- a layout option datavalueString
- the value to store for the edit part and optionstoreDomainModel
- if true, the option is stored for the domain model element
associated with the edit part, else for the edit part itselfpublic void storePreferences()
public Set<String> getRegisteredElements()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |