Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » How accessing to context Menu of a SWTBotGefEditPart
How accessing to context Menu of a SWTBotGefEditPart [message #802733] Mon, 20 February 2012 11:23 Go to next message
empiret empiret is currently offline empiret empiret
Messages: 3
Registered: February 2012
Junior Member
Hello,

In my SWTBotGefEditor, I have many SWTBotGefEditPart.
If I right-click on one of them, I get a context menu. The menu contains "Delete", "Properties"....fonctions.
How can I access to the context menu of a SWTBotGefEditPart, so as I can click on "Delete" fonction for example?

Thank you for your help.
Re: How accessing to context Menu of a SWTBotGefEditPart [message #821333 is a reply to message #802733] Thu, 15 March 2012 08:01 Go to previous message
benhu Missing name is currently offline benhu Missing name
Messages: 14
Registered: October 2010
Junior Member

Hi,

Try the follow code:

FigureCanvas canvas = (FigureCanvas)
(gefBot.gefEditor("xxx").rootEditPart().part().getViewer().getControl());
SWTBotGefFigureCanvas gefCanvas = new SWTBotGefFigureCanvas(canvas);
assertTrue(gefCanvas.contextMenu("xxx").isEnabled());

Hope this can help you.
Previous Topic:Drag&Drop SWTBotTreeItem to SWTBotGefEditor
Next Topic:Problem executing SWTbot+Junit4 test
Goto Forum:
  


Current Time: Wed Oct 01 20:26:11 GMT 2014

Powered by FUDForum. Page generated in 0.02280 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software