aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPNarrowDownCompletion.m
Commit message (Collapse)AuthorAgeFilesLines
* - Fix issues undoing past an autocompletion type-through, addressing ↵rowanbeentje2011-08-261-0/+2
| | | | exceptions (log #1847)
* Fixes source text encoding problems accidentally introduced in r3273sqlprodev2011-04-141-1/+1
|
* SP_REFACTOR: Workaround for naming conflict with ↵sqlprodev2011-04-141-1/+1
| | | | postNotificationOnMainThread: which also exists in TCMPortMapper.framework; NSUserDefaults access now permitted in SP_REFACTOR blocks for a few prefs keys
* initial commit of SP_REFACTOR ifdefs, the start of a long quest to separate ↵sqlprodev2011-04-111-3/+11
| | | | UI code from functional code
* Fix more compiler warnings, including a few bugsrowanbeentje2011-03-081-5/+5
|
* fixed compiler warningssqlprodev2011-03-011-2/+2
|
* • fixed completion issue via alias namesBibiko2011-01-211-6/+12
|
* • fixed issue for placeholder insertion while completion of already ↵Bibiko2011-01-211-4/+15
| | | | | | backticked names and the final insertion - part 2 - also fixed undo behaviour
* • fixed issue for placeholder insertion while completion of already ↵Bibiko2011-01-211-5/+14
| | | | backticked names and the final insertion
* • fix table name encoding problem (return name can be NSNull) which can ↵Bibiko2010-12-111-0/+1
| | | | | | arise while SPTablesList updateTables method, • added [theView breakUndoCoalescing]; before inserting the grey completion suggestion due to possible undo exceptions
* - Fix behaviour of manually-triggered autocomplete following recent changesrowanbeentje2010-12-071-16/+18
|
* - Clean up placeholder removal code, and improve speed of full clean slightlyrowanbeentje2010-12-011-35/+47
| | | | | - Fix deletion of text after the caret when moving through autocomplete suggestion lists
* - Rework insertCommonPrefix to insertAutocompletePlaceholder, implementing ↵rowanbeentje2010-11-301-48/+69
| | | | | | | | | 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.
* Minor tweaks to autocompletion:rowanbeentje2010-11-061-0/+6
| | | | | | - Show the text cursor at the location future input will be inserted for clarity - Show autocompleted text faded to indicate it's temporary and may be replaced by other keypresses
* - Split out all of SPExportController's delegate methods to their own category.stuconnolly2010-10-241-2/+0
| | | | | | | | - Prepare for the implementation of PDF and HTML export by hiding the export options box for export types that don't need it. - Fix some spacing issues on the export dialog. - Create a new SPCategoryAdditions header that is included in the apps precompiled header, making all additions available to all classes. - Update strings files.
* Considering nearly every class uses constants, import it via the prefix header.stuconnolly2010-10-191-3/+0
|
* Remove unused macros as well as macros that were only used in a single place ↵stuconnolly2010-09-291-4/+6
| | | | from the precompiled header.
* • overall replacement of:Bibiko2010-08-201-3/+3
| | | | | | | | | [aString appendString:[NSString stringWithFormat:]] by [aString appendFormat:] since it's much more faster • first look at loop where several [aStr appendString:] occur to try to combine them into one appendString or appendFormat since the allocation of memory takes really time Note: I tested all my changes but we should test it further to be sure that I didn't a mistake!
* • auto-completion in Query Editor now detects whether the caret is inside ↵Bibiko2010-08-161-0/+6
| | | | quotes or not in order to come up with the correct suggestions
* - Tweak custom query autocompletion to no longer show a key-capturing ↵rowanbeentje2010-07-171-2/+6
| | | | invisible empty autocomplete when no autocomplete matches are found
* Rename CMTextView to SPTextView.stuconnolly2010-05-271-1/+1
|
* Merge in minor fixes from 0.9.8 RC merge review:rowanbeentje2010-04-241-2/+2
| | | | | | - Make a tiny fix to narrow down completion to avoid memory overrelease issues - Unhide the "Show create view syntax" menu and contextual menu items when selecting a view
* - SPNarrowDownCompletion: Pass NSApp certain events *after* processing ↵rowanbeentje2010-04-231-2/+3
| | | | locally, to fix further crashes like http://spbug.com/l/139 .
* - Allow CMTextView to track SPNarrowDownCompletion state, ensuring old ↵rowanbeentje2010-04-221-8/+21
| | | | | | | windows are closed. This also allows SPNarrowDownCompletion to be closed when CMTextView is deallocated; this should fix http://spbug.com/l/139 . - Fix some minor memory leaks
* Review usage of notifications, afterDelay: and waitUntilDone:NO calls:rowanbeentje2010-04-121-0/+1
| | | | | | | - Add more calls to deregister watchers to fix crashes to closing threads or objects - Fix a couple of memory leaks - Alter a few calls to be performed on main thread (afterDelay: operates on the thread is is called on) - this fixed database reloading after import and field/index deletion error sheets
* Tried to fine-tune the auto-completion behaviour esp. for automatically ↵Bibiko2010-04-071-1/+54
| | | | | | 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.
* • overlapping of completion windows after refreshing its content if db ↵Bibiko2010-04-061-3/+7
| | | | | | structure fetching was finished - for some reasons it could happen that the timer? fires twice, to avoid this changed the re-invocation strategy
* • completion listBibiko2010-04-061-43/+54
| | | | | - unified scroll behaviour - fixed some issues if animated "fetching data…" row is displayed incl. a fix to avoid overlapping completion windows
* • fixed issue for refreshing the completion list after finishing the ↵Bibiko2010-03-311-2/+2
| | | | | | structure querying - set variable directly and call [self close] explicitly
* • fixed issue for completion window if animated sync icon is shownBibiko2010-03-311-6/+25
| | | | | - init all column' data cells according to their settings to avoid jittering and font size change - this fix also removed one issue for 'overlapping' completion windows
* • if document window will close sent a ↵Bibiko2010-03-311-2/+2
| | | | | | 'cancelPreviousPerformRequestsWithTarget' to the custom query editor to stop auto-completion and auto-help timer to avoid crashes after closing • improved some minor stuff for completion's re-invocation
* • querying for db structure is queued for the same connection to avoid ↵Bibiko2010-03-311-13/+105
| | | | | | | | | | | '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!
* - db structure for tables and views will now be queried by using SHOW… ↵Bibiko2010-03-281-5/+9
| | | | | | | | | | | statements - completion now works for server versions < 5 as well - proc/func info will be queried by using information_schema for mysql >= 5 - changed completion logic to handle new format - completion will get the info from SPNavigator since this controller caches all information about db structure - optimization and fine-tuning will follow very soon
* General tidy up, with a focus on consolidating more constants in ↵stuconnolly2010-03-241-2/+3
| | | | SPConstants.h/m.
* • further work on Navigator (not yet active but workable -> unHide menu item)Bibiko2010-03-191-6/+12
|
* - fixed bug for nested snippets if a nested snippet is located at the very ↵Bibiko2010-03-171-0/+4
| | | | | | end of the text buffer and has no default value - added a range sanity check for completion before insertion of the chosen item
* • Query FavoritesBibiko2010-03-161-0/+6
| | | | | | | | | - 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
* Following a manual code review, fix some local variables overriding global ↵rowanbeentje2010-03-151-0/+1
| | | | variables, a few leaks, and additional nil setting/checking to prevent overreleases or releases of random areas of memory.
* • append () after completion of a stored procedureBibiko2010-03-111-2/+2
|
* • auto-completionBibiko2010-03-101-0/+7
| | | | | - suppress completion window if only one item is found and the typed word is equal to it (case-insensitively) - fixed memory leak
* • added $SP_ASLIST_ALL_FIELDS_FROM_SELECTED_TABLE as pre-defined snippet listBibiko2010-03-091-2/+7
| | | | | • added Show Completion List submenu to the Custom Query Editor gear menu with the items all dbs ^1, all tables ^2, all fields ^3 • if dbStructure is available show these pre-defined completion lists with all info like the completion it does, otherwise fall back to plain style
* • fixed bug in snippet list - now it inserts the chosen item correctly ↵Bibiko2010-03-091-0/+1
| | | | | | | | | | | | | after narrow-down the list • added chance to invoke the snippet list in fuzzy search mode by the template ¦¦a¦b¦¦ • added new snippet placeholders: ¦$SP_ASLIST_ALL_TABLES¦ displays a list of all tables incl. views from the current db ¦$SP_ASLIST_ALL_DATABASES¦ displays a list of all dbs from the current connection This makes it possible to write eg a query fav: USE ¦¦$SP_ASLIST_ALL_DATABASES¦¦; to search via fuzzy mode for a db and to use it
* • improved tooltip behaviour of SPNarrowDownCompletion's tableViewBibiko2010-03-091-0/+58
| | | | • added "Filter Tables…" ^⌥⌘F" to main menu > Table which sets the focus to TablesList's search field if visible
* • fixed some minor GUI issues for SPNarrowDownCompletion windowBibiko2010-03-091-6/+22
| | | | - added oneColumn mode for dict and list view to decrease the window's width
* • added possibility to define a snippet via ¦a¦b¦ – such a snippet ↵Bibiko2010-03-081-1/+1
| | | | | | | | will be shown as completion list with the items “a” and “b” • set auto-completion default Pref setting to true • fixed some auto-completion issues like do not insert common prefix automatically and some others • applied ¦a¦b¦ template to CompletionTokens.plist and some tiny corrections and improvements
* • outsourced keyword completion and function completion lists to ↵Bibiko2010-03-081-15/+23
| | | | | | | | | | | 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
* • function completionBibiko2010-03-071-2/+7
| | | | | - do not insert () after a function if inserted string ends with ) - no snippet insertion for () - only locate the caret inside ()
* • added to CustomQuery's CMTextView the option to set auto-completion ↵Bibiko2010-03-071-4/+15
| | | | | | 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
* • CMTextView completionBibiko2010-02-191-1/+7
| | | | - if user types foo. while completion list is open and no suggestion is found re-invoke completion automatically due to the fact that it's very likely that the user wants to insert either a table or field
* • improved completion behaviour of suggestions containing spaces; a second ↵Bibiko2010-02-051-5/+11
| | | | space will cancel the list to allow a more natural typing