Nathan Sobo
28141e315e
Make shouldAllowDrag method work properly
2013-03-07 09:30:24 -08:00
Nathan Sobo
47621bd3b2
Call Pane.destroyItem when close icon is clicked on a tab
2013-03-07 09:30:24 -08:00
Nathan Sobo
7aba839dac
Fix exception when pane items with no view are removed from the pane
2013-03-07 09:30:24 -08:00
Nathan Sobo
2e2ff3a1d0
Add Pane.destroyItem and rename removeActiveItem -> destroyActiveItem
...
Pane.removeItem removes an item, but no longer tries to call destroy
on it. This will facilitate moving items between panes.
2013-03-07 09:30:24 -08:00
Nathan Sobo
61fa393e03
Add indexOfPane and paneAtIndex to PaneContainer
2013-03-07 09:30:24 -08:00
Nathan Sobo
4a7e5b74c6
Make sure a pane view is showing before assigning its model object
2013-03-07 09:30:24 -08:00
Nathan Sobo
1d0cd16cd1
💄
2013-03-07 09:30:24 -08:00
Nathan Sobo
465bb14659
Reflect pane item order in tab bar
2013-03-07 09:30:24 -08:00
Nathan Sobo
887b5ea007
Add Pane.moveItem(item, index)
...
This is the precursor to supporting drag/drop of tabs within and
between panes.
2013-03-07 09:30:24 -08:00
Nathan Sobo
21990cf986
Add EditSession.getLongTitle
2013-03-07 09:30:24 -08:00
Nathan Sobo
3456b2db3c
Tabs try to use an item's longTitle if two tab titles are the same
...
This will replace edit-session-specific functionality that displayed
the file's parent directory when two files with the same name were
open.
2013-03-07 09:30:24 -08:00
Nathan Sobo
de8198084c
EditSession emits 'title-changed' events when its buffer path changes
2013-03-07 09:30:24 -08:00
Nathan Sobo
0c24843e52
Start converting tabs package to work with new panes / pane-items
2013-03-07 09:30:23 -08:00
Nathan Sobo
5240d9989f
Pane emits 'pane:item-removed' events
2013-03-07 09:30:23 -08:00
Nathan Sobo
dd120663b7
Pane emits 'pane:item-added' events
2013-03-07 09:30:23 -08:00
Nathan Sobo
a40d05f6ee
Rename Pane.currentItem/View to activeItem/View
2013-03-07 09:30:23 -08:00
Nathan Sobo
15d8a6cada
Simplify pane:active-item-changed events
...
Panes now trigger an event every time their active item changes,
regardless of whether the pane itself is active. Panes also trigger
events when the become active and when they are removed. The rootView
now scopes its active-item-changed event listener only to active panes,
and also listens to listens to pane activation and removal events to
update the title when switching active panes and removing the last
pane.
2013-03-07 09:30:23 -08:00
Nathan Sobo
892ff0c51f
Add PaneContainer.eachPane
...
It calls the given callback with all current and future panes
2013-03-07 09:30:23 -08:00
Nathan Sobo
3382a542b3
Get CommandPalette specs to pass without getActiveEditor
2013-03-07 09:30:23 -08:00
Nathan Sobo
1902a0c553
Get CommandPanel specs passing without getActiveEditor/EditSession
2013-03-07 09:30:23 -08:00
Kevin Sawicki
8660670ae3
Replace RootView.getActiveEditor() with getActiveView()
2013-03-07 09:30:23 -08:00
Kevin Sawicki
ff899e9c1b
Replace RootView.getActiveEditor() with getActiveView()
2013-03-07 09:30:23 -08:00
Kevin Sawicki & Nathan Sobo
062adae714
Return the new pane's currentView when splitting the editor
2013-03-07 09:30:23 -08:00
Kevin Sawicki & Nathan Sobo
106c6c3958
Return 'untitled' from EditSession.getPath if its path is null
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo
6304bac233
Remove RootView.getActiveEditor / getActiveEditSession
...
There's a bunch broken because of this… to be continued.
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo
d6b85cf7e8
Base title updates on pane:active-item-changed events
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo
3ae9c10ff5
Trigger 'pane:active-item-changed' w/ null when last pane is removed
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo
161ed69ef0
When a pane is removed, focus/activate the next pane
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo
75229808de
Add Editor.getModel
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo
517c5022d3
Provide a default param for RootView@content when not deserializing
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo
80e736d4ee
Add RootView.getActiveView and .getActivePaneItem
...
They will replace getActiveEditor/getActiveEditSession
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo
58228f7ff7
Remove RootView.activeKeybindings method. It was dead code.
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo
4a6f05ae4e
Trigger 'pane:active-item-changed' on Pane
...
This event is triggered when the item changes on the active pane, or
when a different pane becomes active.
Also: Pane now sets itself as the active pane, rather than letting
PaneContainer handle the focusin event.
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo
ad62f896bc
Make Pane maintain a currentView pointer based on its current item
2013-03-07 09:30:21 -08:00
Nathan Sobo
4e12882478
Delegate getActivePane to the PaneContainer in RootView
2013-03-07 09:28:52 -08:00
Nathan Sobo
486baa393b
PaneContainer.getActivePane returns the most recently focused pane
2013-03-07 09:28:52 -08:00
Nathan Sobo
2ba63e608f
Don't allow core:close event to bubble out of Pane
2013-03-07 09:28:52 -08:00
Nathan Sobo
8f980a0f20
Replace Editor's next/previous edit session bindings w/ pane bindings
2013-03-07 09:28:52 -08:00
Nathan Sobo
bd8ec81b1e
Make Pane close the current item when handling 'core:close' event
2013-03-07 09:28:52 -08:00
Nathan Sobo
11a702a2a6
Remove pane when its last item is removed
2013-03-07 09:28:52 -08:00
Nathan Sobo
7d147dd2ce
Make Pane handle split commands instead of Editor
2013-03-07 09:28:52 -08:00
Nathan Sobo
fee835f899
Add a PaneContainer subview for RootView
...
PaneContainer is responsible for all pane-related logic. Laying them
out, switching focus between them, etc. This should help make RootView
simpler and keep pane-layout related tests in their own focused area.
2013-03-07 09:28:52 -08:00
Nathan Sobo
9ecb03e470
Rename PaneGrid to PaneAxis
...
PaneGrid is a superclass of PaneRow and PaneColumn. These are both
a type of axis for the pane layout system.
2013-03-07 09:28:52 -08:00
Nathan Sobo
0c2a5f273c
Enhance pane split methods. Spec them in pane-spec.
...
When a pane is split, it attempts to make a copy of its current item
if no items are passed to the split method. When splitting, multiple
items can also be passed to the constructor of the new pane.
2013-03-07 09:28:52 -08:00
Nathan Sobo
45eec6a8ff
Get more specs passing. Failing specs due to missing features.
2013-03-07 09:28:52 -08:00
Nathan Sobo
568fcf441e
Pane serializes its serializable items
2013-03-07 09:28:52 -08:00
Nathan Sobo
bee1efed5c
Make RootView.open work with new Pane behavior
...
Still a bit of a WIP. Panes don't yet take the "active" class
correctly when focused.
2013-03-07 09:28:51 -08:00
Nathan Sobo
829bfa0a10
Add Pane.itemForPath
2013-03-07 09:28:51 -08:00
Nathan Sobo
c6729e9df1
Ignore redundant destructions of EditSessions
2013-03-07 09:28:51 -08:00
Nathan Sobo
62729c42ee
Panes destroy their items when they are removed
...
As a consequence of these changes, editors will no longer need to
listen for destruction of their edit sessions. An editor will
eventually only ever be displaying a single edit session, and the
editor will destroy that edit session when it is removed. Panes
will be responsible for supporting multiple edit sessions, and
they will automatically remove the editor when they have no more
edit session items.
2013-03-07 09:28:51 -08:00