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
fIsBreak= fSelected instanceof BreakStatement;
			fLabel= getLabel();
			return null;
		} else {
			return SearchMessages.BreakContinueTargetFinder_no_break_or_continue_selected;
		}
	}
	
	private String getContents(CompilationUnit root) {
		try {
			IJavaElement rootElem= root.getJavaElement();
			if ((rootElem instanceof ISourceReference))
				return ((ISourceReference)rootElem).getSource();
			else
				return null;
		} catch (JavaModelException e) {
			
			
			/* showing a dialog here would be too heavy but we cannot just 
             * swallow the exception */
			JavaPlugin.log(e); 
			return null;
		}
	}
	
	private ASTNode getBreakOrContinueNode(ASTNode selectedNode) {
		if (selectedNode instanceof BreakStatement)
			return selectedNode;
		if (selectedNode instanceof ContinueStatement)
			return selectedNode;