org.eclipse.jdt.core.dom.ReturnStatement#getStartPosition ( )源码实例Demo

下面列出了org.eclipse.jdt.core.dom.ReturnStatement#getStartPosition ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: eclipse.jdt.ls   文件: InputFlowAnalyzer.java
@Override
protected boolean createReturnFlowInfo(ReturnStatement node) {
	// Make sure that the whole return statement is selected or located before the selection.
	return node.getStartPosition() + node.getLength() <= fSelection.getExclusiveEnd();
}
 
源代码2 项目: eclipse.jdt.ls   文件: InputFlowAnalyzer.java
@Override
protected boolean createReturnFlowInfo(ReturnStatement node) {
	// Make sure that the whole return statement is located after the selection. There can be cases like
	// return i + [x + 10] * 10; In this case we must not create a return info node.
	return node.getStartPosition() >= fSelection.getInclusiveEnd();
}
 
@Override
protected boolean createReturnFlowInfo(ReturnStatement node) {
	// Make sure that the whole return statement is selected or located before the selection.
	return node.getStartPosition() + node.getLength() <= fSelection.getExclusiveEnd();
}
 
@Override
protected boolean createReturnFlowInfo(ReturnStatement node) {
	// Make sure that the whole return statement is located after the selection. There can be cases like
	// return i + [x + 10] * 10; In this case we must not create a return info node.
	return node.getStartPosition() >= fSelection.getInclusiveEnd();
}