终于让Source Insight也能识别Symbian的_LIT宏了

  不得不承认,Source Insight 确实很强大,以至于太多的高级功能都未能在帮助文档中一一详述,只能依靠我们自己来发掘了……

  今天,碰巧发现了”Language – Custom Tag Type”这个功能,一举解决了困扰我已久的 Symbian “_LIT”宏解析问题。(也不知道是否因为我的 Conditions 定义的不足导致的……)

  长话短说,”Options – Document Options”,新建一个”Document Type”,如”Symbian C++ Source Files”,继承原有”C++ Source Files”的属性。然后在左下角”Parsing”设置组中的”Custom Tag Type”下选择”Constant”,并将下面的正则表达式填入”Custom pattern”:

  ^w*_LIT(w*([A-Za-z0-9]+)w*,.*

  OK, resynchronize your project, you’ll see it!

  注:记得将 Document Type 中原 c 和 cpp 的 File Filter 项里面的扩展名 .cpp 和 .h 屏蔽掉,否则 SI 不会调用我们新建的 Document Type 来解析的。

Written on May 27, 2006