Links
EControl Syntax Editor SDK
TSyntaxManager.AnalyzerForFile Method

Returns Lexer for the FileName.

function AnalyzerForFile(const FileName: string; FilterIdx: integer = 0): TSyntAnalyzer;

Extracts extension from the FileName, looks for first lexer that contains this extension in TSyntAnalyzer.Extentions property. 

If there is no lexer that uses this extension function returns nil. You may specify open dialog filter index. This allows to select appropriate lexer when filter of open file dialog was initialized using TSyntaxManager.GetFilesFilter Method.

Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!