Commit Graph

409 Commits

Author SHA1 Message Date
Allan Odgaard
9f6b400ffd Checkin release notes v2.0-alpha.9302 2012-09-07 16:25:26 +02:00
Allan Odgaard
ffeb4ff991 Add simplistic parser for proxy item queries
This only support ‘||’ to allow chained queries, e.g.: ‘action.build || format.strong’.
2012-09-07 16:18:04 +02:00
Allan Odgaard
fd2374e6c6 Don’t use virtual path for retrieving settings 2012-09-07 16:18:04 +02:00
Allan Odgaard
96ba797043 Show proxy item in menu when nothing matched
This way we can have “Lookup Word” in the Source menu being a proxy for “lookup.documentation” and simply rendered as disabled when the current language have no such functionality.
2012-09-07 16:18:03 +02:00
Allan Odgaard
2678358ff9 Encapsulate proxy expansion code
How a proxy items are expanded is not something user code should concern itself with.
2012-09-07 16:18:03 +02:00
Allan Odgaard
e33c680269 Fix potential out-of-range access
When we update the text view frame we implicitly cause the gutter to refresh, which will ask for line records from the text view based on the selection, so we should ensure the selection is up-to-date before changing frame size.
2012-09-07 16:18:03 +02:00
Allan Odgaard
521b981f09 fixup! Fix warning for literal strings used with NSAlert
Since we use another way to initialize the alert, the return codes are different.
2012-09-07 16:17:18 +02:00
Allan Odgaard
bfc3804520 Show matched items for proxies in menu
This means e.g. Bundles → SCM will show the SCM actions available in the current context.
2012-09-06 23:18:42 +02:00
Allan Odgaard
8cf6f94f13 Refactor OakShowMenuForBundleItems 2012-09-06 23:10:56 +02:00
Allan Odgaard
8f5ddc672f Move bundles pop-up menu to BundleMenu library 2012-09-06 23:10:56 +02:00
Allan Odgaard
cf5e9f1530 Leave autoenablesItems at its default value 2012-09-06 23:10:56 +02:00
Allan Odgaard
f57d35362e Rename method: scope → scopeContext
This is to avoid a clash as there is also another method called scope (WebKit / DOM).
2012-09-06 23:10:56 +02:00
Allan Odgaard
f9133694f8 For items without a key equivalent, use proxy’s 2012-09-06 23:10:56 +02:00
Allan Odgaard
73d586c2ba Use helper for bundle item’s key equivalent
This is to allow a bundle item to display another key than the one assigned to the item, e.g. when the bundle item is matched by a proxy item it should show that item’s key equivalent.
2012-09-06 23:10:56 +02:00
Allan Odgaard
4772938deb Filter duplicate in bundle item chooser
Duplicates can exist when proxy items “expand” to items already in the list.
2012-09-06 23:10:55 +02:00
Allan Odgaard
79254cbb6b Add find{Next,Previous}AndModifySelection: action methods
Presently no keys or menu items bound to these.
2012-09-06 23:10:55 +02:00
Allan Odgaard
2ab6f4bfc8 Introduce an “extend selection” find option
This will find (forwards or backwards) but preserve the existing selection.

Presently if the current selection is a zero-width selection (i.e. caret) then we still preserve it. This might not be desired, but one could imagine “extend selection” used with a regular expression which use a look-around assertion (resulting in zero-width matches).
2012-09-06 23:10:55 +02:00
Allan Odgaard
2c572b5921 Add initializer list constructor to ng::ranges_t
This is primarily for using in tests.
2012-09-06 23:10:55 +02:00
Allan Odgaard
bca2b4f8c8 Don’t include existing text for “search highlights”
This is e.g. when one does Find All with one instance already selected, that one instance is left out of the found instances being highlighted.
2012-09-06 23:10:55 +02:00
Allan Odgaard
41ab738d19 Change colorWithCGColor: → tmColorWithCGColor:
On Mountain Lion the OS provides a colorWithCGColor: which tmColorWithCGColor: now wraps for (when available).

This fixes a warning when building with the 10.8 SDK.
2012-09-06 23:10:55 +02:00
Allan Odgaard
2076f80ca8 Make selections created from string unanchored
The selection string syntax doesn’t support specifying an anchor and mainly it is used in situations where the selection should be unanchored.
2012-09-06 14:08:08 +02:00
Elia Schito
6dde27d33c Add revision numbers to release notes 2012-09-05 16:25:20 +02:00
Allan Odgaard
7631add8e5 Checkin release notes 2012-09-05 15:28:57 +02:00
Allan Odgaard
8849899007 Fix crash for missing grammars
Incase our index is out-of-date and we try to load and parse a grammar that does not exist on disk, we would get a grammar_t with a “null” root rule, this would later crash when trying to use the grammar.

As a simple fix we now ensure a dummy rule always exist.
2012-09-05 15:23:40 +02:00
Allan Odgaard
b3f5960546 Resolve path when Bundles folder is a link
This would cause a crash if the Bundles folder was a symbolic link (e.g. to DropBox) since we assumed the entry itself had entries (but only directory nodes have entries).

