Bug 109041 [implementation] Occurrence finders should not compute current node each time
I20050906-1200 This is a minor performance improvement item: currently each occurrence finder computes the node at the caret location via NodeFinder. It would be more efficient to compute the node once and initialize each occurrence finder with that node.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/BreakContinueTargetFinder.java
if (node.getBody() instanceof Block)
					maybeBlock[0]= node.getBody(); 
				return false;
			}
			public boolean visit(DoStatement node) {
				if (node.getBody() instanceof Block)
					maybeBlock[0]= node.getBody(); 
				return false;
			}
			public boolean visit(SwitchStatement node) {
				maybeBlock[0]= node; 
				return false;
			}
		});
		return maybeBlock[0];
	}
	private static String makeStringOfLength(int length) {
		char[] chars= new char[length];
		Arrays.fill(chars, 'x');
		return new String(chars);
	}
	
	private int getLengthOfFirstTokenOf(ASTNode node) throws InvalidInputException {
		IScanner scanner= ToolFactory.createScanner(true, true, false, true);
		scanner.setSource(getSource(node).toCharArray());
		scanner.getNextToken();
		return scanner.getRawTokenSource().length;
	}
	private String getSource(ASTNode node) {
		return fContents.substring(node.getStartPosition(), ASTNodes.getInclusiveEnd(node));