select specific folder when click performed...

已回答

I want to create a plugin that select a specific folder from the opened project when I click a button with the given URI, how to perform that action ? thanks

 

0


VirtualFile targetFile = [... your directory]

final ToolWindow toolWindow = ToolWindowManager.getInstance(myProject).getToolWindow(ToolWindowId.PROJECT_VIEW);

toolWindow.activate(() -> {
final ProjectView projectView = ProjectView.getInstance(myProject);

projectView.changeView(ProjectViewPane.ID); // if "Project" pane is required
projectView.select(null, targetFile, true);
});
1
Avatar
Permanently deleted user

thank you :D 

 

0

请先登录再写评论。