To avoid reconstructing the mapping

From OO Lab
Revision as of 16:13, 2 December 2011 by RyanYang (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In some programs , there are a lot of complex data structs. Suppose a complex data structure is visualized in xDIVA at first time. Finally you manage to construct a complicated mappings as follows. Although it can only take minutes, re-doing it is annoying and time consuming

Alotofmappingnode.jpg

You must connect so many mapping node to the ports you want, nobody want to repeat the action too many times. So we provide the save and load function in xDIVA. Although there is a know bug exist for some computers, follow this tutorial you can save and load the previous mapping easily.

In this example, we use the bt.java to demonstrate. You can find this file in Example/Java. You can follow the tutorial of A Binary Tree Node Example. But how to save your mapping ? When you finish connecting the mapping node and variable root.

Aftermapping.jpg

You can see the option File in the upper toolbar of mapping dialog. In File opetion , you can see there are two options in this submenu. One is Save MDS File , and another is Load MDS File.

Submenu.jpg

First , click the Save MDS File option. There will be a save dialog pop up. Default path is setted to OgreSDK/bin/debug/mds.

Oripath.jpg

But please don't save mds file in this folder for now. There still have problems with save the file here in some computer. We are currently working on it. Anyway, please change the path to DIVA/bin/release.

Changepath.jpg

Then enter the file name you want and press OK button.

Finalsave.jpg

Now , we unfold root, you can see the mapping dialog pop up. Follow the the tutorial of A Binary Tree Node Example. After mapping the attributes of root , click the File option again, and repeat the steps to save the mappings described above.

Secondsave.jpg

Here we have two saved mapping , root_test1.mds and root_test2.mds in DIVA/bin/release.

Next, we will show how to load the mds file to xDIVA when xDIVA starts up. Please open the DIVA.mds file in DIVA/bin/release/mds , and edit the path like this.

Editpath.jpg

Please restarting the DIVA and Minerva and visualize root again. You will see the visualization result on the window and no more mapping dialogs pop up. Then click the root to enjoy the example. All the mappings you made are already loaded automatically.

Result.jpg

Personal tools