diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-03-09 15:00:52 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-03-09 15:00:52 +0000 |
commit | 6560b2e188308d41d16c1e5d8c5b3bc05dbae8fe (patch) | |
tree | f119d516608ff96e9abf00beff15ab83930a65ed /Source/CustomQuery.m | |
parent | 2006cf37271812027cdf5659308eec6ff095ed09 (diff) | |
download | sequelpro-6560b2e188308d41d16c1e5d8c5b3bc05dbae8fe.tar.gz sequelpro-6560b2e188308d41d16c1e5d8c5b3bc05dbae8fe.tar.bz2 sequelpro-6560b2e188308d41d16c1e5d8c5b3bc05dbae8fe.zip |
• added $SP_ASLIST_ALL_FIELDS_FROM_SELECTED_TABLE as pre-defined snippet list
• added Show Completion List submenu to the Custom Query Editor gear menu with the items all dbs ^1, all tables ^2, all fields ^3
• if dbStructure is available show these pre-defined completion lists with all info like the completion it does, otherwise fall back to plain style
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r-- | Source/CustomQuery.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index 2e26f08e..0d4207a0 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -2454,6 +2454,21 @@ [self helpTargetValidation]; } +- (IBAction)showCompletionList:(id)sender +{ + NSRange insertRange = NSMakeRange([textView selectedRange].location, 0); + switch([sender tag]) { + case 8000: + [textView showCompletionListFor:@"$SP_ASLIST_ALL_DATABASES" atRange:insertRange fuzzySearch:NO]; + break; + case 8001: + [textView showCompletionListFor:@"$SP_ASLIST_ALL_TABLES" atRange:insertRange fuzzySearch:NO]; + break; + case 8002: + [textView showCompletionListFor:@"$SP_ASLIST_ALL_FIELDS_FROM_SELECTED_TABLE" atRange:insertRange fuzzySearch:NO]; + break; + } +} /* * Show the data for "HELP 'currentWord' invoked by autohelp" */ |