Status Bar API


Since 0.69.0 Status Bar provides nice API to interact with it. Is is this something that will change in the future? I would like change toolbar one to be similar but I’m not sure if this is something designed to build upon.


It may well change, but the service-hub system is designed so that a package can provide backwards-compatible versions. So if you consume the 1.0.0 version, you should be covered for quite some time.


I have a question about the communication between the status bar and a package actually i use event-kit to advice to status bar have to show or hide something this is the right way?


For the things that the status-bar API covers, it is the right way to do it. I guess I would have to ask what it is you’re trying to do exactly?


Actually i do that question because in some package where i use the status bar, i communicate with him with event-kit but the load time get a x2 in time cop


Just for future reference, tool-bar now uses the Service API.


I’m confused as to how to use consumeStatusBar. It is called by the services stuff but when? I don’t create my status bar view until after activation so if it is called during activation I’m screwed. I won’t have any myElement to give it.


Hi Mark,

As far as i know the consumeStatusBar work in two ways if u have in ur package.json an activation event this only is called when ur activation event is called.

If u doesn’t have an activation event this is called when ur packages is loaded.


You can store a reference to the service until you need it, then throw it away when you’re done