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

Moved a few more initialization to GUIGlobals.init() #1756

Merged
merged 1 commit into from
Aug 18, 2016

Conversation

oscargus
Copy link
Contributor

No point in having a static initializer when there is an init method that is called at startup or a single line just after the init method call.

  • Manually tested changed features in running JabRef
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

@oscargus oscargus added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers type: code-quality Issues related to code or architecture decisions labels Aug 16, 2016
@stefan-kolb
Copy link
Member

The difference is that the static initializer is called every time the class is first used. If you put it into the init method you must be sure that this method is called explicitely every time. Also, if you move it to the init method better put it at the very beginning of the method to prevent any side effects of calling it later than on class startup.

@oscargus
Copy link
Contributor Author

Since init() is called before any GUI is initialized at all (as far as I can tell), and definitely before any entry editors are initialized (the static method updated the colors for them), it should be safe.

@koppor koppor merged commit 8bbe7db into master Aug 18, 2016
@koppor koppor deleted the minorguiglobalschange branch August 18, 2016 08:32
Siedlerchr added a commit to Siedlerchr/jabref that referenced this pull request Aug 18, 2016
* master:
  Fix imports
  Rename NewFileDialog -> FileDialog
  Also cancel duplicate finder workflow on close button
  Removed/moved preferences which are constants
  implements JabRef#1767: Add Help Button to access new help page
  Fixed BibTeXMLImporter
  Set more default file filters in dialogs JabRef#1763
  Resolve crossrefs and strings in main table (JabRef#1644)
  Rewrite bibtexml importer with JAXB parser (JabRef#1666)
  Moved a few more initialization to GUIGlobals.init() (JabRef#1756)
  Added program to generate a table of all characters and fixed some characters (JabRef#1766)
  Improve focus of the maintable after a sidepane gets closed (JabRef#1741)
  Table row height adjusts on Windows as the font scales with the menu (JabRef#1623)
  Added more characters to converters (JabRef#1761)
ayanai1 pushed a commit to ayanai1/jabref that referenced this pull request Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers type: code-quality Issues related to code or architecture decisions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants