Package org.jetbrains.mps.openapi.event
Class SNodeAddEvent
- java.lang.Object
-
- org.jetbrains.mps.openapi.event.AbstractModelEvent
-
- org.jetbrains.mps.openapi.event.AbstractModelChangeEvent
-
- org.jetbrains.mps.openapi.event.SNodeAddEvent
-
public final class SNodeAddEvent extends AbstractModelChangeEvent
Encapsulates information about node added to a model. To tell added root node from a child, useisRoot()
- Since:
- 3.3
-
-
Constructor Summary
Constructors Constructor Description SNodeAddEvent(SModel model, SNode node)
SNodeAddEvent(SModel model, SNode parent, SNode child, SContainmentLink link)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SContainmentLink
getAggregationLink()
SNode
getChild()
SModel
getModel()
SNode
getParent()
boolean
isRoot()
-
-
-
Method Detail
-
isRoot
public boolean isRoot()
- Returns:
true
if model root has been added
-
getModel
@NotNull public SModel getModel()
- Specified by:
getModel
in classAbstractModelChangeEvent
- Returns:
- affected model
-
getParent
@Nullable public SNode getParent()
- Returns:
- modified node, the one that got new
child
, ornull
for root add event.
-
getAggregationLink
@Nullable public SContainmentLink getAggregationLink()
-
-