[[BackLinksMenu]] = Analysis = == Overview == File dialog kinds are open book, save book, insert image, insert media and book properties dialog. This task is to to revise what is done until now and modularize it. == Task requirements == * review the current source code written for file dialogs * separate them in new module * provide extensions to the base.dialogs extension point * if there is time left write tests and run the current tests == Task result == * module with file dialogs and their source code == Implementation idea == * write dependancies for the new created module == Related == [wiki:BASE_DIALOGS_R0] == How to demo == * Show the new module, the source code and run some tests if there is any. * Show the file dialogs. = Design = * File related things need to be extracted in a separate module. They are dependent on Views. Views are the most dependent part of the application. So view (app, book etc...) , layout, halos, hud, logics, boundcontrols, dialogs, menus utils and other things in messy should be separated in a module. * !FileMenu and !MenuItems in it should be extracted in a module, dependent on latter. * It should provide extensions for the View, in order to be loaded as a plugin. * The module => org.sophie2.main.menus.file should contain: * !FileMenu, !MenuItems in the !FileMenu. * Dialogs are impossible to be separated from the view module and put in the File module since: * Logics invoke Dialgos * Logics and View are tightly connected - the correlation between Logics and View is two-directional. * File things should be dependent on View and NOT vice versa. * So if Dialogs are in the File module but the Logics are in the View module, invoking Dialogs from the Logics will need a dependency which is NOT appropriate. * Extension point for the !FileMenu in the !AppView will be added. * !FileMenu will be an extension created by a !FileMenuProvider. * !FileMenu will have an extension point for the !MenuItems * !MenuItems will be extension of the !FileMenu. * !MenuItemProviders should be implemented. Note: '''Things that can be done now - because it has consumed the effort up to now''' * Divide the Dialogs from their Input. * Provide a module containing only Inputs. * The org.sophie2.main.view will depend on the !DialogManager and the input module to invoke dialogs (they are invoked by the Logics in the view). * The dialogs will be separated in a module. * The view will be dependent on the dialogs module. * The dialogs module will be dependent on the input and the base.dialogs module. * Better idea for the file module is not to be a separate module BUT a package named 'file' in the org.sophie2.main.menus module. * This way all basic menus will be put in the module. * Menus will be dependent on the View and will be separated from it. Here is dependancy schema: [[Image(source:/trunk/sophie2-platform/modules/org.sophie2.func.file/doc/APP_FILE_DIALOGS_R0_dependencies.png)]] If '''done''' the things above will help later for the basic menus and other dialog, menus things in other revisions. Provide a clear diagram of what depends on what because things are getting complicated. = Implementation = Implemented according to the dependency diagram: * Created new modules org.sophie2.func.file and org.sophie2.main.dialogs.input * Moved FileDialog to the func.file module * Extracted all inner static Input classes form main.view.dialogs to main.dialogs.input module * Refactored the code according to the new dependencies and changes * BookPropertiesDialog will be left for the next revision: * It depends on books and book resources that will be changed in the [wiki:BASE_RESOURCE_COMMONS_R0] task. * It will lead to massive refactoring - there is no time for that at the current revision Here are the changes: [changeset:BASE_RESOURCE_COMMONS_R0] (accidentaly commited from pap's account instead of boyan's. = Testing = == User documentation == [wiki:ITERATION_04/Release/UserDocumentation/02_WorkingWithSophie/04_TheMenuBars] == Release documentation == (dialogues appear when commands are run by the author.) == Manual tests == 510 === Main tests === [http://sophie2.org/testlink/index.php Testlink test ids:] 510 === Related tests === [http://sophie2.org/testlink/index.php Testlink test ids:] (none so far) == Reported bugs == (none so far) = Comments = This test will have to change as more dialogues are added to Sophie. = Log = [[Include(wiki:APP_FILE_DIALOGS_R0_LOG)]]