Package osmedile.intellij.stringmanip

Source Code of osmedile.intellij.stringmanip.PopupChoiceAction

package osmedile.intellij.stringmanip;

import com.intellij.openapi.actionSystem.ActionGroup;
import com.intellij.openapi.actionSystem.ActionManager;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.ui.popup.JBPopupFactory;
import com.intellij.openapi.ui.popup.ListPopup;

/**
* @author Olivier Smedile
* @version $Id: File Header.java 3 2008-03-11 08:52:55Z osmedile $
*/
public class PopupChoiceAction extends DumbAwareAction {
    private ActionGroup actionGroup;


    public PopupChoiceAction() {
        actionGroup = (ActionGroup) ActionManager.getInstance().getAction("osmedile.ManipulateStringGroup");
    }

    public void actionPerformed(AnActionEvent e) {
        ListPopup popup = JBPopupFactory.getInstance().createActionGroupPopup(null, actionGroup,
                e.getDataContext(), JBPopupFactory.ActionSelectionAid.ALPHA_NUMBERING, false);

        popup.showInBestPositionFor(e.getDataContext());

    }
}
TOP

Related Classes of osmedile.intellij.stringmanip.PopupChoiceAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.