Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .claude/commands/pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ Create a branch (if needed), commit staged/unstaged changes, push, and open/upda

3. **Build locally** by running `./gradlew clean build`. If there are any checkstyle
or spotbugs failure, or javac errors, fix them and rerun this check to verify your changes.
Don't worry about javac warnings currently - there are 3 that we need to address later,
but for now can be ignored.

4. **Review changes**: Run `git status` and `git diff` to understand what will be committed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ private void installKeyboardActions() {
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
ActionMap am = rootPane.getActionMap();

int modifier = getToolkit().getMenuShortcutKeyMask();
int modifier = getToolkit().getMenuShortcutKeyMaskEx();
KeyStroke ctrlF = KeyStroke.getKeyStroke(KeyEvent.VK_F, modifier);
im.put(ctrlF, "focusSearchForField");
am.put("focusSearchForField", new AbstractAction() {
Expand All @@ -381,10 +381,10 @@ public void actionPerformed(ActionEvent e) {
});

// Shift+Enter and Ctrl+Enter both do a backwards/opposite search
int shift = InputEvent.SHIFT_MASK;
int ctrl = InputEvent.CTRL_MASK;
int shift = InputEvent.SHIFT_DOWN_MASK;
int ctrl = InputEvent.CTRL_DOWN_MASK;
if (System.getProperty("os.name").toLowerCase().contains("os x")) {
ctrl = InputEvent.META_MASK;
ctrl = InputEvent.META_DOWN_MASK;
}
KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, shift);
im.put(ks, "searchBackward");
Expand Down
10 changes: 5 additions & 5 deletions RSTAUI/src/main/java/org/fife/rsta/ui/search/FindToolBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ protected void handleSearchAction(ActionEvent e) {
// JTextField returns *_DOWN_* modifiers, JButton returns the others (!)
int allowedModifiers =
InputEvent.CTRL_DOWN_MASK|InputEvent.SHIFT_DOWN_MASK | // field
InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK; // JButton
ActionEvent.CTRL_MASK|ActionEvent.SHIFT_MASK; // JButton

if ("FindNext".equals(action)) {
type = SearchEvent.Type.FIND;
Expand Down Expand Up @@ -500,9 +500,9 @@ protected void makeEnterActivateButton(JButton button) {
// versions don't work, possibly SHIFT_MASK vs. SHIFT_DOWN_MASK issue.
//im.put(KeyStroke.getKeyStroke("pressed SHIFT ENTER"), "pressed");
//im.put(KeyStroke.getKeyStroke("released SHIFT ENTER"), "released");
im.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_MASK,
im.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_DOWN_MASK,
false), "pressed");
im.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_MASK,
im.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_DOWN_MASK,
true), "released");

}
Expand Down Expand Up @@ -772,8 +772,8 @@ public void install(JTextComponent field) {
@Override
public void keyTyped(KeyEvent e) {
if (e.getKeyChar()=='\n') {
int mod = e.getModifiers();
int ctrlShift = InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK;
int mod = e.getModifiersEx();
int ctrlShift = InputEvent.CTRL_DOWN_MASK|InputEvent.SHIFT_DOWN_MASK;
boolean forward = (mod&ctrlShift) == 0;
doSearch(forward);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ private JMenuBar createMenuBar() {
menu.add(new JMenuItem(new GoToLineAction()));
menu.addSeparator();

int ctrl = getToolkit().getMenuShortcutKeyMask();
int shift = InputEvent.SHIFT_MASK;
int ctrl = getToolkit().getMenuShortcutKeyMaskEx();
int shift = InputEvent.SHIFT_DOWN_MASK;
KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_F, ctrl|shift);
Action a = csp.addBottomComponent(ks, findToolBar);
a.putValue(Action.NAME, "Show Find Search Bar");
Expand Down Expand Up @@ -234,7 +234,7 @@ private class GoToLineAction extends AbstractAction {

GoToLineAction() {
super("Go To Line...");
int c = getToolkit().getMenuShortcutKeyMask();
int c = getToolkit().getMenuShortcutKeyMaskEx();
putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_L, c));
}

Expand Down Expand Up @@ -301,7 +301,7 @@ private class ShowFindDialogAction extends AbstractAction {

ShowFindDialogAction() {
super("Find...");
int c = getToolkit().getMenuShortcutKeyMask();
int c = getToolkit().getMenuShortcutKeyMaskEx();
putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_F, c));
}

Expand All @@ -323,7 +323,7 @@ private class ShowReplaceDialogAction extends AbstractAction {

ShowReplaceDialogAction() {
super("Replace...");
int c = getToolkit().getMenuShortcutKeyMask();
int c = getToolkit().getMenuShortcutKeyMaskEx();
putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_H, c));
}

Expand Down
11 changes: 8 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ subprojects {
apply plugin: 'checkstyle'
apply plugin: 'com.github.spotbugs'

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
// Only need `options.release` set for `compileJava`, not for tests
options.debug = true
options.debugOptions.debugLevel = 'source,vars,lines'
options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
}

test {
useJUnitPlatform()
}
Expand Down Expand Up @@ -71,9 +79,6 @@ subprojects {

compileJava {
options.release = Integer.parseInt(javaLanguageVersion)
options.debug = true
options.debugOptions.debugLevel = 'source,vars,lines'
options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
}
}

Expand Down
Loading