Use of additional list of class names and it's property to highlight

Topics: Developer Forum, Project Management Forum
May 17, 2013 at 11:28 AM
Currently I am using this fantastic control. This control fulfills our maximum requirements. We are using this control to write a function in “cs” language. In this function we wish to highlight a specific and already existing object "machine" and its properties. I can provide a list of its properties (may be in xml file as keyword list) like following
  1. machine
  2. machine.RegistrationNo
  3. machine.MachineType.Code
  4. machine.MachineType.Weight
  5. ......
    ......
    I wonder if is it possible to highlight above list of properties in different color so when end user types it, color will be changed and if not changed then he will come to know that there is typo.
Developer
May 17, 2013 at 12:41 PM
Yes, this is possible by simply setting them as one of the keyword lists.
May 21, 2013 at 6:39 AM
Thanks for your quick response.
We tried this but failed. This could be reason that property names contain dot (‘.’) character.
That is why only ‘machine’ property is highlighted and other properties for example ‘machine.RegistrationNo’ were not highlighted.
Do you think this control have any other through which we can achieve this?
May 21, 2013 at 8:11 AM
The solution to your problem may be the same as the one in this discussion. This may or may not work (I'm not sure that that setting affects the lexer).
Developer
May 21, 2013 at 12:42 PM
Unfortunately, that setting doesn't effect the lexer.
May 21, 2013 at 8:18 PM
Ok, that makes sense, then. Am I correct in assuming, therefore, that you can't change what characters the lexer treats as part of a word? That is, without writing your own lexer.
Developer
May 22, 2013 at 1:34 PM
Yes, that is correct.