===== Navigators =====
Navigators parts are layout in the rigth panel of the application.
\\ \\ You may have several navigators and, in one navigator, nodes may come from different plugins.
=== Step 1: Add a 'Tree Navigator' scenario ===
* Open **Scenario.xml** file with Scenario Editor.
* Select Generation page.
* Right-click on GenerationScenario line and select add 'Navigator' generation unit item.
{{ navigator_add_to_scenario.png?300 | Add 'Navigator' item to scenario file}}
\\ \\
In the outline page:
* Enter org.adichatz.scenario.impl.TreeNavigatorScenario to scenarioName field.
* Enter adi://myproject/treeNavigator/TreeNavigatorContent to adiResourceURI field.
{{ navigator_define_tree.png?400 | Add 'Navigator' item to scenario file}}
\\ \\
In the Scenartio Editor:
* {{img_save.png | Generate scenario}} Select Save at top of editor.
* Check Generation unit: TreeNavigatorContent - NAVIGATOR row.
* {{img_generate_scenario.png| Generate scenario}} Select Generate scenario at top right of the editor.
{{ navigator_generate.png?400 | Add 'Navigator' item to scenario file}}
\\ \\
=== Step 2: Check navigator is added in 'AdichatzRcpConfig.xml' file ===
**Remark**:\\
Lines 16, 17, 18 and 20 are added. It defines a new Navigator built from a TreeNavigatorScenario scenario.
\\ \\
=== Step 3: Execute application ===
No change id visible if you launch directly application. In fact, parts layout is read from '**${WORKSPACE]/runtime-myproject.product/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi**' file.\\
To get around this problem:
* Select Run / Run Configuration... in IDE menu.
* Check Clear.
* Run Application.
{{run_configuration_clear.png | Clear workapse before launching application}}
\\ \\
{{navigators.png |Navigators}}
In this case, you have 2 navigators: 'Navigator' and 'Tree explorer'.
\\ \\
Menus can also be added programmatically to navigators as shown in methods org.adichatz.tool.ToolActivator.start(BundleContext) or org.adichatz.testing.TestingActivator.start(BundleContext).