Package mars.venus.actions.help
Class HelpUpdateAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.actions.VenusAction
mars.venus.actions.help.HelpUpdateAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
Action for the Help -> Check for Updates menu item.
- Author:
- Colin Wong
- See Also:
-
Field Summary
Fields inherited from class mars.venus.actions.VenusAction
gui, shortcutFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Should be overridden by subclasses to carry out the action they represent.Asynchronously fetch the list of released versions using the GitHub API.Methods inherited from class mars.venus.actions.VenusAction
getGUI, getName, getShortcut, registerShortcut, updateMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
HelpUpdateAction
-
-
Method Details
-
actionPerformed
Description copied from class:VenusActionShould be overridden by subclasses to carry out the action they represent.- Specified by:
actionPerformedin interfaceActionListener- Specified by:
actionPerformedin classVenusAction
-
fetchReleases
Asynchronously fetch the list of released versions using the GitHub API.- Returns:
- A mapping from version identifiers to their corresponding user-facing release page URLs,
wrapped in a
CompletableFutureto enable asynchronous behavior. Note that this future completes exceptionally with anIOExceptionif the HTTPGETrequest fails.
-