This closes issue #321.
2012-09-05 15:21:03 +02:00
Allan Odgaard
4faeec4795 Checkin release notes 2012-09-04 23:53:37 +02:00
Allan Odgaard
2b555aef7b Move spelling dot to OakTextView
We now load the image via NSImage and creates a CGImageRef from that (based on the current graphics context). This ensures we get the @2px version when on a HiDPI display.
2012-09-04 23:53:37 +02:00
Allan Odgaard
b6ed16251e Use wrapper for CGContextRef
This allows us to add a few other things like the “misspelled word” image.
2012-09-04 23:53:37 +02:00
Allan Odgaard
81de007bd4 Use new API for better bundle item display names 2012-09-04 20:34:54 +02:00
Allan Odgaard
4b8f7389fb Make hasSelection a public property 2012-09-04 20:33:28 +02:00
Allan Odgaard
1bc81ed7dc Introduce API for proper bundle item titles
When a bundle item’s title contains “«unit» / Selection” then the UI should only show either “«unit»” or “Selection” depending on whether or not the text view has selected text.
2012-09-04 20:32:43 +02:00
Allan Odgaard
a026e4ad11 Improve snippet choice menu
We filter out items that doesn’t have the current prefix and deselect current item if the user deletes the selection.

Some of this logic should probably be encapsulated by a filterPrefixString property added to OakChoiceMenu. This will also avoid the visual flash which arise when filtering the menu and selection changes (since we do one redraw w/o any items selected).
2012-09-04 19:22:53 +02:00
Allan Odgaard
141c0bd525 Don’t scroll selected item to top in choice menu
We now only ensure it is scrolled into the visible area.
2012-09-04 19:22:53 +02:00
Allan Odgaard
b136fcbca4 Proper implementation of setChoices:
This will now reload the table view and resize the pop-up (if necessary).
2012-09-04 19:22:52 +02:00
Allan Odgaard
949c074f9d Factor out choice menu sizing code 2012-09-04 19:22:52 +02:00
Allan Odgaard
c61977ea57 Use outlet for bundles menu item
This way we don’t rely on the menu item title (which could be localized).
2012-09-04 19:22:52 +02:00
Allan Odgaard
456072c798 Re-save with Xcode 4.4.1 2012-09-04 19:22:52 +02:00
Allan Odgaard
049611064d Handle bundle item keys in OakMainMenu
This is an attempt of simplifying the arcane key equivalent handling.
2012-09-04 19:22:52 +02:00
Allan Odgaard
17720e4d57 Don’t dispose bundle menus after close
Since we overload performKeyEquivalent: for the main menu to not search the bundle menus, there should no longer be a need to try and prevent the system from interpreting key equivalents for bundle menu items.
2012-09-04 19:22:52 +02:00
Allan Odgaard
18175e455a Position filter lists relative to parent window
I am not sure if this is desired for the Go to Symbol as some people prefer to keep this open at all time.
2012-09-04 19:22:51 +02:00
Allan Odgaard
e3e238f712 Filter lists: Allow showing relative to parent window 2012-09-04 19:22:51 +02:00
Allan Odgaard
d5a262c1e5 Checkin release notes 2012-09-04 00:00:36 +02:00
Allan Odgaard
0fd7d2a41b Implement Wrap Column → Other…
This is done using an alert with an accessory view. Not the best user experience, but given how rarely the user interacts with this, I wasn’t really in the mood to spend a lot of time on this part now (can always be improved later).

Closes issue #200.
2012-09-03 22:35:12 +02:00
Allan Odgaard
8b65acf393 Reverse menu search order
This is specifically to find the actions bound to modifier + [, {, }, and ] before finding the actions bound to modifier + numbers, since on some keyboards, modifier + number results in one of the brace characters.

This should address issue #374 (although this isn’t a fix per se for the underlying problem of having some key maps result in duplicate keys in the menus).
2012-09-03 22:00:23 +02:00
Allan Odgaard
aa2b194341 Better ordering of keys when editing bundle items
This closes issue #338.
2012-09-03 21:52:44 +02:00
Allan Odgaard
f8db67153b Support custom sort order of plist keys 2012-09-03 21:51:31 +02:00
Allan Odgaard
709882fa53 Drag-selecting beyond visible document lacked refresh
This closes issue #297.
2012-09-03 17:59:41 +02:00
Allan Odgaard
59b47e76f0 Fix parent for smart folders 2012-09-03 17:37:11 +02:00
Allan Odgaard
8c55703dea Show Package Contents work for packages with own data source
For example Xcode projects now have their target (URL) set to xcodeproject://path/to/project/file which would cause Show Package Contents to not work, as it expected a file URL.
2012-09-03 17:37:11 +02:00
Zach Drayer
55c0109fa9 Add support for reading xcodeproj files 2012-09-03 17:37:11 +02:00