Skip to content
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

Added all person name and date fields to InternalBibtexFields #1097

Merged
merged 3 commits into from
Apr 8, 2016

Conversation

oscargus
Copy link
Contributor

@oscargus oscargus commented Apr 4, 2016

  • Added all person name and date fields to InternalBibtexFields and changed logic which typically detects "author" and "editor" to detect if the field is a person name list field. All date fields now get a calendar button.
  • Moved default ImportInspectorDialog fields to ImportInspectorDialog and removed the argument to the constructor since the default was always used anyway.
  • Added support for cleaning up dates of the form "uuuu-M-d", e.g. 2016.4.4.

@oscargus oscargus added [outdated] type: enhancement component: cleanup-ops status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Apr 4, 2016
@@ -480,7 +481,7 @@ public Object getColumnValue(BibEntry entry, int column) {
}
else {
String field = FIELDS[column - PAD];
if ("author".equals(field) || "editor".equals(field)) {
if (InternalBibtexFields.getFieldExtras(field).contains(BibtexSingleFieldProperties.PERSON_NAMES)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would make sense to add a method isPersonName(field) to InternalBibtexFields since this is check occurs quite often.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was considering that, but at the same time there may be quite a few different methods of that type provided that one supports all properties. But I agree that the call is quite long considering that there are long class names etc and that this is probably the most frequent call.

@oscargus
Copy link
Contributor Author

oscargus commented Apr 5, 2016

I moved the field arrays to InternalBibtexFields, renamed BibtexSingleFieldProperties to FieldProperties, made AuthorNameChecker check all field with PERSON_NAMES property, and added support for integer (partial) and gender fields. Screen shot for gender field (which is mocked because of #1101), "Single male name" is now only "Male name" etc.

screenshot-3

@oscargus oscargus force-pushed the internalbibtexfields branch from dad8155 to e5a04aa Compare April 5, 2016 10:06
@simonharrer
Copy link
Contributor

Please rebase and merge.

@@ -5,11 +5,11 @@
public enum BibtexSingleFieldProperties {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this class still in use?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is the new class for this. Now renamed to FieldProperties (it might be that the removal was not done, on my office machine it isn't enough to do git add . to include all changes...).

@oscargus oscargus force-pushed the internalbibtexfields branch from e5a04aa to f47544b Compare April 8, 2016 14:26
@oscargus oscargus force-pushed the internalbibtexfields branch from f47544b to 3d9149b Compare April 8, 2016 14:33
@oscargus oscargus merged commit bfb2680 into JabRef:master Apr 8, 2016
@oscargus oscargus deleted the internalbibtexfields branch April 8, 2016 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: cleanup-ops [outdated] type: enhancement status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants