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

Rethink displayable fields vs. writeable fields #574

Closed
koppor opened this issue Dec 23, 2015 · 2 comments
Closed

Rethink displayable fields vs. writeable fields #574

koppor opened this issue Dec 23, 2015 · 2 comments
Labels
type: code-quality Issues related to code or architecture decisions type: enhancement

Comments

@koppor
Copy link
Member

koppor commented Dec 23, 2015

JabRef has following flags for fields to distinguish between to be shown in the BibTeX source tab and to be written to a file.

In net.sf.jabref.gui.BibtexFields this is shown as follows:

private static final int STANDARD = 0x01; // it is a standard bibtex-field
private static final int PRIVATE = 0x02; // internal use, e.g. owner, timestamp
private static final int DISPLAYABLE = 0x04; // These fields cannot be shown inside the source editor panel
private static final int WRITEABLE = 0x08; // These fields will not be saved to the .bib file.

The comment at DISPLAYABLE and WRITEABLE should IMHO be the other way round.

With #391, the source editor tab also shows write-only fields when the entry was not modified:

grabbed_20151223-181053

A possible solution is to rethink non-displayable fields. My current opinion is to write these markings in a separate @comment entry (jabref-meta) or as comment above the entry itself to keep the original entry clean. Reason: (i) For me as user it is not understandable why the displayed rendering is different from the writing in the .bib file. (ii) For me as developer I do not want to offer easy change JabRef's internals. Therefore, I'd like to separate JabRef's markings from the entry data. This should remove the DISPLAYABLE and WRITEABLE flags.

Finally, the flags STANDARD and PRIVATE should be obsolete and removed.

@tobiasdiez
Copy link
Member

In #629 I actually propose the converse for groups: serialize the explicit group membership as a field groups in the entry instead of a comment at the end. In my opinion the advantages of such an approach (as listed in #629) outweigh your concerns. In particular, concerning your remarks in the last paragraph:

  1. This can be solved easily by displaying all the fields in the "Bibtex" tab.
  2. From time to time I find it quite convenient to change the properties of an entry using the bibtex code instead of the UI.

I think this is something for the next dev-call.

@koppor koppor removed this from the v3.3 milestone Mar 8, 2016
@koppor koppor added this to the v3.4 milestone Mar 8, 2016
@koppor
Copy link
Member Author

koppor commented Mar 8, 2016

Decision: show all fields being written. It has to be the same serialization as being written.

TypedBibEntry has no own state. State only at BibEntry.

If possible, remove isSearchHit().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: code-quality Issues related to code or architecture decisions type: enhancement
Projects
None yet
Development

No branches or pull requests

4 participants