-
Notifications
You must be signed in to change notification settings - Fork 38
Inline Help
Revised : 10 Feb 2019
Currently, mars-sim has a set of inline help pages to assist players to know the specifications of all processes and the available vehicle type during the simulation.
As developers, we may have to change the specs and update these html help files in the codebase from time to time.
When we compile mars-sim into binaries, it will grab these html pages and place them in the /resources folder.
Below are the steps for maintaining these html files up-to-date :
Use the command line argument -html for generating new html help files.
Alternatively, run the eclipse launcher MarsProject -html.launch
in Eclipse IDE to do the same.
In Windows OS, the html help files are kept inside the '/src' folder hierarchy is \mars-sim\mars-sim-ui\src\main\resources\docs\help\[$DIR]
e.g. D:\[$HOME]\git\mars-sim\mars-sim-ui\src\main\resources\docs\help\[$DIR]
However, after running "MarsProjectFX -html.launch" in Eclipse, the newly generated htmls will be
saved at the '/target' folder hierarchy instead of the '/src' folder is at \mars-sim-ui\target\classes\docs\help\[$DIR]
e.g. D:\Data\git\mars-sim\mars-sim-ui\target\classes\docs\help\[$DIR]
Note : the newly generated html files are located within the mars-sim-ui's 'target' folder and NOT the mars-sim-ui's 'src' folder.
As a result, you will need to "manually" copy the newly generated htmls from the \target\[$DIR]
to the \src\[$DIR]
before committing the changes.
A total of 652 newly generated htmls using this HelpGenerator class can be broken into the followings :
food_production*.html
process*.html
part*.html
resource*.html
$[vehicle_type].html
They are stored inside their respective directory [$DIR] as follows :
/food
/processes
/parts
/resources
/vehicles
Note: the base directory /help
contains other important html pages such as the tutorial pages. They do not
need to be overwritten in this juncture unless you edited them.
If the old htmls are mixed in with the newly generated htmls, there will be orphan html files that are not hyperlinked with other html files.
In order to have a totally clean set of htmls, it is recommended that one should delete the old set of
htmls (1-5 above) in the \src\[$DIR]
right before copying the new set of htmls from the \target\[$DIR]
.
There may be a time delay and refresh issue with Eclipse, if you use the Windows Explorer outside of Eclipse IDE to manually delete the old html pages and then copy over the new html files.
Afterward, make sure you "refresh" the Project Explorer in Eclipse so that it will intelligently compare which particular html files have been changed/updated and which ones stay the same. Eclipse will compare the new ones against the local copies. In this manner, during "Git Staging", Eclipse will properly tag and post only the html files that need to be updated in the mars-sim codebase.
e.g. you delete all 652 old html files in [$DIR] and copy over the new 652 html files. After you refresh the related folder in Eclipse, it would intelligently detect that only 30 html files (out of 652 files) need to be updated in the codebase during "Git Staging".