{"action":"closed","issue":{"url":"https://api.github.com/repos/JabRef/jabref/issues/1408","repository_url":"https://api.github.com/repos/JabRef/jabref","labels_url":"https://api.github.com/repos/JabRef/jabref/issues/1408/labels{/name}","comments_url":"https://api.github.com/repos/JabRef/jabref/issues/1408/comments","events_url":"https://api.github.com/repos/JabRef/jabref/issues/1408/events","html_url":"https://github.com/JabRef/jabref/issues/1408","id":155527326,"number":1408,"title":"Positioning of variables in GUIGlobals","user":{"login":"lenhard","id":1515701,"avatar_url":"https://avatars.githubusercontent.com/u/1515701?v=3","gravatar_id":"","url":"https://api.github.com/users/lenhard","html_url":"https://github.com/lenhard","followers_url":"https://api.github.com/users/lenhard/followers","following_url":"https://api.github.com/users/lenhard/following{/other_user}","gists_url":"https://api.github.com/users/lenhard/gists{/gist_id}","starred_url":"https://api.github.com/users/lenhard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenhard/subscriptions","organizations_url":"https://api.github.com/users/lenhard/orgs","repos_url":"https://api.github.com/users/lenhard/repos","events_url":"https://api.github.com/users/lenhard/events{/privacy}","received_events_url":"https://api.github.com/users/lenhard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JabRef/jabref/labels/architecture","name":"architecture","color":"0e8a16"},{"url":"https://api.github.com/repos/JabRef/jabref/labels/code","name":"code","color":"fef2c0"},{"url":"https://api.github.com/repos/JabRef/jabref/labels/enhancement","name":"enhancement","color":"6AC46A"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-05-18T15:11:30Z","updated_at":"2016-05-25T06:45:20Z","closed_at":"2016-05-25T06:45:20Z","body":"I am currently doing some architecture analysis of JabRef and stumbled into some part of the code that I'd like to discuss. \r\n\r\nWe have the infamous class `GUIGlobals` in which several settings are hard-coded as public static instance variables. I noticed that some of these variables are only used in a single other class, thereby creating a dependency of that class to the gui package (which is very ugly). Example: The class `LatexFieldFormatter` is the only user of `GUIGlobals.LINE_LENGTH`, which prohibits the moval of `LatexFieldFormatter` into the `bibtex` package and makes that package transitively dependent of the `gui` package. Ultimately, if we fix this class and this dependency we can make the `bibtex` package completely self-contained and move it into logic. \r\n\r\nSeveral other variables in `GUIGlobals` are just used in a single other class. Therefore, I propose to move the variables closer to the scope of their usage where possible. This destroys `GUIGlobals` as a single point of configuration, but also improves our package dependencies. @JabRef/developers Are there objections to this?"}}
{"actor":{"display_login":"lenhard"}}