Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » SWTBot for sirius properties
SWTBot for sirius properties [message #1806023] Tue, 30 April 2019 16:20 Go to next message
Yilong Yang is currently offline Yilong YangFriend
Messages: 4
Registered: July 2014
Junior Member
I refer the testing topic about Sirius properties https://www.eclipse.org/forums/index.php/t/1097616/

However, I have no idea about how to get the object of current EEFTabbedPropertySheetPage?

In addition, when I use SWTBotSiriusHelper.selectPropertyTabItem(String widget) to get a page of myself designed properties, that will result a exception about widget can not be found.

Any clue? Many thanks!
Re: SWTBot for sirius properties [message #1806449 is a reply to message #1806023] Thu, 09 May 2019 09:16 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Hi,

Yilong Yang wrote on Tue, 30 April 2019 18:20
I refer the testing topic about Sirius properties https://www.eclipse.org/forums/index.php/t/1097616/

However, I have no idea about how to get the object of current EEFTabbedPropertySheetPage?


Something like this (extracted from org.eclipse.gmf.runtime.common.ui.util.PropertySheetUtil.getCurrentPropertySheetPage()) should get you the initial reference. If the returned IPage is an EEFTabbedPropertySheetPage, you can then follow the chain described in the other thread.

	private static IPage getCurrentPropertySheetPage() {
		
		IWorkbenchWindow window =
			PlatformUI.getWorkbench().getActiveWorkbenchWindow();

		if (window != null) {
			IWorkbenchPage page = window.getActivePage();

			if (page != null) {
				IViewPart view = page.findView(PROPERTY_VIEW_ID);

				if (view != null) {

					if (view instanceof PropertySheet) {
						return ((PropertySheet) view).getCurrentPage();
					}
				}
			}
		}
		return null;
	}


Quote:

In addition, when I use SWTBotSiriusHelper.selectPropertyTabItem(String widget) to get a page of myself designed properties, that will result a exception about widget can not be found.


The SWTBotSiriusHelper class dates from before we added the EEF-based property sheets in Sirius, so that code is actually for testing property sheets based on org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage. It can not be used for EEF-based property sheets. The only way to test those is as described on the thread you referenced.

Regards,
Pierre-Charles


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Error saving diagram (error detecting the change *)
Next Topic:Edge creation tool and display issue
Goto Forum:
  


Current Time: Fri Apr 26 09:08:44 GMT 2024

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

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

Back to the top