aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
Commit message (Collapse)AuthorAgeFilesLines
* - Work through static analysis of the source, fixing a number of small ↵rowanbeentje2009-12-141-2/+2
| | | | memory leaks and fixing a couple of over-releases
* • fixed issue for "Update Help while typing" to suppress opening the MySQL ↵Bibiko2009-12-031-2/+2
| | | | documentation periodically if no internal help can be found
* Replace the use of hard coded preference keys with constants to prevent ↵stuconnolly2009-10-171-19/+20
| | | | issues such as the one fixed in revision 1419. All future preference usage should be done so using these constants.
* • updated SPQueryFavoriteManager to mange document-based and global query ↵Bibiko2009-09-071-1/+1
| | | | | | | favorites • disabled "Select Active Query" in CMTextView if shown in the favorite manager • code cleaning and simplifications
* Update Localizable.strings by running genstrings and remove use of multiple ↵stuconnolly2009-08-281-1/+1
| | | | comments for a single string.
* • tiny improvements for loading SQL files and syntax highlightingBibiko2009-08-281-8/+14
|
* • fixed bug while uppercasing keywordsBibiko2009-08-271-6/+13
| | | | - inserting a char within an already marked keyword doesn't end up in inserting a uppercase char if resulting word won't be a new keyword
* • some corrections for Custom Query completionBibiko2009-08-041-24/+14
| | | | | | - fixed issue if caret is inside `` for the narrow-down completion - fixed issue to add all 'Functions' for the "normal" completion - some minor code cleaning
* Merge framework integration branch back to trunk. Summary of changes:stuconnolly2009-07-211-3/+1
| | | | | | | | | | | | | | | - 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.
* • Comment current Query/SelectionBibiko2009-07-151-5/+0
| | | | | | | - changed comment string to "-- " - fixed bug in uncomment - added gear menu item -- TODO: change menu item title according to selection/current query (coming soon)
* • initial support for ⌘/ in CustomQuery editor to (un)comment out the ↵Bibiko2009-07-151-1/+5
| | | | | | current query or selection by inserting "# " at the begin of each line - Note: not yet finished completely
* • fixed dealloc of 'suggestions' in SPNarrowDownCompletionBibiko2009-07-151-15/+11
| | | | | • deleted (void)paste hook from CMTextView (not needed anymore) • decreased iteration cycles for 'normal' completion (ESC) by getting only the unique words from the current textView
* • narrow-down completion (F5)Bibiko2009-07-151-20/+10
| | | | | - added view icon for Views - improved some tiny code snippets
* - Make the DBView window the document window. This allows the document to ↵rowanbeentje2009-07-151-1/+3
| | | | | | | | | | be closed when the window is closed, freeing the document's memory - Update a number of dealloc methods to include more retained memory, and to avoid releasing non-retained memory - Remove notification observers and delegates where appropriate to avoid issues after document closing - Fix a couple of memory leaks - Support window cascading for all windows past the first, using the first window as the autosave window
* • fix for completion in CustomQuery editorBibiko2009-07-141-78/+26
| | | | | | | - now the gathering of suggestions does not query the MySQL connection, instead it uses the TableList/TableDocument tableView data as a kind of cache - this approach should improve the speed for slow server connections TODO: auto-update for TableList and Database List resp. (it could happen that an other user changed the name of a table/db meanwhile)
* Fixed some memory leaksbamse162009-07-061-8/+12
|
* • trial to improve the Undo behaviour in the Custom Query editorBibiko2009-06-251-1/+3
|
* • some code cleaning and tiny performance enhancements for syntax highlightingBibiko2009-06-211-39/+31
|
* • added support to drag&drop textClipping files to Custom Query Editor and ↵Bibiko2009-06-191-1/+13
| | | | | | | to editSheet • fixed tiny issue for narrow-down completion
* • added to SPArrayAdditions.h: NSArrayObjectAtIndex() inline functionBibiko2009-06-181-5/+6
| | | | | | | | | - id o = NSArrayObjectAtIndex(anArray, index) :== id o = [anArray objectAtIndex:index] - this speed up it ~3µs per call - replaced that inline function for such calls within loops to speed up them • used IMP function pointers for keepAlive calls within queryString: • set -O3 (Fastest) compiler option • allow in preference pane "Tables" to set the Limit up to 50000
* • introduced inline function NSStringUTF8String() to SPStringAdditions.hBibiko2009-06-181-1/+2
| | | | | | - NSData *d = [aStr UTF8String]; :== NSData *d = NSStrignUTF8String(aStr) but a tick faster • implemented NSStringUTF8String() in queryString: and for the lex parser (syntax highlighting)
* • deleted the drag&drop feature of file path or content from ↵Bibiko2009-06-151-0/+172
| | | | | | | | | | | SPTextViewAdditions - that feature should be added by subclassing NSTextView • fixed focus setting of editSheet • fixed general issue if SP tries to execute a query which is longer than max_allowed_packet - now it reconnects after changing max_allowed_packet (if it's editable) - the user will be informed via a log entry about that change - the new max_allowed_packet size will be valid during the current session; after reconnection to that db the default size will be used
* • moved code for de/increasing font and drag&drop feature (content or ↵Bibiko2009-06-131-214/+0
| | | | | | | | | | | | | | while holding ⌘ path) to SPTextViewAddition - two finger zooming gesture is disabled for NSTableView cells - i.e. all NSTextViews including NSTableView cells inherit these feature • simplified QuickLookFormat IBActions - added bin/text storing type to each action • QuickLook animation set to SP's window middle point • fixed issue that while having an image in editSheet an attribute change (font/size) in the editTextView destroyed the image data • fix to allow again drag&drop an image to editSheet • hide text/image/hex segment controll and QuickLook pull down button if user chose multipleLineEditingButton for non-blob fields • disabled NSLog of print result in TableDocument
* • fixed bug for "Show help while typing" - prevent an internal loop of ↵Bibiko2009-06-091-1/+2
| | | | calling ShowMySQLHelpForCurrentWord if "Highlight the current Query" is activated.
* • improved "Copy as SQL INSERT" (still hidden)Bibiko2009-06-071-1/+8
| | | | • disabled "Copy with Column Names" if Custom Query editor is active
* • improved: sped up removing the background color for query highlightingBibiko2009-06-061-0/+3
| | | | • added: DELIMITER to the completion suggestions
* • reload table list, database pull-down menu according to user's ↵Bibiko2009-06-051-1/+4
| | | | | | | | | statements in the Custom Query editor if necessary - if statement begins with: use, create, alter, rename, drop • reload table list, database pull-down menu according to imported statements • sped up "Import MySQL Dump" • fixed some tiny issues of the last commit
* Fixed some memory leaks found using llvm/clang. There are still some to fixbamse162009-06-051-5/+11
|
* • added: syntax highlighting to the HUD window "Show Create Syntax"Bibiko2009-06-041-0/+8
| | | | • fixed: context menu item validation for "Show MySQL Help": hide it when no connection to the customQueryInstance is found
* • fixed typo for "Select Active Query" key-binding ^Y not ^QBibiko2009-06-041-2/+2
|
* • fixed: suppress highlighting of the current query if something is selectedBibiko2009-06-041-2/+28
| | | | • added: "Select Active Query ^Y" context menu item to the Custom Query Editor
* • control editable status of CMTextView while changing the font size via ↵Bibiko2009-05-281-0/+6
| | | | ⌘+/- or finger gesture since CMTextVIew is also used for other views
* • added two finger zoom gesture for de/increasing the font size of the ↵Bibiko2009-05-251-0/+15
| | | | Custom Query Editor
* • improved narrow-down completionBibiko2009-05-251-15/+50
| | | | | - first trial to use images for suggestions (up to now supported: tables/views, funcs, procs, dbs, otherwise show a transparent dummy)
* • improved narrow-down completionBibiko2009-05-251-1/+1
| | | | | - if suggestion list contains a space add a space to the allowed textual input characters if not a space closes the pull-down list - some minor fine-tuning
* • improved narrow-down completionBibiko2009-05-241-13/+43
| | | | | - 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/+157
| | | | | | | | • 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.
* - Few Changes to Query Editor Preferenceavenjamin2009-05-221-13/+13
| | | | | - Cleaned up a few preference keys - Added Caret Color to Query Editor Prefs - disabled for now.
* • fixed several issues for completion Bibiko2009-05-201-14/+29
| | | | | | | - suppress auto-uppercasing of certain keyword combinations after insertion of a suggestion • syntax highlighting will only be invoked if the user really changed the text buffer • moved the deletion of all kQuote attributes to completionsForPartialWordRange:... method
* • made mySQLConnection reachable for CMTextViewBibiko2009-05-201-19/+67
| | | | | | | • for MySQL version > 4 added proc/func names to the completion suggestion list • changed the way of adding the table names to the completion suggestion list - now it uses [mySQLConnection listTables] instead of taking the names from the table view list due to the header items • added some pragma marks to CMTextView
* • added "Copy as RTF" to CustomQuery's context menu and bound it to CTRL+C ↵Bibiko2009-05-201-2/+16
| | | | (other format could also be added - waiting for user feedback)
* • removed unused variable 'keyCode'Bibiko2009-05-201-1/+0
|
* • added ⌘+ and ⌘- for increasing/decreasing the font size by 1 in the ↵Bibiko2009-05-201-0/+31
| | | | Custom Query Editor quickly
* • improved completion suggestion for variable name; added delimiter ↵Bibiko2009-05-201-1/+1
| | | | “@” for word detection
* • fixed some issues for drag&drop a file to the CustomQuery editorBibiko2009-05-191-1/+2
| | | | | - close sheet before inserting - ensure that a file with the extension "sql" will be inserted (UNIX "file" could detect a file as being a non plain text file)
* • improved "Update Help while typing"Bibiko2009-05-191-4/+9
| | | | - it recognizes any keyDown event including arrow keys
* More header updates for source files, including Subversion Id property.stuconnolly2009-05-191-1/+2
|
* • skip auto-pairing if the caret is adjoined to an alphanumeric character ↵Bibiko2009-05-191-2/+30
| | | | except if the inserted character will be a “(” and the caret is located at the end of a string then process the auto-pairing
* • added drag 'n' drop functionality to CMTextView to allow to drag a file ↵Bibiko2009-05-081-107/+292
| | | | | | | | | | path onto the Custom Query editor in order to insert the file content - ⌘ + drag inserts the file name - if file's content size > 1MB it asks for confirmation - it tries to auto-detect the file's encoding (stable for UTF8/16/32, Latin1, MacRoman) - it tries to insert only plain text files (by using of the UNIX 'file -I' command) - error messages etc. are written to the console.log + NSBeep
* • added "Query Editor" preference pane for setting colors, font, and modes ↵Bibiko2009-05-071-88/+205
| | | | | | | | | | | | | | | | | (from the CQ's action gear which are still customizable there) - in addition to the syntax colors it's now possible to change the fore/background color as well • added "Update Help while typing" feature in the Custom Query editor • first trial to improve syntax highlighting for large text in the Custom Query editor - if the text is larger than 10k the highlighting is performed only for the visible text area ±bias (3.5k) - if the user changes the visible area the highlighting follows time-delayed 500ms) to assure user interaction - a test with a 45MB SQL dump worked (of course a tick slowier) -- todo: improve prev/current query detection (mainly the SQLParser) - if the text size is > 6MB the completion list won't show words from the text due to parsing time - if the text size is > 6MB the line numbering will be disabled due to performance issue (improvements should follow) • some tiny clarification changes in the syntax highlighting code • some minor code cosmetics