Skip to content
Snippets Groups Projects
Commit 404397ab authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Cleanup initialization

parent fbb1d37a
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@
<file url="file://$PROJECT_DIR$/PlayWallComponents/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/PlayWallCore" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/PlayWallCore/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/PlayWallCore/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/PlayWallPlugins" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/PlayWallPlugins/PlayWallPluginAwake" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/PlayWallPlugins/PlayWallPluginAwake/src/main/java" charset="UTF-8" />
......
package de.tobias.playpad.initialize
import de.thecodelabs.utils.application
import de.thecodelabs.utils.application.container.PathType
import de.thecodelabs.utils.util.Localization
import de.tobias.playpad.PlayPadImpl
import de.tobias.playpad.settings.GlobalSettings
class KeyboardDefaultMappingTask extends PlayPadInitializeTask {
override def name(): String = "Keyboard Mapping"
override def run(app: application.App, instance: PlayPadImpl): Unit = {
val globalSettingsPath = app.getPath(PathType.CONFIGURATION, GlobalSettings.FILE_NAME)
val globalSettings = instance.getGlobalSettings
globalSettings.getKeyCollection.loadDefaultFromFile("components/Keys.xml", Localization.getBundle)
......
......@@ -14,8 +14,7 @@ class ProfileLoadingTask extends PlayPadInitializeTask {
override def run(app: application.App, instance: PlayPadImpl): Unit = {
try ProfileReferenceManager.loadProfiles()
catch {
case e@(_: IOException | _: DocumentException) =>
Logger.error(e)
case e@(_: IOException | _: DocumentException) => Logger.error(e)
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment