Bug 67090 JDT UI breaks api rules by implementing SourceRange [refactoring]
3.0rc1 jdt ui has an implementation of ISourceRange (because the one from jcore is internal and we did not feel like creating a n-th class for the same thing: pair of ints). however, according to the API ISourceRange should not be implemented
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionActionImpl.java
public int getLength() {
						int l= nameRange.getLength();
						if (l < 0)
							l= 1;
						return l;
					}
					public int getOffset() {
						return nameRange.getOffset();
					}					
				};
				ASTNode node2= NodeFinder.perform(root, myRange);
				ASTNode node= ASTNodes.getParent(node2, BodyDeclaration.class);
				if (node == null)
					node= ASTNodes.getParent(node2, AnnotationTypeDeclaration.class);
				if (node == null)
					node= ASTNodes.getParent(node2, EnumDeclaration.class);
				
				
				if (node == null) {
					MessageDialog.openError(shell, errorTitle, errorMessage);
					return;
				}
				
				ASTRewrite rewriter= ASTRewrite.create(root.getAST());
				rewriter.replace(node, rewriter.createStringPlaceholder(newContent, node.getNodeType()), null);
				
				if (inEditor) {
					JavaEditor je= getEditor(file);
					if (je != null)
						je.setFocus();