-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Conversation
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.
@@ -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)) { |
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 it would make sense to add a method isPersonName(field)
to InternalBibtexFields since this is check occurs quite often.
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 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.
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. |
dad8155
to
e5a04aa
Compare
Please rebase and merge. |
@@ -5,11 +5,11 @@ | |||
public enum BibtexSingleFieldProperties { |
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.
Is this class still in use?
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.
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...).
e5a04aa
to
f47544b
Compare
f47544b
to
3d9149b
Compare