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

Keyword separator behaviour (again, from a groups perspective) #1877

Closed
oscargus opened this issue Aug 28, 2016 · 3 comments
Closed

Keyword separator behaviour (again, from a groups perspective) #1877

oscargus opened this issue Aug 28, 2016 · 3 comments
Assignees
Labels
component: groups component: keywords dev: code-quality Issues related to code or architecture decisions [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs
Milestone

Comments

@oscargus
Copy link
Contributor

oscargus commented Aug 28, 2016

Let me rephrase this: the use of the keyword separator is ambiguous in JabRef.

It is by default set to ,. This leads to:

  1. StringTokenizer splits on both , and
  2. when adding keywords, is used as a separator

Clearly these two behaviors are just by luck sometimes compatible. Based on 1. it would be better to have , as the default.

In addition, the EntryUtil method for splitting on keywords used by BibEntry totally ignores this.

Relates to #705

( @Siedlerchr 's comment was for the previous wording of this, although it is still relevant.)

I can in this context note that quite a bit of the refactoring I've made recently has been to pass this separator down to the correct methods. Except for the fact that I know that it is bad, I would almost suggest having the separator as a global static variable in model...

@oscargus oscargus added [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs component: groups labels Aug 28, 2016
@oscargus oscargus added this to the v3.7 milestone Aug 28, 2016
@Siedlerchr
Copy link
Member

String Tokenizer ist really really legacy code. Should either be String.split or scanner
http://stackoverflow.com/questions/691184/scanner-vs-stringtokenizer-vs-string-split

@oscargus oscargus changed the title KeywordGroups totally ignoring the keyword separator Keyword separator behaviour (again, from a groups perspective) Aug 28, 2016
@oscargus
Copy link
Contributor Author

And in MedlineImporter the author decided to use ; as separator and ignore the preferences (the separator from the preferences is available in ImportFormatPreferences).

@tobiasdiez tobiasdiez added the dev: code-quality Issues related to code or architecture decisions label Sep 11, 2016
@Braunch Braunch added stupro and removed stupro labels Sep 11, 2016
@koppor koppor removed the stupro label Sep 12, 2016
@koppor
Copy link
Member

koppor commented Sep 13, 2016

Addressed in #1950

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: groups component: keywords dev: code-quality Issues related to code or architecture decisions [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs
Projects
None yet
Development

No branches or pull requests

5 participants