Refine GroupsTree#15013
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
* upstream/main: New Crowdin updates (#15035) Use patched Gradle version (#15034) Add OpenAlex-based Citation Fetcher (#15023) Update null annotaitons at EntryBasedFetcher (#15024) Fix CHANGELOG.md test Use _ for unused variables (#15028) Use ubuntu-latest for checkstyle and javadoc Update Gradle Wrapper from 9.3.0-jabref-2 to 9.3.1 (#15021) Use "ubuntu-slim" for most workflows (#15019) Refine GroupsTree (#15013)
…4902 * upstream/main: (23 commits) Some more recipes from OpenRewrite (JabRef#15030) feat: Add PDF Upload endpoint to EntryResource (JabRef#14963) Heuristics also used at batch (JabRef#15025) Fix cleanup-pr.yml New Crowdin updates (JabRef#15035) Use patched Gradle version (JabRef#15034) Add OpenAlex-based Citation Fetcher (JabRef#15023) Update null annotaitons at EntryBasedFetcher (JabRef#15024) Fix CHANGELOG.md test Use _ for unused variables (JabRef#15028) Use ubuntu-latest for checkstyle and javadoc Update Gradle Wrapper from 9.3.0-jabref-2 to 9.3.1 (JabRef#15021) Use "ubuntu-slim" for most workflows (JabRef#15019) Refine GroupsTree (JabRef#15013) New Crowdin updates (JabRef#15018) Added Clear group option (JabRef#15017) Chore(deps): Bump com.uber.nullaway:nullaway from 0.12.15 to 0.13.1 in /versions (JabRef#15006) Chore(deps): Bump tools.jackson:jackson-bom in /versions (JabRef#15007) No rush in Docker building Yaml issue workaround ...
User description
Small code update
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)PR Type
Enhancement
Description
Replace
ArrayListwithListinterface for better abstractionUse instanceof pattern matching to simplify type casting
Extract variable to reduce repeated method calls
Add logging for unsupported group entry removal operations
Diagram Walkthrough
File Walkthrough
GroupTreeViewModel.java
Use interface type and extract variablejabgui/src/main/java/org/jabref/gui/groups/GroupTreeViewModel.java
ArrayListdeclarations toListinterface type in two methodsBibDatabaseContextvariable to avoid repeatedcurrentDatabase.get()callslocations
GroupTreeNode.java
Add logging and use instanceof pattern matchingjablib/src/main/java/org/jabref/model/groups/GroupTreeNode.java
unsupported group types