Replacement for atom.workspaceView.command


Now that accessing the view is deprecated, what is the proper replacement for atom.workspaceView.command?

I’m updating some code in a package and I’m not particularly sure what it even does, but it seems like it just calls a function in the code when one of the package commands is activated. Hopefully someone can also tell me what its purpose is.


EDIT: I didn’t notice you were asking about workspacView.command my fault, please read leedohms answer.

Hi, you can take a look at existing package such as the bookmark(done by Atom core team)



The replacement for atom.workspaceView.command is the new CommandRegistry. You can look here for how I converted one of my packages code to the new system:

And here for how I converted the specs: