use of org.eclipse.titan.designer.AST.ILocateableNode in project titan.EclipsePlug-ins by eclipse.
the class StatementNode method isLocationEqualTo.
public boolean isLocationEqualTo(final StatementNode sn) {
if (!(this.getAstNode() instanceof ILocateableNode)) {
return false;
}
if (!(sn.getAstNode() instanceof ILocateableNode)) {
return false;
}
final Location loc0 = ((ILocateableNode) this.getAstNode()).getLocation();
final Location loc1 = ((ILocateableNode) sn.getAstNode()).getLocation();
return loc0.getFile().equals(loc1.getFile()) && loc0.getOffset() == loc1.getOffset() && loc0.getEndOffset() == loc1.getEndOffset();
}
Aggregations