This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Menu
Radim Hopp edited this page Apr 29, 2015
·
14 revisions
- Menu / AbstractMenu
- ContextMenu
- ShellMenu
- ToolItemMenu
- ViewMenu
Open context menu Open in New Window
Menu contextMenu = new ContextMenu("Open in New Window");
contextMenu.select();
Open shell (or workbench) menu Window -> Preferences
Menu shellMenu = new ShellMenu("Window", "Preferences");
shellMenu.select();
Each MenuItem can have its drop-down menu, which in RedDeer can be accessed through ToolItemMenu.
Trigger Toolbar Search -> File Search
//Obtain Search ToolItem.
ToolItem searchToolItem = new DefaultToolItem(new WorkbenchShell(), "Search");
//Obtain its menu.
Menu toolItemMenu = new ToolItemMenu("File Search");
toolItemMenu.select();
Each View in Eclipse can have its own menu. This is accessible through triangle near minimize/maximize buttons as it is shown in this picture:
To access this menu in RedDeer, one has to use ViewMenu class. Set Working sets as top element in Project Explorer
//Make sure project explorer is open and active.
ProjectExplorer pExplorer = new ProjectExplorer();
pExplorer.open();
//Obtain desired menu and select it.
Menu viewMenu = new ViewMenu("Top Level Elements", "Working Sets");
viewMenu.select();