Search in sources :

Example 1 with ShowUsagesAction

use of com.intellij.find.actions.ShowUsagesAction in project intellij-community by JetBrains.

the class GotoDeclarationAction method startFindUsages.

private static boolean startFindUsages(@NotNull Editor editor, PsiElement element) {
    if (element != null) {
        ShowUsagesAction showUsages = (ShowUsagesAction) ActionManager.getInstance().getAction(ShowUsagesAction.ID);
        RelativePoint popupPosition = JBPopupFactory.getInstance().guessBestPopupLocation(editor);
        showUsages.startFindUsages(element, popupPosition, editor, ShowUsagesAction.USAGES_PAGE_SIZE);
        return true;
    }
    return false;
}
Also used : ShowUsagesAction(com.intellij.find.actions.ShowUsagesAction) RelativePoint(com.intellij.ui.awt.RelativePoint)

Aggregations

ShowUsagesAction (com.intellij.find.actions.ShowUsagesAction)1 RelativePoint (com.intellij.ui.awt.RelativePoint)1