Search in sources :

Example 1 with PackagingElementType

use of com.intellij.packaging.elements.PackagingElementType in project intellij-community by JetBrains.

the class ShowAddPackagingElementPopupAction method actionPerformed.

@Override
public void actionPerformed(AnActionEvent e) {
    final DefaultActionGroup group = new DefaultActionGroup();
    for (PackagingElementType type : PackagingElementFactory.getInstance().getAllElementTypes()) {
        group.add(new AddNewPackagingElementAction((PackagingElementType<?>) type, myArtifactEditor));
    }
    final DataContext dataContext = e.getDataContext();
    final ListPopup popup = JBPopupFactory.getInstance().createActionGroupPopup("Add", group, dataContext, JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, false);
    popup.showInBestPositionFor(dataContext);
}
Also used : DataContext(com.intellij.openapi.actionSystem.DataContext) ListPopup(com.intellij.openapi.ui.popup.ListPopup) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) PackagingElementType(com.intellij.packaging.elements.PackagingElementType)

Aggregations

DataContext (com.intellij.openapi.actionSystem.DataContext)1 DefaultActionGroup (com.intellij.openapi.actionSystem.DefaultActionGroup)1 ListPopup (com.intellij.openapi.ui.popup.ListPopup)1 PackagingElementType (com.intellij.packaging.elements.PackagingElementType)1