package tide.editor;
import javax.swing.KeyStroke;
import java.awt.event.KeyEvent;
/** Some shared accelerators. To keep an overview.
*/
public final class Accelerators
{
private Accelerators()
{
}
// global
final public static KeyStroke compileWholeProject = KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0, false);
//final public static KeyStroke compileWholeProject2 = KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0, false);
final public static KeyStroke compileChangedFiles = KeyStroke.getKeyStroke(KeyEvent.VK_F9, KeyEvent.SHIFT_MASK, false);
final public static KeyStroke runProject = KeyStroke.getKeyStroke(KeyEvent.VK_F10, 0, false);
final public static KeyStroke runSelected = KeyStroke.getKeyStroke(KeyEvent.VK_F10, KeyEvent.SHIFT_MASK, false);
final public static KeyStroke saveChangedFiles = KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK);
final public static KeyStroke searchRunnables = KeyStroke.getKeyStroke(KeyEvent.VK_R, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK); //TODO
final public static KeyStroke moveTabLeft = KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.ALT_MASK|KeyEvent.SHIFT_MASK, false);
final public static KeyStroke moveTabRight = KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, KeyEvent.ALT_MASK|KeyEvent.SHIFT_MASK, false);
final public static KeyStroke moveTabPos1 = KeyStroke.getKeyStroke(KeyEvent.VK_1, KeyEvent.ALT_MASK|KeyEvent.SHIFT_MASK, false);
final public static KeyStroke selectPreviousTab = KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.ALT_MASK, false);
final public static KeyStroke selectNextTab = KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, KeyEvent.ALT_MASK, false);
final public static KeyStroke manageBookmarks = KeyStroke.getKeyStroke(KeyEvent.VK_B, KeyEvent.CTRL_MASK);
final public static KeyStroke addBookmark = KeyStroke.getKeyStroke(KeyEvent.VK_B, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK);
final public static KeyStroke exportProject = KeyStroke.getKeyStroke(KeyEvent.VK_E, KeyEvent.CTRL_MASK);
final public static KeyStroke generateJarFile = KeyStroke.getKeyStroke(KeyEvent.VK_J, KeyEvent.CTRL_MASK);
final public static KeyStroke generateDocumentation = KeyStroke.getKeyStroke(KeyEvent.VK_D, KeyEvent.CTRL_MASK);
final public static KeyStroke projectSettings = KeyStroke.getKeyStroke(KeyEvent.VK_P, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK);
final public static KeyStroke viewMessages = KeyStroke.getKeyStroke(KeyEvent.VK_M, KeyEvent.CTRL_MASK,false);
final public static KeyStroke viewMessagesOfSelected = KeyStroke.getKeyStroke(KeyEvent.VK_M, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK,false);
// editor
final public static KeyStroke undo = KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyEvent.CTRL_MASK, false);
final public static KeyStroke redo = KeyStroke.getKeyStroke(KeyEvent.VK_R, KeyEvent.CTRL_MASK, false);
final public static KeyStroke copy = KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_MASK, false);
final public static KeyStroke paste = KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.CTRL_MASK, false);
//[Feb2008] never used... final public static KeyStroke toUppercaseWord = KeyStroke.getKeyStroke(KeyEvent.VK_U, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK);
final public static KeyStroke deleteLine = KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, KeyEvent.CTRL_MASK);
final public static KeyStroke indentLine = KeyStroke.getKeyStroke(KeyEvent.VK_I, KeyEvent.CTRL_MASK);
final public static KeyStroke unindentLine = KeyStroke.getKeyStroke(KeyEvent.VK_U, KeyEvent.CTRL_MASK);
final public static KeyStroke commentOutLines = KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK);
final public static KeyStroke uncommentOutLines = KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK | KeyEvent.ALT_MASK);
//up-downs
// shift up down is already set in the editor
// ALT for occ
final public static KeyStroke nextOccurence = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.ALT_MASK, false);
final public static KeyStroke previousOccurence = KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.ALT_MASK, false);
// Ctrl for line messages
final public static KeyStroke jumpToNextMessage = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.CTRL_MASK, false);
final public static KeyStroke jumpToPreviousMessage = KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.CTRL_MASK, false);
final public static KeyStroke jumpToFirstMessage = KeyStroke.getKeyStroke(KeyEvent.VK_1, KeyEvent.CTRL_MASK,false);
final public static KeyStroke jumpToLastMessage = KeyStroke.getKeyStroke(KeyEvent.VK_9, KeyEvent.CTRL_MASK,false);
// ctrl shift to jump to next/prev method/field (not yet perfect...)
final public static KeyStroke jumpToNextAttr = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK, false);
final public static KeyStroke jumpToPreviousAttr = KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK, false);
final public static KeyStroke decreaseFontSize = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.CTRL_MASK|KeyEvent.ALT_MASK|KeyEvent.SHIFT_MASK, false);
final public static KeyStroke increaseFontSize = KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.CTRL_MASK|KeyEvent.ALT_MASK|KeyEvent.SHIFT_MASK, false);
// writes this.XX = XX, "int XX, ..." being the clipboard vars.
final public static KeyStroke assignMember = KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.ALT_MASK, false);
// finalize: inserts the text of a list of variables, with final added.
final public static KeyStroke prependFinal = KeyStroke.getKeyStroke(KeyEvent.VK_F, KeyEvent.ALT_MASK, false); // TODO
// from a list of args, create a class declaration.
final public static KeyStroke insertClassMembDeclForArgs = KeyStroke.getKeyStroke(KeyEvent.VK_L, KeyEvent.ALT_MASK, false);
// ctrl alt to jump to next/prev source in tree
final public static KeyStroke jumpToNextSrc = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.CTRL_MASK|KeyEvent.ALT_MASK, false);
final public static KeyStroke jumpToPreviousSrc = KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.CTRL_MASK|KeyEvent.ALT_MASK, false);
// jump history
final public static KeyStroke previousJumpPos = KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.ALT_MASK|KeyEvent.CTRL_MASK, false);
final public static KeyStroke nextJumpPos = KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, KeyEvent.ALT_MASK|KeyEvent.CTRL_MASK, false);
// search has many various usages, context based
final public static KeyStroke search = KeyStroke.getKeyStroke(KeyEvent.VK_F, KeyEvent.CTRL_MASK,false);
final public static KeyStroke searchFirstOcc = KeyStroke.getKeyStroke(KeyEvent.VK_1, KeyEvent.ALT_MASK,false);
final public static KeyStroke searchLastOcc = KeyStroke.getKeyStroke(KeyEvent.VK_9, KeyEvent.ALT_MASK,false);
final public static KeyStroke escape = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
final public static KeyStroke closeCurrentTab = KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.CTRL_MASK, false);
final public static KeyStroke scanExtFileChanges = KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0, false);
//KeyStroke.getKeyStroke(KeyEvent.VK_R, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK, false);
final public static KeyStroke internalFilesExplorer = KeyStroke.getKeyStroke(KeyEvent.VK_E, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK, false);
final public static KeyStroke internalResourcesExplorer = KeyStroke.getKeyStroke(KeyEvent.VK_R, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK, false);
final public static KeyStroke globalSearch = KeyStroke.getKeyStroke(KeyEvent.VK_G, KeyEvent.CTRL_MASK,false);
final public static KeyStroke searchInPackage = KeyStroke.getKeyStroke(KeyEvent.VK_P, KeyEvent.CTRL_MASK,false);
final public static KeyStroke globalProjectFilenameSearch = KeyStroke.getKeyStroke(KeyEvent.VK_G, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK,false);
final public static KeyStroke highlightAllOccurences = KeyStroke.getKeyStroke(KeyEvent.VK_K, KeyEvent.CTRL_MASK,false);
final public static KeyStroke jumpToLineNumber = KeyStroke.getKeyStroke(KeyEvent.VK_L, KeyEvent.CTRL_MASK,false);
final public static KeyStroke insertTypeCompletion = KeyStroke.getKeyStroke(KeyEvent.VK_T, KeyEvent.CTRL_MASK, false);
final public static KeyStroke insertTypeCompletionProjectOnly = KeyStroke.getKeyStroke(KeyEvent.VK_T, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK, false);
// dot without completion trig ( NOT KeyEvent.VK_STOP !! )
final public static KeyStroke dotWithoutCompletion = KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, KeyEvent.CTRL_MASK, false);
final public static KeyStroke manualCompletion = KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, KeyEvent.CTRL_MASK, false);
final public static KeyStroke liberateResources = KeyStroke.getKeyStroke(KeyEvent.VK_L, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK, false);
// Utilities
final public static KeyStroke uiKeysExplorer = KeyStroke.getKeyStroke(KeyEvent.VK_U, KeyEvent.CTRL_MASK | KeyEvent.ALT_MASK);
final public static KeyStroke systemPropsExplorer = KeyStroke.getKeyStroke(KeyEvent.VK_P, KeyEvent.CTRL_MASK | KeyEvent.ALT_MASK);
}
|