The view menu is the dropdown shown with a triangular icon, and is currently created in the SampleView
class in the createView
method. This can be recreated in the fragment editor by adding a view menu to the part descriptor.
fragment.e4xmi
file and navigate to the Sample View part descriptor. Under that, there is a Menus element and a dropdown choice box. Select View Menu from the list and click on the Add button to add a View Menu.Action 1
Action 1 tooltip
platform:/plugin/org.eclipse.ui/icons/full/obj16/info_tsk.png
or use the Find … button as beforecreateViewMenu
from the SampleView
class, and run the application. The view menu should still be shown with a single Action 1
.The view menu used to be created with the createViewMenu
method. Instead of doing this programmatically, it can be created in the fragment, in a very similar way to the toolbar.
A tag ViewMenu
is automatically added to the View Menu in the Supplementary tab, which allows the view to be shown. This takes the same effect as setting the tag manually from the code before.
3.14.70.203