-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1875 #2008
base: master
Are you sure you want to change the base?
#1875 #2008
Conversation
...iew/src/au/gov/asd/tac/constellation/views/dataaccess/io/DataAccessParametersIoProvider.java
Outdated
Show resolved
Hide resolved
...iew/src/au/gov/asd/tac/constellation/views/dataaccess/io/DataAccessParametersIoProvider.java
Outdated
Show resolved
Hide resolved
CoreDataAccessView/src/au/gov/asd/tac/constellation/views/dataaccess/panes/DataAccessPane.java
Outdated
Show resolved
Hide resolved
CoreDataAccessView/src/au/gov/asd/tac/constellation/views/dataaccess/panes/DataAccessPane.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/genericjsonio/JsonIO.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/genericjsonio/JsonIODialog.java
Outdated
Show resolved
Hide resolved
...ties/src/au/gov/asd/tac/constellation/utilities/keyboardshortcut/RecordKeyboardShortcut.java
Outdated
Show resolved
Hide resolved
public class RecordKeyboardShortcut { | ||
|
||
public Optional<String> start(Stage primaryStage) { | ||
var label = new Label(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also declare as a Label
rather than var
...ties/src/au/gov/asd/tac/constellation/utilities/keyboardshortcut/RecordKeyboardShortcut.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
private KeyCombination createCombo(KeyEvent event) { | ||
var modifiers = new ArrayList<Modifier>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we declare as List here?
...iew/src/au/gov/asd/tac/constellation/views/dataaccess/io/DataAccessParametersIoProvider.java
Outdated
Show resolved
Hide resolved
CoreDataAccessView/src/au/gov/asd/tac/constellation/views/dataaccess/panes/DataAccessPane.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/genericjsonio/JsonIO.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/genericjsonio/JsonIO.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/genericjsonio/JsonIO.java
Outdated
Show resolved
Hide resolved
public class RecordKeyboardShortcut { | ||
|
||
public Optional<String> start(Stage primaryStage) { | ||
var label = new Label(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also declare as a Label
rather than var
} | ||
|
||
private KeyCombination createCombo(KeyEvent event) { | ||
var modifiers = new ArrayList<Modifier>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we declare as List here?
The Additional Information section of ticket #1875 suggests the functionality should allow the user to assign the shortcuts to the templates they want to use. The functionality should allow the user to select a shortcut number when saving a template, and also reassign/remove shortcut numbers when loading templates. |
The core functionality now seems to be working fine, but it feels like too many popup dialogs appearing to achieve this. So you can optionally set a shortcut, where it pops up the dialog to get the keystroke, then returns to this Saving dialog. |
CoreDataAccessView/src/au/gov/asd/tac/constellation/views/dataaccess/panes/DataAccessPane.java
Outdated
Show resolved
Hide resolved
CoreDataAccessView/src/au/gov/asd/tac/constellation/views/dataaccess/panes/DataAccessPane.java
Outdated
Show resolved
Hide resolved
.../test/unit/src/au/gov/asd/tac/constellation/views/dataaccess/panes/DataAccessPaneNGTest.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/genericjsonio/JsonIO.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/genericjsonio/JsonIO.java
Outdated
Show resolved
Hide resolved
...d/tac/constellation/utilities/keyboardshortcut/TextInputDialogWithKeybordShortcutNGTest.java
Outdated
Show resolved
Hide resolved
...d/tac/constellation/utilities/keyboardshortcut/TextInputDialogWithKeybordShortcutNGTest.java
Outdated
Show resolved
Hide resolved
...d/tac/constellation/utilities/keyboardshortcut/TextInputDialogWithKeybordShortcutNGTest.java
Outdated
Show resolved
Hide resolved
...d/tac/constellation/utilities/keyboardshortcut/TextInputDialogWithKeybordShortcutNGTest.java
Outdated
Show resolved
Hide resolved
...d/tac/constellation/utilities/keyboardshortcut/TextInputDialogWithKeybordShortcutNGTest.java
Outdated
Show resolved
Hide resolved
|
@@ -1,5 +1,5 @@ | |||
/* | |||
* Copyright 2010-2024 Australian Signals Directorate | |||
* Copyright 2010-2021 Australian Signals Directorate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update copyright to 2025
@@ -0,0 +1,114 @@ | |||
/* | |||
* Copyright 2010-2024 Australian Signals Directorate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update copyright to 2025
@@ -182,6 +191,22 @@ public static void saveJsonPreferences(final Optional<String> saveDir, final Opt | |||
} | |||
} | |||
|
|||
public static Optional<String> getDefaultKeyboardShortcut(File preferenceDirectory) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter final
@@ -0,0 +1,136 @@ | |||
/* | |||
* Copyright 2010-2024 Australian Signals Directorate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update copyright year
import org.apache.commons.lang3.StringUtils; | ||
|
||
/** | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can a description of what the class does be added?
@@ -0,0 +1,130 @@ | |||
/* | |||
* Copyright 2010-2024 Australian Signals Directorate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update copyright year
import org.apache.commons.lang3.StringUtils; | ||
|
||
/** | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add description for the class
} | ||
|
||
//For unit test | ||
public RecordKeyboardShortcut(KeyPressLabelDialog td) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter final
@@ -0,0 +1,266 @@ | |||
/* | |||
* Copyright 2010-2024 Australian Signals Directorate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update copyright year
import org.apache.commons.lang3.StringUtils; | ||
|
||
/** | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add description for class
Prerequisites
Reviewed the checklist
Reviewed feedback from the "Sonar Cloud" bot. Note that you have to wait
for the "CI / Unit Tests") to complete first. Failed Unit tests can be
debugged by adding the label "verbose logging" to the GitHub PR.
Description of the Change
In the Data Access View, map keyboard shortcuts to templates. Default is from ctrl-1 to ctrl-5 and after that user can provide shortcut of their choice
Alternate Designs
Why Should This Be In Core?
Benefits
Possible Drawbacks
Verification Process
Applicable Issues
#1875