Package org.jetbrains.mps.openapi.event
Class SNodeRemoveEvent
- java.lang.Object
-
- org.jetbrains.mps.openapi.event.AbstractModelEvent
-
- org.jetbrains.mps.openapi.event.AbstractModelChangeEvent
-
- org.jetbrains.mps.openapi.event.SNodeRemoveEvent
-
public final class SNodeRemoveEvent extends AbstractModelChangeEvent
Encapsulates information about node removed from a model. To tell removed root from removed child, useisRoot()
- Since:
- 3.3
-
-
Constructor Summary
Constructors Constructor Description SNodeRemoveEvent(SModel model, SNode node)
SNodeRemoveEvent(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 removed
-
getModel
@NotNull public SModel getModel()
- Specified by:
getModel
in classAbstractModelChangeEvent
- Returns:
- affected model
-
getParent
@Nullable public SNode getParent()
- Returns:
- modified node, the one that lost
child
, ornull
for root remove event.
-
getChild
@NotNull public SNode getChild()
- Returns:
- removed node. Beware, it's detached from the model and has limited functionality.
E.g.
SNode.getReference()
doesn't make sense, usegetModel().getReference()
andSNode.getNodeId()
instead.
-
getAggregationLink
@Nullable public SContainmentLink getAggregationLink()
-
-