Dynamically changing file icon in project view
Hi I am a beginner to plugin development. Can someone please explain me in simple steps how to dynamically change an icon of a file in project view.
As an example I want to change the icon of the file I am currenlty working on. When I move to another file ,new file's icon should be changed and the previous file's icon should be set to default.
请先登录再写评论。
You can implement the IconProvider interface and register your implementation as the <iconProvider> extension point. For Java files in the project view, your provider will receive an instance of PsiClass representing the top-level class contained in each file.