Commit Graph

1653 Commits

Author SHA1 Message Date
Justin Palmer
9c99369c10 add methods to determine if we should allow dragging and dropping 2013-02-10 10:46:02 -08:00
Justin Palmer
b2ce4ca6d5 merge dev, fix conflicts from package rewrite 2013-02-09 20:17:29 -08:00
Justin Palmer
a1a663cd30 implement indexOfPane in RootView to get array index
We need something like this because jquery's el.index() doesn't work
when multiple panes are spread out among different rows and columns.
2013-02-09 19:38:55 -08:00
Justin Palmer
c7c9656c46 remove drop dom manipulation from sortable-list
Not sure how we should handle generic drag and drop.  Tabs are more
complex because of multiple panels
2013-02-09 19:38:55 -08:00
Justin Palmer
be49f047e1 index -> sortable-index 2013-02-09 19:38:55 -08:00
Justin Palmer
b00df1aae0 sortableElement -> getSortableElement 2013-02-09 19:38:55 -08:00
Justin Palmer
8a50581430 rename sortable view to sortable list 2013-02-09 19:38:54 -08:00
Justin Palmer
9100367c12 very basic tab sorting 2013-02-09 19:38:54 -08:00
Nathan Sobo
d8111797ba RootView can no longer be focused.
Allowing root view to be focused was stealing focus away from the
editor whenever a click event made it to the root view. This unnecessary
switching of focus was interfering with the ability to drag tabs.

But if RootView can't be focused, focus ends up being returned to the
document body when there are no focusable elements. This would be fine,
except for the fact that we frequently bind global events on root view,
and so they aren't triggered when events are triggered on the body. We
could just bind all global events on the body, but this would require
us to always attach elements to the DOM during specs, which is a serious
performance killer in specs.

The workaround is in the keymap. When the keymap handles a key event
that was triggered on the body, it triggers the corresponding semantic
event on the root view anyway, so from the event perspective, it's as
if the root view actually had focus. The only place this might fall
down is if someone wants to capture raw key events. But that's the
keymap's job anyway, and we maybe add a hook on the keymap if such a
need ever arises.
2013-02-09 19:38:54 -08:00
Kevin Sawicki
75a9bce848 Support packages with CSON grammars 2013-02-09 12:41:51 -08:00
Corey Johnson & Kevin Sawicki
4619e1847f Manage package lifecycle in Atom instead of in RootView 2013-02-08 17:28:08 -08:00
Corey Johnson & Kevin Sawicki
bb5778b659 Move package related data to Atom from RootView 2013-02-08 17:28:08 -08:00
Corey Johnson & Kevin Sawicki
c27489f608 Remove name parameter from RootView.activatePackage 2013-02-08 17:28:08 -08:00
Corey Johnson & Kevin Sawicki
ed0ced205b Store packages in array instead of a hash by name 2013-02-08 17:28:08 -08:00
Corey Johnson & Kevin Sawicki
8434bdfe91 Load package's configDefaults in AtomPackage
This was previously loaded in RootView.
2013-02-08 17:28:08 -08:00
Corey Johnson & Kevin Sawicki
b93f404fa1 Store packages instead of package modules in RootView 2013-02-08 17:28:07 -08:00
Corey Johnson & Kevin Sawicki
0fddc08fe3 💄 2013-02-08 17:28:07 -08:00
Corey Johnson
6726303cb5 💄 2013-02-08 17:28:07 -08:00
Corey Johnson
14cfa22d22 Only require packages that have a main module 2013-02-08 17:28:07 -08:00
Kevin Sawicki
e04ecf836f Remove autoloadStylesheets ivar
This is no longer used now that the deferred package
has been deleted.
2013-02-08 17:28:07 -08:00
Kevin Sawicki
823db4cb22 💄 2013-02-08 17:28:07 -08:00
Corey Johnson & Kevin Sawicki
ac6ec1c2a7 Remove rootView as parameter to activate 2013-02-08 17:28:07 -08:00
Corey Johnson & Kevin Sawicki
659c6bbd56 Remove old style package support
All packages have been migrated to the new style.
2013-02-08 17:28:07 -08:00
Corey Johnson & Kevin Sawicki
db257e1811 Delete unused DeferredAtomPackage 2013-02-08 17:28:07 -08:00
Corey Johnson & Kevin Sawicki
2d80d27ca7 Modernize command-panel package with package.cson 2013-02-08 17:28:07 -08:00
Corey Johnson & Kevin Sawicki
833321fa23 Modernize fuzzy-finder package to use package.cson 2013-02-08 17:28:05 -08:00
Kevin Sawicki
cdf29691d7 Use same noop function for all disabled handlers 2013-02-08 17:28:04 -08:00
Kevin Sawicki & Nathan Sobo
641a0d43cc Retrigger event after package module is activated
The event that triggers the package module to be activated is
now retriggered after the package module is initialized but without
any previously registered handlers. Instead only the handlers registered
by the package module will be triggered.  The prior event handlers are then
restored after the event is retriggered.

