func (e *Editor) loadSetting(pkg *packages.Packet) { if err := pkg.Load(); err != nil { log4go.Error(err) } else { log4go.Info("Loaded %s", pkg.Name()) e.Watch(NewWatchedPackage(pkg)) } }
func (e *Editor) load(pkg *packages.Packet) { if err := pkg.Load(); err != nil { log.Errorf("Failed to load packet %s: %s", pkg.Name(), err) } else { log.Info("Loaded %s", pkg.Name()) if err := e.Watch(pkg.Name(), pkg); err != nil { log.Warn("Couldn't watch %s: %s", pkg.Name(), err) } } }
func (e *Editor) loadKeyBinding(pkg *packages.Packet) { if err := pkg.Load(); err != nil { log.Error(err) } else { log.Info("Loaded %s", pkg.Name()) e.Watch(pkg.Name(), pkg) } e.keyBindings.Merge(pkg.MarshalTo().(*keys.KeyBindings)) }