Open file action customization

Answered

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

8 comments
Comment actions Permalink
Official comment

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

Comment actions Permalink

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

0
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

Could you share your plugin sources and IDE version.

0
Comment actions Permalink

I created a demo project: https://github.com/EmYar/plugin_test.git
IDE build: 183.5429.30

0

Please sign in to leave a comment.