aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.h
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-01-24 21:39:43 +0000
committerBibiko <bibiko@eva.mpg.de>2010-01-24 21:39:43 +0000
commitcca4f8dc17e904c516dc7e3ba8193aff5b8f9e70 (patch)
tree8d837c62de411b7e939ca06a4181cefcae688eb0 /Source/CMTextView.h
parent9997d982ca4fcbacb04b41c7f7e2aa7dd44db312 (diff)
downloadsequelpro-cca4f8dc17e904c516dc7e3ba8193aff5b8f9e70.tar.gz
sequelpro-cca4f8dc17e904c516dc7e3ba8193aff5b8f9e70.tar.bz2
sequelpro-cca4f8dc17e904c516dc7e3ba8193aff5b8f9e70.zip
• added possibility to add a query favorite by user-definable alphanumeric tab trigger; eg if tab trigger is set to "sel" sel⇥ will insert the first query which has the defined the tab trigger
• preparations to insert programmable query favorites - eg "SELECT ${*} FROM ${Table}" -- after insertion "SELECT * FROM Table" the '*' is highlighted to change, press ⇥ to select the next snippet 'Table'; ⇧⇥ selects the previous snippet; the snippet selection follows the user input - Note: not yet active
Diffstat (limited to 'Source/CMTextView.h')
-rw-r--r--Source/CMTextView.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/CMTextView.h b/Source/CMTextView.h
index 868e7093..137c5348 100644
--- a/Source/CMTextView.h
+++ b/Source/CMTextView.h
@@ -59,6 +59,11 @@ static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAtt
MCPConnection *mySQLConnection;
NSInteger mySQLmajorVersion;
+ NSInteger snippetControlArray[20][2];
+ NSInteger snippetControlCounter;
+ NSInteger currentSnippetIndex;
+ BOOL snippetWasJustInserted;
+
}
- (IBAction)showMySQLHelpForCurrentWord:(id)sender;
@@ -91,6 +96,9 @@ static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAtt
- (NSArray *)suggestionsForSQLCompletionWith:(NSString *)currentWord dictMode:(BOOL)isDictMode browseMode:(BOOL)dbBrowseMode withTableName:(NSString*)aTableName withDbName:(NSString*)aDbName;
- (void) selectCurrentQuery;
+- (BOOL)checkForCaretInsideSnippet;
+- (void)insertFavoriteAsSnippet:(NSString*)theSnippet atRange:(NSRange)targetRange;
+
- (NSUInteger)characterIndexOfPoint:(NSPoint)aPoint;
- (void)insertFileContentOfFile:(NSString *)aPath;