Skip to content

Commit

Permalink
fix checsktyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr committed Jan 2, 2021
1 parent 0b4be8a commit 60cc355
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/getting-into-the-code/code-howtos.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Principles:
Localization.lang("Something went wrong...", ioe);
}
```

* Never, ever throw and catch `Exception` or `Throwable`
* Errors should only be logged when they are finally caught \(i.e., logged only once\). See **Logging** for details.
* If the Exception message is intended to be shown to the User in the UI \(see below\) provide also a localizedMessage \(see `JabRefException`\).
Expand Down Expand Up @@ -57,7 +58,7 @@ Many times there is a need to provide an object on many locations simultaneously
### Main principle
`EventBus` represents a communication line between multiple components. Objects can be passed through the bus and reach the listening method of another object which is registered on that `EventBus` instance. Hence the passed object is available as a parameter in the listening method.
`EventBus` represents a communication line between multiple components. Objects can be passed through the bus and reach the listening method of another object which is registered on that `EventBus` instance. Hence, the passed object is available as a parameter in the listening method.
### Register to the `EventBus`
Expand Down Expand Up @@ -401,15 +402,15 @@ All radio buttons that should be grouped together need to have a ToggleGroup def
### JavaFX Dialogs

All dialogs should be displayed to the user via `DialogService` interface methods.
`DialogService` provides methods to display various dialogs (including custom ones) to the user.
`DialogService` provides methods to display various dialogs (including custom ones) to the user.
It also ensures the displayed dialog opens on the correct window via `initOwner()` (for cases where the user has multiple screens).
The following code snippet demonstrates how a custom dialog is displayed to the user:

```java
dialogService.showCustomDialog(new DocumentViewerView());
```

If an instance of `DialogService` is unavailable within current class/scope in which the dialog needs to be displayed,
If an instance of `DialogService` is unavailable within current class/scope in which the dialog needs to be displayed,
`DialogService` can be instantiated via the code snippet shown as follows:

```java
Expand Down

0 comments on commit 60cc355

Please sign in to comment.