mirror of
https://github.com/SuspiciousActivity/ByteEdit.git
synced 2026-08-13 17:56:17 +00:00
Updated to support Java 11, but only Java 8 features
This commit is contained in:
1 parent
58c8e90c81
commit
89f9753d8b
19 files changed
+1877
-2145
No files matched your search
@@ -15,19 +15,18 @@ import javax.swing.KeyStroke;
|
||||
import org.fife.ui.rtextarea.RTADefaultInputMap;
|
||||
|
||||
/**
|
||||
* The default input map for an <code>RSyntaxTextArea</code>.
|
||||
* Currently, the new key bindings include:
|
||||
* The default input map for an <code>RSyntaxTextArea</code>. Currently, the new
|
||||
* key bindings include:
|
||||
* <ul>
|
||||
* <li>Shift+Tab indents the current line or currently selected lines
|
||||
* to the left.
|
||||
* <li>Shift+Tab indents the current line or currently selected lines to the
|
||||
* left.
|
||||
* </ul>
|
||||
*
|
||||
* @author Robert Futrell
|
||||
* @version 1.0
|
||||
*/
|
||||
@SuppressWarnings({ "checkstyle:linelength" })
|
||||
public class RSyntaxTextAreaDefaultInputMap extends RTADefaultInputMap {
|
||||
|
||||
|
||||
/**
|
||||
* Constructs the default input map for an <code>RSyntaxTextArea</code>.
|
||||
*/
|
||||
@@ -60,18 +59,23 @@ public class RSyntaxTextAreaDefaultInputMap extends RTADefaultInputMap {
|
||||
// (unfortunately) don't have a ToggleCommentAction for *nix
|
||||
// out-of-the-box.
|
||||
// Applications can add one easily enough if they want one.
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_SLASH, defaultMod), RSyntaxTextAreaEditorKit.rstaToggleCommentAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_SLASH, defaultMod),
|
||||
RSyntaxTextAreaEditorKit.rstaToggleCommentAction);
|
||||
}
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_OPEN_BRACKET, defaultMod), RSyntaxTextAreaEditorKit.rstaGoToMatchingBracketAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_OPEN_BRACKET, defaultMod),
|
||||
RSyntaxTextAreaEditorKit.rstaGoToMatchingBracketAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, defaultMod), RSyntaxTextAreaEditorKit.rstaCollapseFoldAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, defaultMod), RSyntaxTextAreaEditorKit.rstaExpandFoldAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_DIVIDE, defaultMod), RSyntaxTextAreaEditorKit.rstaCollapseAllFoldsAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_MULTIPLY, defaultMod), RSyntaxTextAreaEditorKit.rstaExpandAllFoldsAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_DIVIDE, defaultMod),
|
||||
RSyntaxTextAreaEditorKit.rstaCollapseAllFoldsAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_MULTIPLY, defaultMod),
|
||||
RSyntaxTextAreaEditorKit.rstaExpandAllFoldsAction);
|
||||
// NOTE: no modifiers => mapped to keyTyped. If we had "0" as a second
|
||||
// second parameter, we'd get the template action (keyPressed) AND the
|
||||
// default space action (keyTyped).
|
||||
// put(KeyStroke.getKeyStroke(' '),
|
||||
// RSyntaxTextAreaEditorKit.rstaPossiblyInsertTemplateAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, defaultShift), RSyntaxTextAreaEditorKit.rstaPossiblyInsertTemplateAction);
|
||||
put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, defaultShift),
|
||||
RSyntaxTextAreaEditorKit.rstaPossiblyInsertTemplateAction);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user