|
Re: Unable to access context menus in sub classes of an Xviewer tree [message #1693391 is a reply to message #1692601] |
Thu, 23 April 2015 17:38   |
Eclipse User |
|
|
|
The problem is that regardless of what functions I call, the context menu that gets called is only the one created by the top level "DEALERDB".
For example, both top level and lower level contain "Import COBOL or PL/I Data Structures" in their menus, which works when I call them however it only opens the wizard from the "DEALERDB" level (which I can check in the settings of the wizard)
If I attempt to call any other menu item that is not in the DEALERDB but is in the ORDER row, such as "Add or Edit Fields", it gives me a widget not found error
This is a sample of the code I have been trying to test
Each of these lines gives Widget not found error however if I change the contextMenu parameter to any menu located in the "DEALERDB" it works with no errors
tree = bot.tree(2);
SWTBotTreeItem[] dbdtrees = tree.getAllItems();
SWTBotTreeItem[] segtrees = dbdtrees[0].getItems();
tree.expandNode(dbdName);
// Trial one, getting the Node for Order and clicking the item in the context menu - Same error as explained above
dbdtrees[0].getNode("ORDER").contextMenu("Add or Edit Fields").click();
// Trial two, selecting the segment and clicking the item in the context menu - Same error as explained above
tree.select(segName).contextMenu("Add or Edit Fields").click();
// Trial three, getting list of segments and selecting or expanding them - Same error as explained above
segtrees[0].select().expand().contextMenu("Add or Edit Fields").click();
// All of these work the same as the following, which doesnt contain "Add or Edit Fields" but does contain "Import COBOL ... " which works
tree.expandNode(dbdName).contextMenu("Add or Edit Fields").click();
[Updated on: Tue, 26 May 2015 18:13] by Moderator Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03781 seconds