-
-
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
Save actions gui #821
Save actions gui #821
Conversation
Conflicts: src/main/java/net/sf/jabref/exporter/FileActions.java src/main/resources/l10n/JabRef_da.properties src/main/resources/l10n/JabRef_de.properties src/main/resources/l10n/JabRef_es.properties src/main/resources/l10n/JabRef_fa.properties src/main/resources/l10n/JabRef_fr.properties src/main/resources/l10n/JabRef_in.properties src/main/resources/l10n/JabRef_it.properties src/main/resources/l10n/JabRef_ja.properties src/main/resources/l10n/JabRef_nl.properties src/main/resources/l10n/JabRef_no.properties src/main/resources/l10n/JabRef_pt_BR.properties src/main/resources/l10n/JabRef_ru.properties src/main/resources/l10n/JabRef_tr.properties src/main/resources/l10n/JabRef_vi.properties src/main/resources/l10n/JabRef_zh.properties
Conflicts: src/main/resources/l10n/JabRef_da.properties src/main/resources/l10n/JabRef_de.properties src/main/resources/l10n/JabRef_es.properties src/main/resources/l10n/JabRef_fa.properties src/main/resources/l10n/JabRef_ja.properties src/main/resources/l10n/JabRef_nl.properties src/main/resources/l10n/JabRef_ru.properties
Very nice!
|
Again, the things I stated above are implemented and, hopefully, this can soon be merged. Just a few remarks:
|
Even when they are enabled but have no configuration, they are stored.
I propose to only store them if they are really used. Otherwise, nothing should be stored in the bib file. And the serialization format changes if save actions are enabled or disabled, as shown in the examples above. |
And it's implemented. I guess this PR will never end, will it? ;-) |
Mhhh... maybe it is better to apply the save actions not in the DatabaseWriter but in another place (savesession?). Because of separation of concerns and so... What do you think? |
@@ -13,9 +13,9 @@ | |||
with this program; if not, write to the Free Software Foundation, Inc., | |||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |||
*/ | |||
package net.sf.jabref.gui; | |||
package net.sf.jabref.gui.databaseProperties; |
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.
Please avoid capitals in package names.
Could you also please add the TrimFormatter and RemoveBracesFormatter from #853. Thanks! |
Conflicts: src/main/java/net/sf/jabref/gui/dbproperties/DatabasePropertiesDialog.java
Once more, the above comments are implemented and this PR is ready for review. Discussion points:
(Note: I will take care about the codacy stuff in a final step after we aggree on merging the current feature set, but not now when things might still change) |
I'm in favor of merging this in! (Especially since I want to use the feature 😃 ). @lenhard It was more a feeling that the application of save actions might have a better home somewhere else. But your are right, the DataBaseWriter is probably the right place for now. |
About the icons: why not use the icons for adding and removing files in the Entry Editor -> General? Otherwise this seems good to be merged. |
Nice job 👍 |
This is the first (functional) shot at integrating a GUI for configuring save actions. I think it is now time for feedback on two aspects:
Regarding 1.: Currently, any class implementing
net.sf.jabref.logic.formatter.Formatter
can be used as a save action and can be configured for a field of any non-null and non-empty name (so you can configure actions for your custom fields). That is quite flexible. It would be trivial to extend that tonet.sf.jabref.logic.cleanup.CleanupJob
. The problem with integrating cleanup actions is that aCleanupJob
seems to represent a batch job of cleanups that are preconfigured for certain fields. It is generally not intended to execute aCleanupJob
for a specific and selectable field. Hence, I am not sure if cleanups and save actions go well together. A downside of the current save action feature is that save actions cannot be undone (like the sorting feature).Regarding 2.: The GUI is functional, not pretty.
It has a check box to enable or disable all actions, a set of controls for adding a new action, a list for displaying actions, and a button for deleting a selected action. Do you have suggestions for a better set of controls?
Finally, the layout of the controls definitely needs improvement and for some reason the size of the controls increases when adding an action. These things need to be fixed. Alas, layouting is not my favourite task...
I would be grateful if someone takes a look at this and provides some feedback!