{"action":"reopened","issue":{"url":"https://api.github.com/repos/dlemmermann/PreferencesFX/issues/21","repository_url":"https://api.github.com/repos/dlemmermann/PreferencesFX","labels_url":"https://api.github.com/repos/dlemmermann/PreferencesFX/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/dlemmermann/PreferencesFX/issues/21/comments","events_url":"https://api.github.com/repos/dlemmermann/PreferencesFX/issues/21/events","html_url":"https://github.com/dlemmermann/PreferencesFX/issues/21","id":336212624,"node_id":"MDU6SXNzdWUzMzYyMTI2MjQ=","number":21,"title":"Open PreferencesFX for extension","user":{"login":"aalmiray","id":13969,"node_id":"MDQ6VXNlcjEzOTY5","avatar_url":"https://avatars1.githubusercontent.com/u/13969?v=4","gravatar_id":"","url":"https://api.github.com/users/aalmiray","html_url":"https://github.com/aalmiray","followers_url":"https://api.github.com/users/aalmiray/followers","following_url":"https://api.github.com/users/aalmiray/following{/other_user}","gists_url":"https://api.github.com/users/aalmiray/gists{/gist_id}","starred_url":"https://api.github.com/users/aalmiray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aalmiray/subscriptions","organizations_url":"https://api.github.com/users/aalmiray/orgs","repos_url":"https://api.github.com/users/aalmiray/repos","events_url":"https://api.github.com/users/aalmiray/events{/privacy}","received_events_url":"https://api.github.com/users/aalmiray/received_events","type":"User","site_admin":false},"labels":[{"id":889664010,"node_id":"MDU6TGFiZWw4ODk2NjQwMTA=","url":"https://api.github.com/repos/dlemmermann/PreferencesFX/labels/question","name":"question","color":"d876e3","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-27T12:41:46Z","updated_at":"2018-09-07T20:50:00Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The current design of the `PreferencesFX` class does not provide extension points that could be used to tweak behavior (see #4 for example). It would be better perhaps to expose internal state via `protected` fields or methods, also use the template factory method in the constructor, delegating the actual creation on collaborators to protected methods, such as\r\n\r\n      protected PreferencesFx(Class<?> saveClass, Category... categories) {\r\n        // asciidoctor Documentation - tag::testMock[]\r\n        preferencesFxModel = createPreferencesFxModel(\r\n            createStorageHandler(saveClass), createSearchHandler(), createHistory(), categories\r\n        );\r\n        // asciidoctor Documentation - end::testMock[]\r\n\r\n        // setting values are only loaded if they are present already\r\n        preferencesFxModel.loadSettingValues();\r\n\r\n        undoRedoBox = createUndoRedoBox(preferencesFxModel.getHistory());\r\n\r\n        breadCrumbView = createBreadCrumbView(preferencesFxModel, undoRedoBox);\r\n        breadCrumbPresenter = createBreadCrumbPresenter(preferencesFxModel, breadCrumbView);\r\n\r\n        categoryController = createCategoryController();\r\n        initializeCategoryViews();\r\n        // display initial category\r\n        categoryController.setView(preferencesFxModel.getDisplayedCategory());\r\n\r\n        navigationView = createNavigationView(preferencesFxModel);\r\n        navigationPresenter = createNavigationPresenter(preferencesFxModel, navigationView);\r\n\r\n        preferencesFxView = createPreferencesFxView(\r\n            preferencesFxModel, navigationView, breadCrumbView, categoryController\r\n        );\r\n        preferencesFxPresenter = createPreferencesFxPresenter(preferencesFxModel, preferencesFxView);\r\n    }"}}
{"actor":{"display_login":"martinfrancois"}}