-
Notifications
You must be signed in to change notification settings - Fork 0
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
Linked files pattern logic and UI #1 #2 #4
Conversation
This commit lays the groundwork for a tabular UI to configure filename patterns for linked files. The core logic is implemented, mirroring the structure used for Citation Key Patterns. UI implementation and integration with LinkedFilesTab will be addressed in later commits.
…on UI This commit replace the old ui with tabular UI to configure filename patterns for linked files. The core logic is implemented, mirroring the structure used for Citation Key Patterns. UI implementation and integration with LinkedFilesTab will be addressed in later commits.
This commit improves the UI and makes it functional. However, core logic still needs to be implemented. IMPORTANT TODO: 1. Update CleanupPresetPanel.java in gui/cleanup: - Temporarily added .toString() to filePreferences.getFileNamePattern() - Need to modify this as the new GlobalFilenamePattern object stores patterns for different file types, not just a single pattern 2. Refactor getSuggestedFileName in logic/externalfiles/LinkedFileHandler.java: - Current implementation expects a single file name pattern - Need to update to work with the new GlobalFilenamePattern object Note: These changes may affect other parts of the application that rely on the previous file name pattern implementation. Further testing and updates may be required.
…files-pattern-logic-#2
This commit improves the UI and makes it functional. However, core logic still needs to be implemented. IMPORTANT TODO: 1. Update CleanupPresetPanel.java in gui/cleanup: - Temporarily added .toString() to filePreferences.getFileNamePattern() - Need to modify this as the new GlobalFilenamePattern object stores patterns for different file types, not just a single pattern 2. Refactor getSuggestedFileName in logic/externalfiles/LinkedFileHandler.java: - Current implementation expects a single file name pattern - Need to update to work with the new GlobalFilenamePattern object Note: These changes may affect other parts of the application that rely on the previous file name pattern implementation. Further testing and updates may be required.
Major change: - Refactored `createFileNameFromPattern` in `FileUtil` to generate filenames dynamically based on the `EntryType`. - Add store and load for FilePreferences **Note:** Related test cases currently encounter compile errors and require fixes.
…files-pattern-logic-#2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to delete the DatabaseFilenamePattern
since it is not used and the FilenameGenerator
since it is empty? Also one little things like pass the checkstyle test.
Otherwise, it looks good to me. Let me know if you want to change it, or I'm happy to approve and merge.
Thanks, I've made the changes. I initially planned to submit a draft PR to confirm if we're heading in the right direction, so the checkstyle issue isn't a big concern for now anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Happy to approve
This pull request addresses two related issues:
Major Changes Made:
UI Enhancements:
FilenamePatternPanel
to manage patterns in a tabular format.{year}_{title}_{author}
).Backend Logic:
FileUtil
to generate filenames dynamically based on the patterns defined in the UI.GlobalFilenamePattern
andAbstractFilenameFormatPatterns
, etc. classes to support flexible pattern definitions and retrieval.FilePreferences
to store and manage filename patterns persistently.Some change in test:
Issue Links:
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)