Table of Contents

Class GraphicalLanguage

Namespace
NMF.Glsp.Language
Assembly
NMF.Glsp.dll

Denotes a graphical language

public abstract class GraphicalLanguage : IClientSessionProvider
Inheritance
GraphicalLanguage
Implements
Inherited Members

Properties

AllRules

Gets a collection of all rules

public IEnumerable<DescriptorBase> AllRules { get; }

Property Value

IEnumerable<DescriptorBase>

DefaultLayoutEngine

Gets the default layout engine for this language

public virtual ILayoutEngine DefaultLayoutEngine { get; }

Property Value

ILayoutEngine

DiagramType

Gets the diagram type supported by this graphical language

public virtual string DiagramType { get; }

Property Value

string

StartRule

Gets the rule to start with

public abstract DescriptorBase StartRule { get; }

Property Value

DescriptorBase

SupportedActions

Gets a collection with supported action kinds

public virtual IEnumerable<string> SupportedActions { get; }

Property Value

IEnumerable<string>

Methods

ActionKindsSupportedByDefault()

Gets a collection of action kinds supported by default

protected IEnumerable<string> ActionKindsSupportedByDefault()

Returns

IEnumerable<string>

AddRule(DescriptorBase)

Adds the given rule to the list of supported descriptors

protected void AddRule(DescriptorBase rule)

Parameters

rule DescriptorBase

CalculateTypeHints()

Calculates shape hints for this language

public IEnumerable<TypeHint> CalculateTypeHints()

Returns

IEnumerable<TypeHint>

A collection of shape hints

Create(object, IDiagram, ISkeletonTrace)

Creates a graph element for the given semantic root element

public GGraph Create(object semanticRoot, IDiagram diagram, ISkeletonTrace trace)

Parameters

semanticRoot object

The semantic root element

diagram IDiagram

The notational instance

trace ISkeletonTrace

The trace object

Returns

GGraph

A graph notation

CreateSession(IDictionary<string, object>, IModelServer)

Creates a session

public virtual IGlspClientSession CreateSession(IDictionary<string, object> args, IModelServer modelServer)

Parameters

args IDictionary<string, object>

arguments passed by the GLSP client

modelServer IModelServer

the model server for which to create the session

Returns

IGlspClientSession

A GLSP session

Descriptor<T>()

Resolves the given descriptor type to a descriptor

public T Descriptor<T>() where T : DescriptorBase

Returns

T

The descriptor instance, if any

Type Parameters

T

The type of elements

Initialize()

Initializes the graphical language

public void Initialize()

RetrieveRootActions(string)

Obtains a collection of root actions

public virtual IEnumerable<LabeledAction> RetrieveRootActions(string contextId)

Parameters

contextId string

Returns

IEnumerable<LabeledAction>