Changing file appearance

I was curious if there was a way to customize how different types of files are listed in the project panel. For example, can I make all interface files show up in a different color than regular class files?

You can but you’d have to write a plugin for that. Some things are already color-coded like svn status etc… However one file can contain an interface and a class so I don’t think this separation makes much sense. Why not just keep the interfaces in a separate package or have some prefix?

That’s a good point. Currently I use a suffix ‘Interface’ but it can be annoying at times when writing classes that accept instances of these interfaces as parameters since their names are lengthened by the suffix. I like how the collections framework has natural sounding interfaces, like List and Set. I was just hoping to get the best of both, short natural sounding names and easily separate out the interfaces from other classes. Just nit-picking. And yes, I could also move them into separate packages. Hadn’t considered that for some reason.

I’ve never seen the advantage in naming conventions like that tbh. Does it really matter whether it’s an interface or a class from the context of your code? It also makes refactoring more awkward if you want to change a class into an interface as you need to rename everything else.

Having said that the naming convention I have seen used is to put I at the start of the class name for Interface and Impl at the end of the class name for the implementation of an interface…


public class StuffImpl implements IStuff