Bug 111338 [implementation] new option causing error in org.eclipse.ui.editors
I picked up N20051001-0010 and it looks like a new compiler preference has added a compile error to org.eclipse.ui.editors. From my problems view: Severity Description Resource In Folder Location Creation Time Id 2 Unnecessary cast from Object to IEncodingSupport AbstractDecoratedTextEditor.java org.eclipse.ui.editors/src/org/eclipse/ui/texteditor line 348 October 3, 2005 10:32:56 AM 7034 PW
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindAction.java
}
	Object createSearchDescription(IJavaElement element) {
		IType type= getType(element);
		return new JavaSearchDescription(getLimitTo(), element, null, getScopeDescription(type));
	}
	abstract int getLimitTo();
	
	String getScopeDescription(IJavaElement element) {
		return SearchMessages.WorkspaceScope; 
	}
	IJavaSearchScope getScope(IJavaElement element) throws JavaModelException {
		return SearchEngine.createWorkspaceScope();
	}
	IType getType(IJavaElement element) {
		if (element == null)
			return null;
		
		IType type= null;
		if (element.getElementType() == IJavaElement.TYPE)
			type= (IType)element;
		else if (element instanceof IMember)
			type= ((IMember)element).getDeclaringType();
		else if (element instanceof ILocalVariable) {
			type= (IType)element.getAncestor(IJavaElement.TYPE);
		}
		return type;
	}
		
}