-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
The matches for this method were mostly from Workspace::getActiveEditor. There ended up being only two actual uses. hashrocket/lib/hashrocket.coffee 51: editor = atom.workspace.activePane.getActiveEditor() nucleus/lib/core/adapters/workspace/atom/workspace_adapter.js 38: var editor = this.paneForPath(path).getActiveEditor();
::saveActiveItemAs() 0 0 0 | ||
::saveActiveItem() 0 0 0 | ||
::destroyInactiveItems() 0 0 0 | ||
::itemAtIndex(index) 0 0 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll need this for completeness. Can I only operate on the active item?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take this back, I like ::getItems()[index]
better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to leave it.
I like these dealing with item ordering: ::getItems()
::getActiveItem()
::addItem(item, index)
::activateItem(item)
::moveItem(item, newIndex)
::moveItemToPane(item, pane, index) I feel like we should have an easier way to handle siblings. I think whatever we do here, we should have the item siblings behave the same as panes. So we could do ::getPrevious()
::getNext()
Item::getPrevious()
Item::getNext() Though I think this might be hard because an item can be anything. So maybe we have ::getNextItem(item)
::getPreviousItem(item)
Workspace::getNextPane(pane)
Workspace::getPreviousPane(pane) Use cases being: focusing the next pane, moving an item to the next pane, closing the previous pane, etc. |
@@ -405,24 +400,11 @@ Pane called packages a | |||
::addItem(item, index) 10 9 0 | |||
::getActiveItem() 8 6 0 | |||
::splitDown(params) 7 6 1 | |||
::activateNextItem() 4 3 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want this in
This combines the Pane and PaneView APIs and removes some underused methods from the API.
One thing we might want to consider, move the split methods from Pane to
Workspace. I think conceptually it makes sense to split the Workspace rather
than a Pane.