Ignoring phrases with underscore ( _ )

Hi,
I have LanguageTool embedded in my Java application. I need to ignore many phrases with underscores, they look like this: XXXX_YYYY. I successfully added many new ignored words by using SpellingCheckRule.addIgnoreTokens() method but adding ‘XXXX_YYYY’ does not work at all. I also tried to create UserConfig(Arrays.asList(“XXXX_YYYY”) and pass it to JLanguageTool class by its constructor but it didn’t work out as well.
I tried adding ‘XXXX_YYYY’ to ignore.txt file and then run languagetool-commandilne.jar and surprisingly, the phrase was ignored. Because of that I think it is matter of some configuration that I am not aware of.

Could you help me?