I have array of word build dynamic on event cursoractivity ,
what I do is : I build my own language from metadata store in xml file so when I type on codemirror :
car.whell.circle.number employee.getname()
I store all the words in array like this :
so I store every word with it's type ,
Note : if I have tow class :
The name of first class is Data and it's fields are:
fname, lname, age
The name of second class is info and its fields are:
mother, father
To color the fields in specific color only if it comes after the name of own class (i.e when I type on codemirror Data.fname I want to color the word fname in green color But when I type on codemirror info.fname I did not want to color the word fname in green color because (fname not contain in the class "info")) so I build dynamic array store the words after i check if I can color it ,so every word in dynamic array I can color it, the useful of my dynamic array to knew if I can color the word or I can not .
what I want to do :
I want to color every word it's type : class by red color, and the the word it's type classsomthing by blue color, and the word it's type (primitive like int,string) by green color , so any body can help me How I can color the words in my dynamic array only if it come in the specific order in my dynamic array and with color define by type stored in my dynamic array?? Thanks in advance