How to change style and color of static imported properties?

I am looking to find a way to change the color of a property that I am using in ClassA while this property is statically imported from ClassB. This will help me understand the code better when there are static imports involved. If you know how to do it, please share it.


Comment actions Permalink

A staticly imported class member is "classified" as a "constant" in the colors and styles system. So are 'static final' fields. You can change the color & style of the constants (File > Settings > IDE Settings > Editor > Color & Fonts > Java >  Constant). But it will change the color for all constants, including the logger and DEFAULT_FOO variables declared as follows:

private static final Logger logger = LoggerFactory.getLogger(Example.class);
public static final String DEFAULT_FOO = "abc";

To the best of my knowledge, there is not a way to change the color of only staticly  imported class members. I think that would be a great feature though. I did a search in YouTrack to see if such a feature request existed, and did not find one. So I created one: Please vote for it.

Comment actions Permalink

Thank you, voted for it.


Please sign in to leave a comment.