aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPNarrowDownCompletion.h
Commit message (Collapse)AuthorAgeFilesLines
* Changing SP_REFACTOR macro to SP_CODAsqlprodev2013-02-141-2/+2
|
* Fix warnings due to not conforming to 10.6 protocols.stuconnolly2013-01-241-4/+0
|
* Change Sequel Pro's license from GPL (version 2) to MIT.stuconnolly2012-07-251-16/+22
|
* Final feature work on the SPMySQL branch before merging:rowanbeentje2012-03-141-1/+4
| | | | | | | | - Add a ping keepalive managing object to prevent retain cycles from the NSTimer - Add -[SPMySQLConnection copy] support - Refactor Hans-Jörg Bibiko's database structure retrieval, moving it out of the MySQL framework and building it around a copy of the connection. This reduces the amount of connections-over-time used by Sequel Pro to two constant connections (addressing Issue #1097) and improves robustness. - Use the database structure retrieval connection for faster query cancellation without an extra connection required, if possible
* initial commit of SP_REFACTOR ifdefs, the start of a long quest to separate ↵sqlprodev2011-04-111-1/+7
| | | | UI code from functional code
* Fix more compiler warnings, including a few bugsrowanbeentje2011-03-081-1/+1
|
* • fixed completion issue via alias namesBibiko2011-01-211-1/+2
|
* - Clean up placeholder removal code, and improve speed of full clean slightlyrowanbeentje2010-12-011-1/+1
| | | | | - Fix deletion of text after the caret when moving through autocomplete suggestion lists
* - Rework insertCommonPrefix to insertAutocompletePlaceholder, implementing ↵rowanbeentje2010-11-301-2/+3
| | | | | | | | | a more Mac-like behaviour: insert a faded placeholder for the currently selected autocomplete item. - Update the autocomplete placeholder when the autocomplete dropdown selection is changed - Clean up methods for removing placeholders, and ensure the placeholder is always removed (fixes issues with pasting with a placeholder visible, etc) - When the Help window is closed, switch off AutoHelp - this will aid in supporting those users who accidentally switch on AutoHelp and then can't figure out how to switch it off, resulting in returning windows.
* Tidy up.stuconnolly2010-10-191-3/+0
|
* Tried to fine-tune the auto-completion behaviour esp. for automatically ↵Bibiko2010-04-071-0/+2
| | | | | | inserted suggestions and increased the minimum auto-complete delay to 0.5s since below that a fight between computer speed and user typing speed could occur. This addresses i625.
* • querying for db structure is queued for the same connection to avoid ↵Bibiko2010-03-311-1/+13
| | | | | | | | | | | 'overlapping' access to global variables • after querying db structure write back data on main thread • completion list displays animated sync images if connection is just querying db structure data • fixed some minor issue for completion list • make sure that if last window of a connection is closed all relevant data will be removed from global variables Note: please test!
* General tidy up, with a focus on consolidating more constants in ↵stuconnolly2010-03-241-2/+0
| | | | SPConstants.h/m.
* • Query FavoritesBibiko2010-03-161-0/+1
| | | | | | | | | - added support for mirrored snippets $x x:= to be mirrored snippet index - example: SELECT $1.${2:} FROM ${1:¦$SP_ASLIST_ALL_TABLES¦} WHERE $1.${3:} = ${4:value} AND $1.$2 = • CMTextView - fixed completion issue for fuzzy search - added {} chars as auto-pair for connivence
* • fixed some minor GUI issues for SPNarrowDownCompletion windowBibiko2010-03-091-1/+2
| | | | - added oneColumn mode for dict and list view to decrease the window's width
* • outsourced keyword completion and function completion lists to ↵Bibiko2010-03-081-0/+3
| | | | | | | | | | | CompletionTokens.plist • SPQueryController manages keyword and function completion lists now; this reduces the memory usage a bit and the list is easier to edit • added pre-defined function argument snippets to CompletionTokens.plist (auto-generated from mysql's HELP) • added Preference option for Editor whether a function completion should insert () and if found the function argument snippets automatically or not - last ) will be linked as autopaired then • changed behaviour for wrapping a selection into `"'() etc. - now it re-selects the original selection after wrapping and in addition last wrap character is now marked as autopair-linked • improved logic for popping up the auto-completion list
* • added to CustomQuery's CMTextView the option to set auto-completion ↵Bibiko2010-03-071-1/+2
| | | | | | on/off, settable in Prefs and gear menu - if inserted completion is marked as function it inserts snippet (${}1:) so far; function parameters as snippets follows soon
* • improved completion behaviour of suggestions containing spaces; a second ↵Bibiko2010-02-051-0/+1
| | | | space will cancel the list to allow a more natural typing
* • further improvements to allow to insert programmable query favorites (as ↵Bibiko2010-01-251-1/+2
| | | | | | | | snippets) - not yet finished but workable eg fav: "SELECT ${1:`mysql`.`user`.} FROM ${2:`mysql`.`user`} ${3:WHERE}" bound to tab trigger "sel"; then write "sel" press ⇥ to expand, change `mysql`.`user`. or press ESC to insert a field, press ⇥ to select `mysql`.`user`to change if desired, etc. or press ⇧⇥ to select prev. snippet • completion can now be invoked via selection - some other tiny improvements
* • completionBibiko2010-01-211-0/+1
| | | | | | | - CTRL+ESC invokes the fuzzy search completion; eg: i_s.pcss. will show all fields from `information_schema`.`PROCESSLIST`. if no other matches are found; the search is a regexp ".*?i.*?_.*?s.*?\. …" etc. by using RegexKitLite which is much more faster than NSPredicate and can handle long regexps - improved type display: if a type definition contains a , split it to avoid splitting of the tokenFields - while insertion of an item and holding down the CTRL key the list keeps open to allow to insert more suggestions separated by ", " from the current list (very useful if one wants to insert only selected fields from a table)
* • completion enhancementsBibiko2010-01-211-2/+6
| | | | | | | - TAB and mouse double-click inserts suggestion - field type info for 'set' and 'enum' is fixed; in addition show an arrow to show the definition - preparations for fuzzy search completion (not yet active) - reduced the font size by 1pt to avoid truncating
* • completionBibiko2010-01-201-0/+1
| | | | | | | | - auto-completes the common prefix of all suggestions - makes typing much more faster - “ ” as allowed character to be typed for narrow-down the list is set automatically if at least one suggestion contains a “ ” - fixed two tiny memory leaks - fixed detecting db/table/field names containing ` as char - removed ⇥ binding to complete the common prefix since it's done automatically
* • improved completion for Query Editor bound to ESCBibiko2010-01-191-1/+4
| | | | | | | | | | | | | | | - up to now for MySQL >4 available - implemented by narrow-down, i.e. write/delete to narrow-down/expand the suggestion list - ↩ inserts the suggestion, if suggestion is db/table/field/proc/func name inserts backtick quoted - for a db/table/field/proc/func name press ⇧↩ to insert à la `db`.`table`.`field` relatively to the current selected db - context-sensitive to leading db. or table. or db.table. or .table if uniquely identifiable - mysql and information_schema if available and not selected appear at the end - `|` | := caret shows the current table's fields if any or the current selected db if selected at the top; suggestions are hierarchically arranged by db, table; easiest way to insert a table/field name - e.g. type `max_c` and press ⇧↩ to insert `mysql`.`user`.`max_connections` - for table/field name suggestions press at the right column to get the path info • F5 invokes completion based on spell checker and selected language - since it is not possible to auto-detect if the user wants to complete MySQL statements or prose text Note: GUI needs improvements; completion should be tested exhaustively
* • refactored parsing code for F5 completionBibiko2010-01-151-4/+4
| | | | | - improved ⇧↩ insertion - improved backtick behaviour
* • F5 compeltionBibiko2010-01-131-1/+3
| | | | | - fixed issues if no db is selected - trial: ⇧↩ inserts the entire path db.table or db.table.field; if invoked inside of backticks backticked
* • further improvements for F5 completionBibiko2010-01-131-1/+6
| | | | | | | - first steps for context-sensitive completion: parse left side of current word to look for db.table.field constructions - eg type: mysql.user. and press F5 Note: work in progress :)
* • made lexer 64bit compatibleBibiko2010-01-101-1/+2
| | | | | | - 'int' has to be replaced by 'size_t' • F5 completion - if inside of backticks after completion move caret one char rightwards to go out of the backticks
* Tidy up.stuconnolly2009-11-071-1/+0
|
* • added SPTooltip classBibiko2009-08-111-1/+1
| | | | | | - initial setup - display a text or HTML tooltip for general messages under the caret position or located somewhere via initializing • fixed naming issue in SPNarrowDownCompletion
* Merge framework integration branch back to trunk. Summary of changes:stuconnolly2009-07-211-2/+2
| | | | | | | | | | | | | | | - Includes all custom code from subclasses CMMCPConnection and CMMCPResult, meaning they have subsequently been removed from the project. - All previous Sequel Pro specific code in the above subclasses has been removed in favour of the delegate (currently set to TableDocumet) informing the framework of such information. - All references to CMMCPConnection and CMMCPResult have subsequently been changed to MCPConnection and MCPResult. - Framework includes MySQL 5.1.36 client libraries and source headers. - Framework is now built as a 4-way (32/64 bit, i386/PPC arch) binary. - All import references to <MCPKit_bundled/MCPKit_bundled.h> have been changed to <MCPKit/MCPKit.h>. - New script 'build-mysql-client.sh' can be used to build the MySQL client libraries from the MySQL source. See the script's header for a list of available options or run it with no arguments to display it's usage. Note that there are still a few changes to be made to the framework with regard to removing Sequel Pro specific calls to the delegate. These however can be made later on as they have no effect on functionality and are merely design changes. Also, note that any future development done on the framework should be made to be as 'generic' as possible, with no Sequel Pro specific references. This should allow the framework to be integrated into another project without the need for SP specific code.
* • moved macros enumerate() and sizeOf() to sequel-pro_Prefix.pchBibiko2009-06-061-9/+0
| | | | | | • added to SPArrayAdditions.m - (NSArray *)subarrayWithIndexes:(NSIndexSet *)indexes • added "Copy as SQL INSERT" to MainMenu (not yet activated) • added to CMCopyTable - (NSString *)selectedRowsAsSqlInserts for copying selectedRows as INSERT INTO ... string (under constructions, up to now it works for strings)
* • improved narrow-down completionBibiko2009-05-241-0/+1
| | | | | - added support for "in-quote completion" based on suggestions of the spell checker dict and the current used words in the textView - still bound to F5
* • activate Preference setting for caret colorBibiko2009-05-241-1/+2
| | | | | | | | • added prototype for new completion (ESC -> Cocoa, F5 -> new completion) - not yet finished - TODO: -- support for NSSpellChecker items -- images for different types of suggestions like proc/func/tabkle/view/sql statement, db name, etc.
* • added class to support narrow-down completion in the Query EditorBibiko2009-05-241-0/+65
- an image can be added - display and insert string can differ - fully customizable This class is based on TextMate's TMDIncrementalPopUp implementation (Dialog plugin) written by Joachim Mårtensson, Allan Odgaard, and H.-J. Bibiko. see license: http://svn.textmate.org/trunk/LICENSE