I am developing an eclipse plugin. And I want to change text foreground color for specific words and pass the compiler rules in eclipse java editor environment. The specific words is like //Mytag or like #Mytag. I don't want to make a own editor. I want add this new syntax coloring to original java editor.

I ever try use a customized SourceViewerConfiguration to add new syntax coloring to original java editor. But it is not work.

Who knows whether I can use SourceViewerConfiguration to add new syntax coloring to original java editor. If not, which kinds of method I can meet my needs.