This allows package modules to bind event handlers during initialization
that will be triggered by the same event that caused the package module
intialization to occur.  This simplifies the common case of having the same
event cause a package module to initialize and attach.
2013-02-08 17:28:04 -08:00
Kevin Sawicki
ed0de80af3 💄 2013-02-08 17:28:04 -08:00
Kevin Sawicki
7c41b15e00 Support activation events in package manifest
These events will load the package's main module
when first triggered.  The go-to-line package has been
migrated to use this new option.
2013-02-08 17:28:04 -08:00
Kevin Sawicki
d884bf58e8 Support specifying main module in package.cson
Migrated strip-trailing-whitespace package to include
a package.cson with a main being a file in the lib directory
instead of the index.coffee at the root of the package.
2013-02-08 17:28:04 -08:00
Kevin Sawicki
856b378f54 Set metadata to empty hash when missing 2013-02-08 17:28:04 -08:00
Kevin Sawicki
cd56d0a1d2 Remove unneeded pack check 2013-02-08 17:28:04 -08:00
Kevin Sawicki
16ff07d319 Use paths when loading grammars from workers 2013-02-08 17:28:04 -08:00
Corey Johnson & Kevin Sawicki
3b4f07701b Build packages using paths instead of filenames 2013-02-08 17:28:04 -08:00
Corey Johnson & Kevin Sawicki
bdac42b188 Don't directly require packages with manifests 2013-02-08 17:28:03 -08:00
Corey Johnson
3078d74e5d Refactor atom.coffee's package methods 2013-02-08 17:28:03 -08:00
Corey Johnson
74ae4a6413 Remove getTextMatePackages 2013-02-08 17:28:03 -08:00
Nathan Sobo
1cab51cefa RootView can no longer be focused.
Allowing root view to be focused was stealing focus away from the
editor whenever a click event made it to the root view. This unnecessary
switching of focus was interfering with the ability to drag tabs.

But if RootView can't be focused, focus ends up being returned to the
document body when there are no focusable elements. This would be fine,
except for the fact that we frequently bind global events on root view,
and so they aren't triggered when events are triggered on the body. We
could just bind all global events on the body, but this would require
us to always attach elements to the DOM during specs, which is a serious
performance killer in specs.

The workaround is in the keymap. When the keymap handles a key event
that was triggered on the body, it triggers the corresponding semantic
event on the root view anyway, so from the event perspective, it's as
if the root view actually had focus. The only place this might fall
down is if someone wants to capture raw key events. But that's the
keymap's job anyway, and we maybe add a hook on the keymap if such a
need ever arises.
2013-02-08 17:33:37 -07:00
Kevin Sawicki
a52983928e Remove unused code now in bracket-matcher package 2013-02-08 09:51:31 -07:00
Nathan Sobo
6e191aba5b Move matching bracket insertion to bracket-matcher package 2013-02-08 09:51:31 -07:00
Nathan Sobo
6be72bac54 Guard against undefined marker ranges 2013-02-06 20:45:50 -07:00
Justin Palmer
eb7f4514e4 Merge pull request #244 from github/ui-polish
Ui polish
2013-02-06 18:33:50 -08:00
Nathan Sobo
9c6b658fe5 Merge branch 'dev' into markers 2013-02-06 18:10:42 -07:00
Nathan Sobo
5b3755a170 Fix errors in benchmarks
One notable change is that if the editor has a display update pending,
we wait until it completes before moving on to the next benchmark.
2013-02-06 18:01:32 -07:00
Nathan Sobo
56c81ccf0f Memoize head and tail screen positions in DisplayBufferMarker 2013-02-06 17:32:13 -07:00
Nathan Sobo
0bd98bf8f8 Do a better job cleaning up after Editors and EditSessions
- EditSessions destroy their Selections when they are destroyed
- Editors destroy their EditSessions when they are destroyed
- Editors unsubscribe from the document and window when they are
  removed from the DOM.
- When an EditSession is destroyed via any code path, the Editor with
  that EditSession removes it.
- Selections no longer trigger 'destroyed' events if their parent
  EditSession has already been destroyed.

These are all really intertwined, so I'm doing them as one commit
since that was the only way to keep the specs green.
2013-02-06 16:54:19 -07:00
Justin Palmer
124b2c0c07 lets do just mini on the grammar overlay since it originates from the middle 2013-02-06 14:48:33 -08:00
Justin Palmer
3675407ca7 use from-bottom overlay for grammar view 2013-02-06 13:51:40 -08:00
Nathan Sobo
28c31dc2e1 Merge branch 'dev' into markers 2013-02-06 14:27:30 -07:00