Java Code Examples for org.eclipse.jdt.core.dom.ReturnStatement#getStartPosition()

The following examples show how to use org.eclipse.jdt.core.dom.ReturnStatement#getStartPosition() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InputFlowAnalyzer.java    From eclipse.jdt.ls with Eclipse Public License 2.0 4 votes vote down vote up
@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();
}
 
Example 2
Source File: InputFlowAnalyzer.java    From eclipse.jdt.ls with Eclipse Public License 2.0 4 votes vote down vote up
@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();
}
 
Example 3
Source File: InputFlowAnalyzer.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@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();
}
 
Example 4
Source File: InputFlowAnalyzer.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@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();
}