MCPcopy Create free account
hub / github.com/ECSTeam/cloudfoundry-top-plugin / SetCurrentViewOnTop

Method SetCurrentViewOnTop

ui/masterUi.go:382–395  ·  view source on GitHub ↗
(g *gocui.Gui)

Source from the content-addressed store, hash-verified

380}
381
382func (mui *MasterUI) SetCurrentViewOnTop(g *gocui.Gui) error {
383
384 viewMgr := mui.layoutManager.Top()
385 viewMgr.Layout(g)
386
387 topName := viewMgr.Name()
388 if _, err := g.SetCurrentView(topName); err != nil {
389 return merry.Wrap(err).Appendf("SetCurrentView viewName:[%v]", topName)
390 }
391 if _, err := g.SetViewOnTop(topName); err != nil {
392 return merry.Wrap(err).Appendf("SetViewOnTop viewName:[%v]", topName)
393 }
394 return nil
395}
396
397func (mui *MasterUI) GetCurrentView(g *gocui.Gui) *gocui.View {
398 views := g.Views()

Callers 3

CloseViewMethod · 0.95
selectDisplayActionMethod · 0.95
createAndOpenViewMethod · 0.95

Calls 4

SetCurrentViewMethod · 0.80
TopMethod · 0.65
LayoutMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected