ClementGre / PDF4Teachers

PDF editing software for teachers, focused on productivity. PDF4Teachers keeps recorded previous annotations, and offers features like marking scale, PDF conversion, vectorial drawing...
https://pdf4teachers.org/
Apache License 2.0
146 stars 18 forks source link

Refactor code for streamlined collection handling and conditional checks #192

Closed arturhg closed 4 months ago

arturhg commented 4 months ago

Summary

This PR refactors various parts of the codebase to improve readability and maintainability. Key updates include replacing index-based access with more readable collection methods, simplifying conditional checks, and leveraging streams for concise collection manipulation.

Changes

SliderWithoutPopup.java

Document.java

Edition.java and SkillTableElement.java

GradeElement.java

SkillTableGridPane.java and TextElement.java

PDFPagesEditor.java

PDFPagesRender.java and PageRenderer.java

ExportWindow.java

AutoHideNotificationPane.java

AutoTipsManager.java

AlternativeWindow.java

MainWindow.java

BookletEngine.java

GalleryWindow.java

TR.java

SettingGroupPane.java

SplitEngine.java

MainScreen.java

SideBar.java

FileTab.java

GradeCopyGradeScaleDialog.java

GradeTab.java and GradeTreeItem.java

GradeTreeView.java

GradeExportRenderer.java

ListPane.java

SACocheParser.java and SACocheWriter.java

TextTreeSection.java

FilesChooserManager.java

ErrorAlert.java

KeyCodeCombinaisonInputAlert.java

LockMessage.java

Impact

These changes will improve the maintainability and readability of the codebase without affecting existing functionality. Potential side effects are minimal, as the core logic remains unchanged.

ClementGre commented 4 months ago

That's all good, thanks!