How to set highlight color in plugin DevKit
已回答
In plugin dev kit
I have found out how to get color of selected file:
final Project currentProject = DataKeys.PROJECT.getData(anActionEvent.getDataContext());
VirtualFile[] currentFiles = DataKeys.VIRTUAL_FILE_ARRAY.getData(anActionEvent.getDataContext());
if(currentFiles != null) {
Arrays.asList(currentFiles).forEach(virtualFile -> {
FileColorManager colorManager = FileColorManager.getInstance(currentProject);
Color color = colorManager.getFileColor(virtualFile);
}
}
But how to SET color of selected file?
请先登录再写评论。
Please see answer https://stackoverflow.com/questions/55182389/how-to-set-file-highlight-color-in-project-tree-with-plugin-devkit