aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
Commit message (Collapse)AuthorAgeFilesLines
* • 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
|
* • removed debug infoBibiko2009-04-091-1/+0
|
* • syntax highlighting synchronized according to the completion listBibiko2009-04-091-14/+10
| | | | • some minor code cosmetics
* • keyword update for syntax highlightingBibiko2009-04-081-2/+323
| | | | • keyword update for completion
* • FIXED: unique completion listBibiko2009-04-081-13/+34
| | | | • ADDED: if caret is inside quotes "" or '' show Apple's default completion list due to the spell checker settings
* • simplified paste: (esp. for undo)Bibiko2009-04-081-3/+1
| | | | • syntax highlighting updated
* • FIXED if deleteBackward: avoid auto-uppercasing if resulting word would ↵Bibiko2009-04-081-3/+9
| | | | | | be a SQL keyword - e.g. type inta and then press deleteBackward:
* • FIXED auto-uppercasing bug if SQL keyword is found at the absolute end ↵Bibiko2009-04-081-5/+10
| | | | | | of the textStorage - this fixes also auto-uppercasing for runAll/Current/SelectionQueries
* • syntax highlighting updatedBibiko2009-04-081-0/+4
| | | | - added highlighting for @vars
* • optimized syntax highlighting a bitBibiko2009-04-071-0/+4
| | | | | | • added syntax highlighting for numeric values • changed syntax highlighting for 'order' and 'group' to 'order by' resp. 'group by' (useful also for visual syntax checking while typing) • fixed the issue to highlight a keyword if that keyword is the name a variable (e.g. @set := 1)
* • improved auto-uppercasing for: pasting queries from favourites & history ↵Bibiko2009-04-071-7/+11
| | | | | | | and before performQueries • improved undo behaviour of auto-uppercasing • added undo behaviour for pasting queries from favourites & history
* • ADDED to SPTextViewAdditions:Bibiko2009-04-051-147/+0
| | | | | | | | | | | | | | - (NSRange)getRangeForCurrentWord - (IBAction)selectCurrentWord:(id)sender; - (IBAction)selectCurrentLine:(id)sender; - (IBAction)doSelectionUpperCase:(id)sender; - (IBAction)doSelectionLowerCase:(id)sender; - (IBAction)doSelectionTitleCase:(id)sender; - (IBAction)doDecomposedStringWithCanonicalMapping:(id)sender; - (IBAction)doDecomposedStringWithCompatibilityMapping:(id)sender; - (IBAction)doPrecomposedStringWithCanonicalMapping:(id)sender; - (IBAction)doPrecomposedStringWithCompatibilityMapping:(id)sender; • BOUNDED these IBAction to mainmenu.xib
* • FIXED: allow to enter dead keys esp. for non-US keyboardsBibiko2009-04-041-1/+3
| | | | | - e.g. for a German one ` is a dead key (press space to enter `) -- further checks needed for other non-US keyboards