Class CustomNodeModelUtils
- java.lang.Object
-
- com._1c.g5.v8.dt.lcore.nodemodel.util.CustomNodeModelUtils
-
public final class CustomNodeModelUtils extends Object
Class contains util methods ofNodeModelUtils
with higher performance
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.eclipse.xtext.nodemodel.ILeafNode
findLeafNodeAtOffset(org.eclipse.xtext.nodemodel.INode node, int leafNodeOffset)
Find the leaf node at the given offset.static org.eclipse.xtext.nodemodel.ILeafNode
findLeafNodeAtOffsetStartFromBack(org.eclipse.xtext.nodemodel.INode node, int leafNodeOffset)
Find the leaf node at the given offset, the search will be started from the last lead node child ofnode
.
-
-
-
Method Detail
-
findLeafNodeAtOffset
public static org.eclipse.xtext.nodemodel.ILeafNode findLeafNodeAtOffset(org.eclipse.xtext.nodemodel.INode node, int leafNodeOffset)
Find the leaf node at the given offset. May returnnull
if the given offset is not valid for the node (sub-)tree. A node matches theleafNodeOffset
if it fulfills the following condition:node.totalOffset <= leafNodeOffset && node.totalEndOffset > leafNodeOffset
This implementation is faster than originalNodeModelUtils.findLeafNodeAtOffset(INode, int)
for big node model- Parameters:
node
- the container node. May not benull
.leafNodeOffset
- the offset that is covered by the searched node- Returns:
- the leaf node at the given offset or
null
if node was not found
-
findLeafNodeAtOffsetStartFromBack
public static org.eclipse.xtext.nodemodel.ILeafNode findLeafNodeAtOffsetStartFromBack(org.eclipse.xtext.nodemodel.INode node, int leafNodeOffset)
Find the leaf node at the given offset, the search will be started from the last lead node child ofnode
. May returnnull
if the given offset is not valid for the node (sub-)tree. A node matches theleafNodeOffset
if it fulfills the following condition:node.totalOffset <= leafNodeOffset && node.totalEndOffset > leafNodeOffset
This implementation is faster than originalNodeModelUtils.findLeafNodeAtOffset(INode, int)
for big node model- Parameters:
node
- the container node. May not benull
.leafNodeOffset
- the offset that is covered by the searched node- Returns:
- the leaf node at the given offset or
null
if node was not found
-
-