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 Jun 3, 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();
This snippet opens Preferences using workbench menu.
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.
JUnitView jUnitView = new JUnitView();
jUnitView.open();
//Obtain desired menu and select it.
Menu viewMenu = new ViewMenu("Show Execution Time");
viewMenu.select();