| 3220 | } |
| 3221 | |
| 3222 | void UICodeEditor::resetSyntaxDefinition() { |
| 3223 | std::string oldLang( mDoc->getSyntaxDefinition().getLanguageName() ); |
| 3224 | mDoc->resetSyntax(); |
| 3225 | if ( oldLang != mDoc->getSyntaxDefinition().getLanguageName() ) { |
| 3226 | mDoc->getHighlighter()->reset(); |
| 3227 | invalidateDraw(); |
| 3228 | DocSyntaxDefEvent event( this, mDoc.get(), Event::OnDocumentSyntaxDefinitionChange, oldLang, |
| 3229 | mDoc->getSyntaxDefinition().getLanguageName() ); |
| 3230 | sendEvent( &event ); |
| 3231 | } |
| 3232 | } |
| 3233 | |
| 3234 | const SyntaxDefinition& UICodeEditor::getSyntaxDefinition() const { |
| 3235 | return mDoc->getSyntaxDefinition(); |
no test coverage detected