use of org.intellij.images.thumbnail.ThumbnailManager in project intellij-community by JetBrains.
the class ShowThumbnailsAction method actionPerformed.
public void actionPerformed(AnActionEvent e) {
Project project = e.getData(CommonDataKeys.PROJECT);
VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE);
if (project != null && file != null && file.isDirectory()) {
ThumbnailManager thumbnailManager = ThumbnailManager.getManager(project);
ThumbnailView thumbnailView = thumbnailManager.getThumbnailView();
thumbnailView.setRoot(file);
thumbnailView.setVisible(true);
thumbnailView.activate();
}
}
Aggregations