use of com.intellij.ide.impl.ProjectPaneSelectInTarget in project intellij-community by JetBrains.
the class SelectInProjectViewAction method actionPerformed.
@Override
public void actionPerformed(AnActionEvent e) {
final ProjectPaneSelectInTarget target = new ProjectPaneSelectInTarget(e.getProject());
final SelectInContext context = SelectInContextImpl.createContext(e);
if (context != null) {
target.selectIn(context, true);
}
}
use of com.intellij.ide.impl.ProjectPaneSelectInTarget in project intellij-community by JetBrains.
the class SelectInProjectViewAction method update.
@Override
public void update(AnActionEvent e) {
final Project project = e.getProject();
if (project != null) {
final ProjectPaneSelectInTarget target = new ProjectPaneSelectInTarget(project);
final SelectInContext context = SelectInContextImpl.createContext(e);
if (context != null && target.canSelect(context)) {
e.getPresentation().setEnabled(true);
return;
}
}
e.getPresentation().setEnabled(false);
}
use of com.intellij.ide.impl.ProjectPaneSelectInTarget in project android by JetBrains.
the class TemplateUtils method selectEditor.
/**
* Selects the specified file in the project view.
* <b>Note:</b> Must be called with read access.
*
* @param project the project
* @param file the file to select
*/
public static void selectEditor(Project project, VirtualFile file) {
ApplicationManager.getApplication().assertReadAccessAllowed();
PsiFile psiFile = PsiManager.getInstance(project).findFile(file);
if (psiFile != null) {
ProjectPaneSelectInTarget selectAction = new ProjectPaneSelectInTarget(project);
selectAction.select(psiFile, false);
}
}
Aggregations