Open file action customization
Answered
Is there a way to customize some file icons in the FileChooser.chooseFiles dialog called by OpenFileAction?
Please sign in to leave a comment.
Override com.intellij.openapi.fileChooser.FileChooserDescriptor#getIcon
Is it possible to customize icon without implementing my own OpenFileAction?
Not possible AFAIK. What kind of files do you want to modify and why? If this is about recognizing "project files" com.intellij.projectImport.ProjectOpenProcessor#getIcon() would work.
This is almost what I'm looking for. But this way I can only change file icons.
Is there a way to change the icon of a directory containing specific project files?
For example: change the "test_project" directory icon because it contains a specific gradle file
Do you return true when directory containing required file is passed into com.intellij.projectImport.ProjectOpenProcessor#canOpenProject?
Yes, I do. But this method is called only for files not for directories
Could you share your plugin sources and IDE version.
I created a demo project: https://github.com/EmYar/plugin_test.git
IDE build: 183.5429.30