From 8ffc9e9075292028f4291eecc6f78736eac8f84b Mon Sep 17 00:00:00 2001 From: crissnb Date: Mon, 12 Feb 2024 03:16:07 +0100 Subject: [PATCH] checkstyle fixes --- .../element/container/InspectorVisibilityPicker.java | 5 ++++- src/main/java/org/gecko/view/views/EditorView.java | 4 ++-- .../views/shortcuts/SystemEditorViewShortcutHandler.java | 3 ++- src/main/java/org/gecko/viewmodel/GeckoViewModel.java | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/gecko/view/inspector/element/container/InspectorVisibilityPicker.java b/src/main/java/org/gecko/view/inspector/element/container/InspectorVisibilityPicker.java index 5e08801e..6658ac7a 100644 --- a/src/main/java/org/gecko/view/inspector/element/container/InspectorVisibilityPicker.java +++ b/src/main/java/org/gecko/view/inspector/element/container/InspectorVisibilityPicker.java @@ -6,7 +6,10 @@ import org.gecko.view.inspector.element.label.InspectorLabel; import org.gecko.viewmodel.PortViewModel; -/** Represents a type of {@link LabeledInspectorElement}. Contains an {@link InspectorLabel} and an {@link InspectorVisibilityComboBox}. */ +/** + * Represents a type of {@link LabeledInspectorElement}. Contains an {@link InspectorLabel} and an + * {@link InspectorVisibilityComboBox}. + */ public class InspectorVisibilityPicker extends LabeledInspectorElement { public InspectorVisibilityPicker(ActionManager actionManager, PortViewModel viewModel) { diff --git a/src/main/java/org/gecko/view/views/EditorView.java b/src/main/java/org/gecko/view/views/EditorView.java index bdd4370f..db123070 100644 --- a/src/main/java/org/gecko/view/views/EditorView.java +++ b/src/main/java/org/gecko/view/views/EditorView.java @@ -108,8 +108,8 @@ public EditorView( this.currentView = new Tab("Error_Name", currentViewPane); currentView.textProperty().bind(Bindings.createStringBinding(() -> { String name = viewModel.getCurrentSystem().getName(); - return name + (viewModel.isAutomatonEditor() ? " (" + ResourceHandler.getString("View", "automaton") + ")" : - " (" + ResourceHandler.getString("View", "system") + ")"); + return name + (viewModel.isAutomatonEditor() ? " (" + ResourceHandler.getString("View", "automaton") + ")" + : " (" + ResourceHandler.getString("View", "system") + ")"); }, viewModel.getCurrentSystem().getNameProperty())); this.worldSizeUpdateListener = (observable, oldValue, newValue) -> { diff --git a/src/main/java/org/gecko/view/views/shortcuts/SystemEditorViewShortcutHandler.java b/src/main/java/org/gecko/view/views/shortcuts/SystemEditorViewShortcutHandler.java index 62a957de..0863a9b3 100644 --- a/src/main/java/org/gecko/view/views/shortcuts/SystemEditorViewShortcutHandler.java +++ b/src/main/java/org/gecko/view/views/shortcuts/SystemEditorViewShortcutHandler.java @@ -29,7 +29,8 @@ private void addNavigateSystemShortcuts() { try { SystemViewModel systemViewModel = (SystemViewModel) focusedElement; actionManager.run(actionFactory.createViewSwitchAction(systemViewModel, false)); - } catch (ClassCastException ignored) { + } catch (ClassCastException e) { + e.printStackTrace(); } }); } diff --git a/src/main/java/org/gecko/viewmodel/GeckoViewModel.java b/src/main/java/org/gecko/viewmodel/GeckoViewModel.java index eb640f2b..1816867d 100644 --- a/src/main/java/org/gecko/viewmodel/GeckoViewModel.java +++ b/src/main/java/org/gecko/viewmodel/GeckoViewModel.java @@ -72,7 +72,8 @@ private void setupNewEditorViewModel(SystemViewModel nextSystemViewModel, boolea if (nextSystemViewModel.getTarget().getParent() != null) { parent = (SystemViewModel) getViewModelElement(nextSystemViewModel.getTarget().getParent()); } - EditorViewModel editorViewModel = viewModelFactory.createEditorViewModel(nextSystemViewModel, parent, isAutomatonEditor); + EditorViewModel editorViewModel = + viewModelFactory.createEditorViewModel(nextSystemViewModel, parent, isAutomatonEditor); openedEditorsProperty.add(editorViewModel); setCurrentEditor(editorViewModel); }