Beispiel #1
0
 internal void DetachFromPathedDocument()
 {
     if (pathDoc == null)
     {
         return;
     }
     PathWidgetEnabled    = false;
     pathDoc.PathChanged -= HandlePathChange;
     pathDoc              = null;
 }
 internal void AttachToPathedDocument(MonoDevelop.Ide.Gui.Content.IPathedDocument pathDoc)
 {
     if (this.pathDoc != pathDoc)
     {
         DetachFromPathedDocument();
     }
     if (pathDoc == null)
     {
         return;
     }
     pathDoc.PathChanged += HandlePathChange;
     this.pathDoc         = pathDoc;
     PathWidgetEnabled    = true;
     pathBar.SetPath(pathDoc.CurrentPath);
 }
Beispiel #3
0
        internal void AttachToPathedDocument(MonoDevelop.Ide.Gui.Content.IPathedDocument pathDoc)
        {
            if (this.pathDoc != pathDoc)
            {
                DetachFromPathedDocument();
            }
            if (pathDoc == null)
            {
                return;
            }
            pathDoc.PathChanged += HandlePathChange;
            this.pathDoc         = pathDoc;

            // If a toolbar is already being shown, we don't show the pathbar yet
            DocumentToolbar toolbar;

            if (documentToolbars.TryGetValue(ActiveViewContent, out toolbar) && toolbar.Visible)
            {
                return;
            }

            PathWidgetEnabled = true;
            pathBar.SetPath(pathDoc.CurrentPath);
        }