project:mt:startup:tecdesc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
project:mt:startup:tecdesc [2023/04/05 13:55] – snarfbur | project:mt:startup:tecdesc [2023/05/23 14:30] (current) – snarfbur | ||
---|---|---|---|
Line 5: | Line 5: | ||
==== Clear separation between MapTool system and usage data ==== | ==== Clear separation between MapTool system and usage data ==== | ||
- | === Add argument (option) parameters === | + | See User Guide [[:project:mt: |
- | + | ||
- | * D, data-dir | + | |
- | * S, server | + | |
- | * ?, help | + | |
- | + | ||
- | Implement help output (only English). | + | |
- | + | ||
- | === User startup.properties file === | + | |
- | + | ||
- | Create & Read Preference file under MAPTOOL_DATADIR/ | + | |
- | + | ||
- | Parameter-List: | + | |
- | + | ||
- | * language | + | |
- | * country | + | |
- | * startup-server | + | |
- | * startup-campaign | + | |
- | * no-auto-update | + | |
- | * … | + | |
- | + | ||
- | Do not overwrite cmdOptions values. | + | |
- | + | ||
- | Implement language and country switch. | + | |
- | + | ||
- | Get sure that data-dir is used. | + | |
==== Option on startup to start a server ==== | ==== Option on startup to start a server ==== | ||
- | * Check, if we can use already the original | + | * Add startup |
- | * Check, what additional parameters | + | * Add startup property to define how the startup sequence should handle a auto backup file |
+ | * Find the correct place to start the server in the startup sequence (tricky, because there are already threats running) | ||
==== Refactor: UI startup frame ==== | ==== Refactor: UI startup frame ==== | ||
+ | |||
+ | === Best Solution === | ||
* Separate user from system settings, users first | * Separate user from system settings, users first | ||
Line 48: | Line 26: | ||
* Describe keys for advanced options | * Describe keys for advanced options | ||
- | **Note: | + | === Minimum Solution === |
+ | |||
+ | | ||
===== Implementation Decisions ===== | ===== Implementation Decisions ===== | ||
Line 62: | Line 42: | ||
* Let return values in the AppUtil class. | * Let return values in the AppUtil class. | ||
* Create App Properties to manage the properties for boolean and String, with (deprecated) references in the AppUtil. (Later easy to refactor in the rest of MapTool) | * Create App Properties to manage the properties for boolean and String, with (deprecated) references in the AppUtil. (Later easy to refactor in the rest of MapTool) | ||
- | * Create CmdOptionProperties and StartUpProperties | + | * Create CmdOptionProperties and StartUpProperties |
* Rearrange the startup methods (& logs), so that the properties are initialized first, second the main directories (data & logs), then the logging and at last call MapTool.main(). | * Rearrange the startup methods (& logs), so that the properties are initialized first, second the main directories (data & logs), then the logging and at last call MapTool.main(). | ||
Line 76: | Line 56: | ||
The current UserJvmOptions is therefore a mix of JVM, library and application options and should be refactored. Since it has also a lot of methods to handle the cfg file values, I would at least recommend an renaming. \\ A first closer check shows that this class is mainly used in the PreferenceDialog, | The current UserJvmOptions is therefore a mix of JVM, library and application options and should be refactored. Since it has also a lot of methods to handle the cfg file values, I would at least recommend an renaming. \\ A first closer check shows that this class is mainly used in the PreferenceDialog, | ||
- | **Note:** The definition of the DEFAULT_DATA_DIR is wrong, if the MAPTOOL_DATADIR is overwriten (in MapTool.cfg file or by cmdLineOptions) | + | ==== Refactor: UI startup frame ==== |
- | ===== Implementation Questions ===== | + | Analysis of the Option Dialog shows: |
- | ==== Log vs. MapTool.show...() ==== | + | * All in one Class: |
+ | * Swing | ||
+ | * Generated Code: Tool xxx used | ||
- | When do you want just a log and when should there be a show popup? | + | Since Swing is deprecated |
- | Examples: | + | ===== Implementation Questions ===== |
- | + | ||
- | * | + | |
- | + | ||
- | < | + | |
- | log.info(" | + | |
- | + | ||
- | + | ||
- | </ | + | |
- | * | + | |
- | < | + | |
- | + | ||
- | </ | + | |
==== Naming Conventions ==== | ==== Naming Conventions ==== | ||
Line 116: | Line 86: | ||
==== cmdOption -r -> Exception ==== | ==== cmdOption -r -> Exception ==== | ||
- | To the time the reset method is called, the ' | + | To the time the reset method is called, the ' |
==== cmdOption -w is double defined ==== | ==== cmdOption -w is double defined ==== | ||
- | |||
< | < | ||
+ | |||
cmdOptions.addOption(" | cmdOptions.addOption(" | ||
... | ... | ||
Line 137: | Line 107: | ||
</ | </ | ||
+ | |||
+ | ==== Start-Properties / JvmOptions not Shown under Windows ==== | ||
+ | |||
+ | At least since 1.12.2 the start properties are not shown in the OptionDialog under Windows. | ||
+ | |||
+ | They are also not editable under Windows, even if the file is in a editable directory. | ||
+ | |||
+ | Under Development the hole tab is not shown. That makes development for the dialog hard. | ||
===== Recommended Refactoring Issues ===== | ===== Recommended Refactoring Issues ===== | ||
Line 154: | Line 132: | ||
. | . | ||
- | ==== AppUtil.getDataDirAppClfFile() & UserJvmOptions.copyConfigFile() ==== | + | ==== AppUtil.getDataDirAppCfgFile() & UserJvmOptions.copyConfigFile() ==== |
This is a helper function to copy the original maptool.cfg from the app directory into the ' | This is a helper function to copy the original maptool.cfg from the app directory into the ' | ||
**Conclusion: | **Conclusion: | ||
- | |||
- | ===== MapTool-Sample.cfg ===== | ||
- | |||
- | The Example seems to be out of date. | ||
===== Notes ===== | ===== Notes ===== | ||
Line 171: | Line 145: | ||
Its looks like the current cfg file is not generated during the normal build and it is not accessible from IntelliJ run/debug. Does somebody know, how a cfg file can be used during development? | Its looks like the current cfg file is not generated during the normal build and it is not accessible from IntelliJ run/debug. Does somebody know, how a cfg file can be used during development? | ||
+ | |||
+ | ==== Translations Yes or No ==== | ||
+ | |||
+ | The developer team uses a pragmatic rule: If the information is useful for the user, so he can (re-)act with the information, | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | == CmdLineOption: | ||
+ | |||
+ | The description is only in English. Maybe you want to use translation encoding? \\ I use the description for the help view, so this is also only in English. | ||
+ | |||
+ | Answer: Yes | ||
+ | |||
+ | == MapTool.showError() == | ||
+ | |||
+ | Should I use a translation here? \\ MapTool.showError(" | ||
+ | |||
+ | Answer: No | ||
+ | |||
+ | ==== Log vs. MapTool.show...() ==== | ||
+ | |||
+ | Use the same rule as for translations and thing about it, if the value of the information is high enough for the user to commit it. The log is just written into the file, the dialog needs interaction! | ||
project/mt/startup/tecdesc.1680695701.txt.gz · Last modified: 2023/04/05 13:55 by snarfbur