Open file action customization

Answered

Is there a way to customize some file icons in the FileChooser.chooseFiles dialog called by OpenFileAction?

0
8 comments
Official comment

Override com.intellij.openapi.fileChooser.FileChooserDescriptor#getIcon

Is it possible to customize icon without implementing my own OpenFileAction?

0

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.

0

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

0

Do you return true when directory containing required file is passed into com.intellij.projectImport.ProjectOpenProcessor#canOpenProject?

0

Yes, I do. But this method is called only for files not for directories

0

Could you share your plugin sources and IDE version.

0

Please sign in to leave a comment.