Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: DockingDesktop #12

Merged
merged 2 commits into from
Sep 24, 2024
Merged

Conversation

miurahr
Copy link
Member

@miurahr miurahr commented Sep 24, 2024

functional chnage

  • Remove static initialization of DockingUISettings and do it in the constructor

Improve robustness

  • Check currentState nullity when access
  • Avoid always running debug logic
  • Change stateChange condition to be currentState != null

initialize

  • Move fields initializer to constructor

Define with lambda

  • Define PropertyChangeListener and ActionListener with lambda

Optimize loop

  • Optimize if-else if-else blocks
  • Optimize for-loop

Style

  • Remove redundant initializers
  • Optimize empty check with isEmpty()
  • clean unused local variable
  • javadoc: DockingDesktop
  • Simplify DockingDesktop#splitComponent method's stateChange local variable definition
  • Replace if block of String comparison to switch block in xmlCreateComponent private method

## functional chnage
- Remove static initialization of DockingUISettings
  and do it in the constructor

## Improve robustness
- Check `currentState` nullity when access
- Avoid always running debug logic
- Change stateChange condition to be currentState != null

## initialize
- Move fields initializer to constructor

## Define with lambda
- Define PropertyChangeListener and ActionListener with lambda

## Optimize loop
- Optimize if-else if-else blocks
- Optimize for-loop

## Style
- Remove redundant initializers
- Optimize empty check with isEmpty()
- clean unused local variable
- javadoc: DockingDesktop
- Simplify DockingDesktop#splitComponent method's stateChange local variable definition
- Replace if block of String comparison to switch block
  in xmlCreateComponent private method
@miurahr miurahr marked this pull request as ready for review September 24, 2024 09:27
@miurahr miurahr merged commit 89740ee into master Sep 24, 2024
1 check passed
@miurahr miurahr deleted the topic/miurahr/refactor/docking-desktop branch September 24, 2024 09:34
miurahr added a commit that referenced this pull request Sep 26, 2024
## Added
* Respect `UIDefauls` table configuration defined in `LookAndFeel` class.(#11)
* Allow a customization by inheriting `DockingUISettings` class and overide `getDefaults` method.(#11)

### Fixed
* Avoid NPE when drag-n-drop with null hints (#9)

### Changed
* Add GitHub Actions CI
* Add SpotBugs and SpotLess code quality assurance
* Style: spotless code format applied (#8)
* feat: test UI behavior with Assertj-Swing-JUnit (#7)
* refactor: annotate deprecations, avoid access to internal class of other class(#6)
* refactor: avoid redundant casts (#6)
* refactor: DockingDesktop class not to initialize in static context(#12)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant