Bug 75711 AstProvider should not create AST if requested by SelectionListenerWithASTManager
3.1 M2 If SelectionListenerWithASTManager waits for an AST and the editor closes we should not create an AST for that one but return null instead.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OverrideIndicatorManager.java
MessageDialog.openError(JavaPlugin.getActiveWorkbenchShell(), title, message);
		}
		
		private IType getType(IMethodBinding methodBinding) throws JavaModelException {
			if (methodBinding == null)
				return null;
			
			int type= fJavaElement.getElementType();
			
			IType[] types= null;
			if (type == IJavaElement.COMPILATION_UNIT)
				types= ((ICompilationUnit)fJavaElement).getAllTypes();
			else if (type == IJavaElement.CLASS_FILE)
				types= new IType[] { ((IClassFile)fJavaElement).getType() };
			
			return findType(types, methodBinding.getDeclaringClass().getQualifiedName());
		}
		
		private IType findType(IType[] types, String fullyQualifiedName) {
			if (types == null)
				return null;
			
			for (int i= 0; i < types.length; i++) {
				IType type= types[i];
				if (JavaModelUtil.getFullyQualifiedName(type).equals(fullyQualifiedName))
					return type;
			}
			return null;
		}
	}