-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix for issue 571: File folders: Move between global and user-specific #12059
Conversation
@koppor and @HoussemNasri. |
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.
an old review comment was not posted - it is still valid.
Pleae also fix buildres/abbrv.jabref.org
} | ||
} | ||
|
||
public void moveToDirectory(MenuItem moveFileItem, MenuItem moveAndRenameFileItem, boolean toRename) { |
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.
I think, a similar function already exists at org.jabref.logic.externalfiles.LinkedFileHandler#copyOrMoveToDefaultDirectory
. One "just" needs to make it more generic to get the target directory (instead of databaseContext.getFirstExistingFileDir(filePreferences);
).
With the record I proposed, this should be very easy.
@@ -325,68 +371,96 @@ private ContextMenu createContextMenuForFile(LinkedFileViewModel linkedFile) { | |||
factory.createMenuItem(StandardActions.OPEN_FOLDER, new ContextAction(StandardActions.OPEN_FOLDER, linkedFile, preferences)), | |||
new SeparatorMenuItem(), | |||
factory.createMenuItem(StandardActions.DOWNLOAD_FILE, new ContextAction(StandardActions.DOWNLOAD_FILE, linkedFile, preferences)), | |||
moveFileItems[0], |
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.
No - not any arrays in Java.
…irectory and person + pdf icon to be displayed for user-specific file directory. Signed-off-by: Rhonda Luu <[email protected]>
# Conflicts: # src/main/resources/l10n/JabRef_en.properties
…n file directory and person + pdf icon to be displayed for user-specific file directory." This reverts commit c4f9212.
… for main file directory and person + pdf icon to be displayed for user-specific file directory."" This reverts commit 216ba2d.
NOTE: not sure if this may cause other issues
…ssue-571 # Conflicts: # src/main/resources/l10n/JabRef_en.properties
…for-issue-571 # Conflicts: # src/main/resources/l10n/JabRef_en.properties
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.
Your code currently does not meet JabRef's code guidelines.
We use OpenRewrite to ensure "modern" Java coding practices.
The issues found can be automatically fixed.
Please execute the gradle task rewriteRun
, check the results, commit, and push.
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "OpenRewrite".
…as "world + pdf" icons if stored in the "General file directory" and "person+ pdf" if stored in the "user-specific file directory"
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.
Your code currently does not meet JabRef's code guidelines.
We use OpenRewrite to ensure "modern" Java coding practices.
The issues found can be automatically fixed.
Please execute the gradle task rewriteRun
, check the results, commit, and push.
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "OpenRewrite".
Closing this issue due to inactivity 💤 |
Describe the changes you have made here:
Created a separate class to handle movement of files between directories. The class follows the structure and logic mention in issue #12287
Class Location: org.jabref/gui/fieldeditors
Class Name: FileDirectoryHandler
Class Description: Primary objective of this class to give target directory based on the current location/path of the file.
Changes in LinkedFilesEditor.java
Changes in LinkedFileViewModel.java
Add some tests to check the functionality of FileDirectoryHandler
Closes https://github.com/koppor/jabref/issues/571
Special Note: Want to confirm whether going in right direction or not. Unit Testing is in process.
Manual testing is performed. Creating a draft PR for review.
Screenshots
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)