public void ActivateItem(int n)
            {
                if (tag is DotNetProject)
                {
                    var proj = ext.ownerProjects [n];
                    foreach (var doc in ext.textContainer.GetRelatedDocuments())
                    {
                        if (IdeServices.TypeSystemService.GetMonoProject(doc.Project) is DotNetProject dnp && dnp == proj)
                        {
                            ext.registration.Workspace.SetDocumentContext(doc.Id);
                        }
                    }
                    ext.WorkspaceChanged(null, null);
                    return;
                }

                var node   = memberList[n];
                var editor = ext.textView;
                int offset;

                if (node is OperatorDeclarationSyntax)
                {
                    offset = Math.Max(1, ((OperatorDeclarationSyntax)node).OperatorToken.SpanStart);
                }
                else if (node is MemberDeclarationSyntax && !(node is AccessorDeclarationSyntax))
                {
                    offset = Math.Max(1, ((MemberDeclarationSyntax)node).SpanStart);
                }
                else
                {
                    offset = node.SpanStart;
                }

                //FIXME: use the snapshot that the nodes came from
                var point = new VirtualSnapshotPoint(editor.TextBuffer.CurrentSnapshot, offset);

                EditorOperations.SelectAndMoveCaret(point, point, TextSelectionMode.Stream, EnsureSpanVisibleOptions.AlwaysCenter);

                // TOTEST
                // editor.Properties.GetProperty<DocumentController> (typeof (DocumentController)).GrabFocus ();
            }
            public void ActivateItem(int n)
            {
                if (tag is OwnerProjectInfo)
                {
                    var proj = ext.ownerProjects [n];
                    foreach (var doc in ext.textContainer.GetRelatedDocuments())
                    {
                        if (proj.Project.Id == doc.Project.Id)
                        {
                            ext.registration.Workspace.SetDocumentContext(doc.Id);
                        }
                    }
                    ext.WorkspaceChanged(null, null);
                    return;
                }

                var node   = memberList[n];
                var editor = ext.textView;
                int offset;

                if (node is OperatorDeclarationSyntax)
                {
                    offset = Math.Max(1, ((OperatorDeclarationSyntax)node).OperatorToken.SpanStart);
                }
                else if (node is MemberDeclarationSyntax && !(node is AccessorDeclarationSyntax))
                {
                    offset = Math.Max(1, ((MemberDeclarationSyntax)node).SpanStart);
                }
                else
                {
                    offset = node.SpanStart;
                }

                //FIXME: use the snapshot that the nodes came from
                var point = new VirtualSnapshotPoint(editor.TextBuffer.CurrentSnapshot, offset);

                EditorOperations.SelectAndMoveCaret(point, point, TextSelectionMode.Stream, EnsureSpanVisibleOptions.AlwaysCenter);
            }