aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
Commit message (Collapse)AuthorAgeFilesLines
* • 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
* • improved completion in CQ's text viewBibiko2009-05-021-38/+81
| | | | | | | - added database names - fixed logic for detecting if caret is inside quotes - if caret inside backticks show only db, table, column names • outsourced syntax highlighting into a method for further improvements
* - Fix indentation behaviour when there are spaces after as well as before ↵rowanbeentje2009-04-301-1/+9
| | | | the cursor on the current line; now indents to the correct level, instead of increasing indentation incorrectly
* • changed context menu item in CQ's textview to support "MySQL Help"Bibiko2009-04-301-34/+27
| | | | | • prepared code to work with autoHelp • improved getRangeForCurrentWord (fix for " |a")
* • MySQL HelpBibiko2009-04-301-11/+27
| | | | | | - updated autoHelp, now it recognizes cursor movement via mouse • if the chunk in CQ's textview is too large remove all attributes • some minor code cosmetics
* • MySQL HelpBibiko2009-04-291-11/+57
| | | | | - first trial to implement an "autoHelp" function This function calls showHelpForCurrentWord (or selection) 1 sec after stopping typing and shows the Help in the Help window if the caret is not inside of quotes. To invoke it set autohelpEnabled=YES in CMTextView.m's awakeFromNib method.
* • MySQL Help refactoringBibiko2009-04-291-1/+1
|
* • added a prototype to support an Help view for the current word in the ↵Bibiko2009-04-241-0/+9
| | | | | | Custom Query text view - work in progress!
* • updated completion list and added core functionsBibiko2009-04-231-5/+317
| | | | | • improved separator list for word list completion coming from the text view • minor update for syntax highlighting
* • FIXED added a ; to the separator list for gathering all words used in ↵Bibiko2009-04-221-1/+1
| | | | the text view for completion to avoid suggesting foo and foo;
* • added - (unsigned int) getLineNumberForCharacterIndex:(unsigned int)anIndex;Bibiko2009-04-211-0/+8
|
* • added selectLineNumber:x to CMTextView to be able to select the line xBibiko2009-04-201-0/+32
| | | | | | | | | • added error highlighting of the first mentioned error - if a "near message" error is provided select that message otherwise select the entire error line and scrolls to it - if no "at line x" and no "near message" is given do nothing - if a selection was given and the user pressed "runAll" destroy the selection before error checking; if no error was found reconstruct that selection (to be able to distinguish between "runSelection" and "runAll" plus selection) * changed slightly the trigger for syntax highlighting/auto-uppercasing for better scrollToRange behaviour
* - Build upon documentation lookup by looking up exact manual pages that ↵stuconnolly2009-04-191-7/+19
| | | | | | | correspond to the current MySQL server version as well as allowing the lookup to be performed without actually having the keyword highlighted. Thanks to Hans-Jörg for suggesting these. - Credit Alex King for providing the original documentation lookup code.
* Add a slightly modified patch to lookup up the selected text in the custom ↵stuconnolly2009-04-191-6/+49
| | | | query editor in the MySQL online documentation. Code contributed via issue #236.
* - Implement line numbering for CMTextView:rowanbeentje2009-04-161-0/+6
| | | | | | - Add an implementation of NoodleLineNumberView, by Paul Kim. Slightly tweaked to remove markers. - Add to CMTextView (to enable it for other CMTextView uses, hook up the scrollView outlet to the containing scroll view)
* • syntax highlighting and completion list updatedBibiko2009-04-141-0/+1
|
* • syntax highlighting and completion list updatedBibiko2009-04-141-47/+88
|