aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.h
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-05-07 08:29:42 +0000
committerBibiko <bibiko@eva.mpg.de>2009-05-07 08:29:42 +0000
commit166b844e7a4e84b79d2cfad5cac1d5d8333988f5 (patch)
tree21b9eb5bd92f22e4114688c0aaaf11d231a1efb4 /Source/CMTextView.h
parent2a4bbd2e425fbbf0ffd20a9c36921778b92963ae (diff)
downloadsequelpro-166b844e7a4e84b79d2cfad5cac1d5d8333988f5.tar.gz
sequelpro-166b844e7a4e84b79d2cfad5cac1d5d8333988f5.tar.bz2
sequelpro-166b844e7a4e84b79d2cfad5cac1d5d8333988f5.zip
• added "Query Editor" preference pane for setting colors, font, and modes (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
Diffstat (limited to 'Source/CMTextView.h')
-rw-r--r--Source/CMTextView.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/CMTextView.h b/Source/CMTextView.h
index 964598cd..a133d825 100644
--- a/Source/CMTextView.h
+++ b/Source/CMTextView.h
@@ -29,6 +29,7 @@
#import "CMMCPConnection.h"
#import "CMMCPResult.h"
+#define SP_TEXT_SIZE_TRIGGER_FOR_PARTLY_PARSING 10000
@interface CMTextView : NSTextView {
BOOL autoindentEnabled;
@@ -41,15 +42,15 @@
NSString *showMySQLHelpFor;
- BOOL sqlStringIsTooLarge;
-
IBOutlet NSScrollView *scrollView;
+
+ NSUserDefaults *prefs;
}
- (IBAction)showMySQLHelpForCurrentWord:(id)sender;
-- (BOOL) isNextCharMarkedBy:(id)attribute;
+- (BOOL) isNextCharMarkedBy:(id)attribute withValue:(id)aValue;
- (BOOL) areAdjacentCharsLinked;
- (BOOL) wrapSelectionWithPrefix:(NSString *)prefix suffix:(NSString *)suffix;
- (BOOL) shiftSelectionRight;
@@ -69,6 +70,6 @@
- (void) selectLineNumber:(unsigned int)lineNumber ignoreLeadingNewLines:(BOOL)ignLeadingNewLines;
- (unsigned int) getLineNumberForCharacterIndex:(unsigned int)anIndex;
- (void) autoHelp;
-- (void) doSyntaxHighlighting:(NSTextStorage*)textStore;
+- (void) doSyntaxHighlighting;
@end