Generic highlighter: Code folding support.

This commit is contained in:
Leandro Melo
2010-06-18 16:30:56 +02:00
parent 81955e045e
commit 20eeca15ce
11 changed files with 235 additions and 79 deletions

View File

@@ -162,7 +162,10 @@ void PlainTextEditor::configure(const Core::MimeType &mimeType)
{
Highlighter *highlighter = new Highlighter();
baseTextDocument()->setSyntaxHighlighter(highlighter);
m_isMissingSyntaxDefinition = true;
setCodeFoldingSupported(false);
setCodeFoldingVisible(false);
QString definitionId;
if (!mimeType.isNull()) {
@@ -185,6 +188,9 @@ void PlainTextEditor::configure(const Core::MimeType &mimeType)
m_commentDefinition.setMultiLineStart(definition->multiLineCommentStart());
m_commentDefinition.setMultiLineEnd(definition->multiLineCommentEnd());
setCodeFoldingSupported(true);
setCodeFoldingVisible(true);
m_isMissingSyntaxDefinition = false;
}
} else if (file()) {