anchor.diff:  type ResolveUnopenedNamespaceSmartTag(actionSets) =
       inherit SmartTag(SmartTagType.Factoid, actionSets)
   
  +type Namespace = string
  +
   type Entity = 
  -    { Namespace: string
  -      Name: string }
  -
  +    { Namespace: Namespace option
  +      Name: string } 
  +       
   module Ast =
  -    let findNearestOpenStatementBlock (pos: pos) (ast: ParsedInput) = 
  +    let findNearestOpenStatementBlock (pos: pos) (ast: ParsedInput) : (Namespace option * pos) option = 
           let result = ref None
           
  -        let doRange (syn: obj) (startLine, col, endLine) = 
  +        let doRange (ns: LongIdent option) (startLine, col, endLine) = 
               if startLine < pos.Line && endLine >= pos.Line then 
                   match !result with
  -                | None -> result := Some (syn, startLine, col)
  +                | None -> result := Some (ns, startLine, col)
                   | Some (_, oldLine, _) when oldLine < startLine -> 
  -                    result := Some (syn, startLine, col)
  +                    result := Some (ns, startLine, col)
                   | _ -> ()
   
           let rec walkImplFileInput (ParsedImplFileInput(_, _, _, _, _, moduleOrNamespaceList, _)) = 
               List.iter walkSynModuleOrNamespace moduleOrNamespaceList
   
  -        and walkSynModuleOrNamespace(SynModuleOrNamespace(_, _, decls, _, _, _, range) as syn) =
  -            doRange syn (range.StartLine, range.StartColumn, range.EndLine)
  +        and walkSynModuleOrNamespace (SynModuleOrNamespace(ident, _, decls, _, _, _, range)) =
  +            doRange (Some ident) (range.StartLine, range.StartColumn, range.EndLine)
               List.iter walkSynModuleDecl decls
   
           and walkSynModuleDecl(decl: SynModuleDecl) =
               match decl with
               | SynModuleDecl.NamespaceFragment fragment -> walkSynModuleOrNamespace fragment
  -            | SynModuleDecl.NestedModule(ComponentInfo(_, _, _, _, _, _, _, range), modules, _, _) as syn ->
  -                doRange syn (range.StartLine, range.StartColumn + 4, range.EndLine)
  +            | SynModuleDecl.NestedModule(ComponentInfo(_, _, _, ident, _, _, _, range), modules, _, _) ->
  +                doRange (Some ident) (range.StartLine, range.StartColumn + 4, range.EndLine)
                   List.iter walkSynModuleDecl modules
  -            | SynModuleDecl.Open (_, range) as syn -> doRange syn (range.StartLine, range.StartColumn - 5, range.EndLine)
  +            | SynModuleDecl.Open (_, range) -> doRange None (range.StartLine, range.StartColumn - 5, range.EndLine)
               | _ -> ()
   
           match ast with
           | ParsedInput.SigFile _input -> ()
           | ParsedInput.ImplFile input -> walkImplFileInput input
   
  -        let res = !result |> Option.map (fun (_, line, col) -> Pos.fromZ line col)
  -        //debug "[ResolveUnopenedNamespaceSmartTagger] Syn, line, col = %A, AST = %A" (!result) ast
  +        let res = !result |> Option.map (fun (ns, line, col) -> 
  +            ns |> Option.map (fun x -> String.Join(".", x)), Pos.fromZ line col) 
  +        //debug "[ResolveUnopenedNamespaceSmartTagger] Ident, line, col = %A, AST = %A" (!result) ast
           res 
            
   type ResolveUnopenedNamespaceSmartTagger
  
positive.code:                             | Some _ -> return! liftMaybe None
                              | None ->
                                  let! entities = vsLanguageService.GetAllEntities (doc.FullName, newWord.Snapshot.GetText(), project)
                                  let entitiesNames =
                                      entities 
                                      |> Seq.map (fun e ->
                                          try e.FullName 
                                          with _ -> e.DisplayName)
                                      |> Seq.choose (fun name -> 
                                          match name.LastIndexOf '.' with
                                          | -1 -> None
                                          | lastDotIndex -> 
                                              let lastIdent = name.Substring (lastDotIndex + 1)
                                              if lastIdent = sym.Text then 
                                                  Some { Namespace = name.Substring (0, lastDotIndex); Name = lastIdent }
                                              else None)
                                      |> Seq.toList
  
                                  let! checkResults = 
                                      vsLanguageService.ParseFileInProject (doc.FullName, newWord.Snapshot.GetText(), project) |> liftAsync
  
                                  return! 
                                      checkResults.ParseTree 
                                      |> Option.map (fun tree ->
                                          let line, column = 
                                              match Ast.findNearestOpenStatementBlock (codeGenService.ExtractFSharpPos point) tree with
                                              | Some pos -> pos.Line, pos.Column
                                              | None -> 1, 1
                                          sym, entitiesNames, line, column)
                                      |> liftMaybe
                      }
                      |> Async.map (fun result -> 
                          state <- result
                          let span = SnapshotSpan(buffer.CurrentSnapshot, 0, buffer.CurrentSnapshot.Length)
                          tagsChanged.Trigger(self, SnapshotSpanEventArgs(span)))
                      |> Async.StartImmediateSafe
                      currentWord <- Some newWord
              | _ -> ()
  
      let docEventListener = new DocumentEventListener ([ViewChange.layoutEvent view; ViewChange.caretEvent view], 
                                                        500us, updateAtCaretPosition)
  
negative.code:         member x.GetTags _spans =
              seq {
                  match currentWord, state with
                  | Some word, Some (candidates, line, col) ->
                      let span = SnapshotSpan(buffer.CurrentSnapshot, word.Span)
                      yield TagSpan<_>(span, ResolveUnopenedNamespaceSmartTag(getSmartTagActions word candidates line col))
                            :> _
                  | _ -> ()
              }
  