44 Public slot to initialize the properties. |
46 Public slot to initialize the properties. |
45 """ |
47 """ |
46 self.setFoldComments(Preferences.getEditor("SqlFoldComment")) |
48 self.setFoldComments(Preferences.getEditor("SqlFoldComment")) |
47 self.setBackslashEscapes(Preferences.getEditor("SqlBackslashEscapes")) |
49 self.setBackslashEscapes(Preferences.getEditor("SqlBackslashEscapes")) |
48 self.setFoldCompact(Preferences.getEditor("AllFoldCompact")) |
50 self.setFoldCompact(Preferences.getEditor("AllFoldCompact")) |
49 try: |
51 with contextlib.suppress(AttributeError): |
50 self.setDottedWords(Preferences.getEditor("SqlDottedWords")) |
52 self.setDottedWords(Preferences.getEditor("SqlDottedWords")) |
51 self.setFoldAtElse(Preferences.getEditor("SqlFoldAtElse")) |
53 self.setFoldAtElse(Preferences.getEditor("SqlFoldAtElse")) |
52 self.setFoldOnlyBegin(Preferences.getEditor("SqlFoldOnlyBegin")) |
54 self.setFoldOnlyBegin(Preferences.getEditor("SqlFoldOnlyBegin")) |
53 self.setHashComments(Preferences.getEditor("SqlHashComments")) |
55 self.setHashComments(Preferences.getEditor("SqlHashComments")) |
54 self.setQuotedIdentifiers( |
56 self.setQuotedIdentifiers( |
55 Preferences.getEditor("SqlQuotedIdentifiers")) |
57 Preferences.getEditor("SqlQuotedIdentifiers")) |
56 except AttributeError: |
|
57 pass |
|
58 |
58 |
59 def isCommentStyle(self, style): |
59 def isCommentStyle(self, style): |
60 """ |
60 """ |
61 Public method to check, if a style is a comment style. |
61 Public method to check, if a style is a comment style. |
62 |
62 |