Package com.johnlindquist.flexunit

Source Code of com.johnlindquist.flexunit.BindCtrlShiftTtoFlexUnit

package com.johnlindquist.flexunit;

import com.intellij.openapi.actionSystem.KeyboardShortcut;
import com.intellij.openapi.components.ApplicationComponent;
import com.intellij.openapi.keymap.Keymap;
import com.intellij.openapi.keymap.impl.KeymapManagerImpl;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;
import java.awt.event.InputEvent;

/**
* User: John Lindquist
* Date: 9/12/11
* Time: 11:11 PM
*/
public class BindCtrlShiftTtoFlexUnit implements ApplicationComponent{
    public BindCtrlShiftTtoFlexUnit(){
    }

    public void initComponent(){
        //hack: hooking into ctrl+shift+T ;)
        final Keymap keymap = KeymapManagerImpl.getInstance().getActiveKeymap();
        keymap.addShortcut("GoToFlexUnitTestOrCode", new KeyboardShortcut(KeyStroke.getKeyStroke('T', InputEvent.CTRL_MASK + InputEvent.SHIFT_MASK), null));
    }

    public void disposeComponent(){
        // TODO: insert component disposal logic here
    }

    @NotNull
    public String getComponentName(){
        return "BindCtrlShiftTtoFlexUnit";
    }
}
TOP

Related Classes of com.johnlindquist.flexunit.BindCtrlShiftTtoFlexUnit

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.