diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-01-19 21:33:40 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-01-19 21:33:40 +0000 |
commit | 4be3b84999e8ea31d47f3ec6b6926d1f13ec2ccf (patch) | |
tree | 15f6bf1c855761c5cbf4b3c5c8454e30838553ef /Source/CMTextView.h | |
parent | 9e3181e71ebcb13c87843ed90f1df6798a562b94 (diff) | |
download | sequelpro-4be3b84999e8ea31d47f3ec6b6926d1f13ec2ccf.tar.gz sequelpro-4be3b84999e8ea31d47f3ec6b6926d1f13ec2ccf.tar.bz2 sequelpro-4be3b84999e8ea31d47f3ec6b6926d1f13ec2ccf.zip |
• improved completion for Query Editor bound to ESC
- 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
Diffstat (limited to 'Source/CMTextView.h')
-rw-r--r-- | Source/CMTextView.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/CMTextView.h b/Source/CMTextView.h index cfabd3ef..80515928 100644 --- a/Source/CMTextView.h +++ b/Source/CMTextView.h @@ -69,7 +69,7 @@ static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAtt - (BOOL) wrapSelectionWithPrefix:(NSString *)prefix suffix:(NSString *)suffix; - (BOOL) shiftSelectionRight; - (BOOL) shiftSelectionLeft; -- (NSArray *) completionsForPartialWordRange:(NSRange)charRange indexOfSelectedItem:(NSInteger *)index; +// - (NSArray *) completionsForPartialWordRange:(NSRange)charRange indexOfSelectedItem:(NSInteger *)index; - (NSArray *) keywords; - (NSArray *) functions; - (void) setAutoindent:(BOOL)enableAutoindent; @@ -87,7 +87,7 @@ static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAtt - (void) autoHelp; - (void) doSyntaxHighlighting; - (void) setConnection:(MCPConnection *)theConnection withVersion:(NSInteger)majorVersion; -- (void) doCompletion; +- (void) doCompletionByUsingSpellChecker:(BOOL)isDictMode; - (NSArray *)suggestionsForSQLCompletionWith:(NSString *)currentWord dictMode:(BOOL)isDictMode browseMode:(BOOL)dbBrowseMode withTableName:(NSString*)aTableName withDbName:(NSString*)aDbName; - (void) selectCurrentQuery; |