List of usage examples for com.intellij.openapi.actionSystem ActionPlaces J2EE_VIEW_POPUP
String J2EE_VIEW_POPUP
To view the source code for com.intellij.openapi.actionSystem ActionPlaces J2EE_VIEW_POPUP.
Click Source Link
From source file:com.intellij.ide.favoritesTreeView.actions.AddToFavoritesAction.java
License:Apache License
public static boolean canCreateNodes(AnActionEvent e) { DataContext dataContext = e.getDataContext(); if (e.getProject() == null) { return false; }/*w ww . j a va 2 s.com*/ if (e.getPlace().equals(ActionPlaces.FAVORITES_VIEW_POPUP) && FavoritesTreeViewPanel.FAVORITES_LIST_NAME_DATA_KEY.getData(dataContext) == null) { return false; } final boolean inProjectView = e.getPlace().equals(ActionPlaces.J2EE_VIEW_POPUP) || e.getPlace().equals(ActionPlaces.STRUCTURE_VIEW_POPUP) || e.getPlace().equals(ActionPlaces.PROJECT_VIEW_POPUP); //com.intellij.openapi.actionSystem.ActionPlaces.USAGE_VIEW_TOOLBAR return getNodesToAdd(dataContext, inProjectView) != null; }
From source file:com.intellij.tools.BaseExternalToolsGroup.java
License:Apache License
private boolean isToolVisible(T tool, String context) { if (!tool.isEnabled()) return false; if (ActionPlaces.EDITOR_POPUP.equals(context) || ActionPlaces.EDITOR_TAB_POPUP.equals(context)) { return tool.isShownInEditor(); } else if (ActionPlaces.PROJECT_VIEW_POPUP.equals(context) || ActionPlaces.COMMANDER_POPUP.equals(context) || ActionPlaces.J2EE_VIEW_POPUP.equals(context) || ActionPlaces.TYPE_HIERARCHY_VIEW_POPUP.equals(context) || ActionPlaces.CALL_HIERARCHY_VIEW_POPUP.equals(context) || ActionPlaces.METHOD_HIERARCHY_VIEW_POPUP.equals(context) || ActionPlaces.FAVORITES_VIEW_POPUP.equals(context) || ActionPlaces.SCOPE_VIEW_POPUP.equals(context) || ActionPlaces.NAVIGATION_BAR.equals(context)) { return tool.isShownInProjectViews(); } else if (ActionPlaces.MAIN_MENU.equals(context)) { return tool.isShownInMainMenu(); } else if (ActionPlaces.USAGE_VIEW_POPUP.equals(context)) { return tool.isShownInSearchResultsPopup(); }//from w ww .j a va 2 s . c om return false; }