Package org.openstreetmap.josm.actions
Class RestartAction
java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.actions.JosmAction
org.openstreetmap.josm.actions.RestartAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action,Destroyable
Restarts JOSM as it was launched. Comes from "restart" plugin, originally written by Upliner.
Mechanisms have been improved based on #8561 discussions and this article.
Mechanisms have been improved based on #8561 discussions and this article.
- Since:
- 5857
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openstreetmap.josm.actions.JosmAction
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static final StringFields inherited from class org.openstreetmap.josm.actions.JosmAction
scFields 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 TypeMethodDescriptionvoidprivate static voidaddVMArguments(Collection<String> cmd) static HelpAwareOptionPane.ButtonSpec[]Returns defaultButtonSpecinstances for this action (Restart/Cancel).Returns a newButtonSpecinstance that do not perform this action.private static StringReturns a newButtonSpecinstance that performs this action.private static booleanprivate static booleanstatic booleanDetermines if restarting the application should be possible on this platform.private static voidprivate static voidstatic voidRestarts the current Java application.Methods inherited from class org.openstreetmap.josm.actions.JosmAction
buildActiveLayerChangeAdapter, buildLayerChangeAdapter, checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, setHelpId, setToolbarId, setTooltip, updateEnabledState, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFutureMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
APPLE_OSASCRIPT
- See Also:
-
APPLE_APP_PATH
- See Also:
-
RESTART_APPLE_SCRIPT
- See Also:
-
cmd
-
-
Constructor Details
-
RestartAction
public RestartAction()Constructs a newRestartAction.
-
-
Method Details
-
actionPerformed
-
isRestartSupported
Determines if restarting the application should be possible on this platform.- Returns:
trueif the mandatory system propertysun.java.commandis defined,falseotherwise.- Since:
- 5951
-
restartJOSM
Restarts the current Java application. -
isDebugSimulation
-
logEnvironment
-
logEnvironmentVariable
-
isExecutableFile
-
determineRestartCommands
-
getAppleCommands
- Throws:
IOException
-
getCommands
- Throws:
IOException
-
getJavaRuntime
- Throws:
IOException
-
addVMArguments
-
getRestartButtonSpec
Returns a newButtonSpecinstance that performs this action.- Returns:
- A new
ButtonSpecinstance that performs this action.
-
getCancelButtonSpec
Returns a newButtonSpecinstance that do not perform this action.- Returns:
- A new
ButtonSpecinstance that do not perform this action.
-
getButtonSpecs
Returns defaultButtonSpecinstances for this action (Restart/Cancel).- Returns:
- Default
ButtonSpecinstances for this action. - See Also:
-