Table of Contents

Class EdgeDescriptor<TTransition>

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

Denotes the base class to describe the appearance of transitions

public abstract class EdgeDescriptor<TTransition> : ElementDescriptor<TTransition>

Type Parameters

TTransition

The semantic element type of the transition

Inheritance
ElementDescriptor<TTransition>
EdgeDescriptor<TTransition>
Derived
Inherited Members

Constructors

EdgeDescriptor()

Creates a new instance

protected EdgeDescriptor()

Properties

RouterKind

Gets the router kind

protected virtual RouterKind RouterKind { get; }

Property Value

RouterKind

Methods

CalculateTypeHints()

Calculates type hints for this rule

protected override IEnumerable<TypeHint> CalculateTypeHints()

Returns

IEnumerable<TypeHint>

A collection of type hints

Label(Expression<Func<TTransition, string>>, string, bool, Expression<Func<TTransition, bool>>)

Specifies that a GLabel element should be created under the current node

protected IEdgeLabelSyntax<TTransition> Label(Expression<Func<TTransition, string>> labelSelector, string type = "label", bool canEdit = true, Expression<Func<TTransition, bool>> guard = null)

Parameters

labelSelector Expression<Func<TTransition, string>>

An expression calculating the text of the label

type string

The GElement type of the label

canEdit bool

True, if the label can be added, otherwise False

guard Expression<Func<TTransition, bool>>

An expression to guard the visibility of the label, or null

Returns

IEdgeLabelSyntax<TTransition>

Remarks

This method is intended to be used inside of DefineLayout()

SourceNode<TSource>(NodeDescriptor<TSource>, Expression<Func<TTransition, TSource>>, bool)

Sets the source of the edge represented by this descriptor

protected void SourceNode<TSource>(NodeDescriptor<TSource> descriptor, Expression<Func<TTransition, TSource>> selector, bool canChangeSource = true)

Parameters

descriptor NodeDescriptor<TSource>

The descriptor to describe which source node should be used

selector Expression<Func<TTransition, TSource>>

An expression to calculate the source node from the semantic model of the transition

canChangeSource bool

True, if the source element can be changed, otherwise False

Type Parameters

TSource

The semantic type of the source node

TargetNode<TTarget>(NodeDescriptor<TTarget>, Expression<Func<TTransition, TTarget>>, bool)

Sets the target of the edge represented by this descriptor

protected void TargetNode<TTarget>(NodeDescriptor<TTarget> descriptor, Expression<Func<TTransition, TTarget>> selector, bool canChangeTarget = true)

Parameters

descriptor NodeDescriptor<TTarget>

The descriptor to describe which target node should be used

selector Expression<Func<TTransition, TTarget>>

An expression to calculate the target element from the semantic model of the transition

canChangeTarget bool

True, if the target element can be changed, otherwise False

Type Parameters

TTarget

The semantic type of the target node