Yes, I think this explains my problem. Code was working fine when the editor a StyledText editor. When the editor was changed to plain Text because it didn't need the StyledText features my tests broke.
Thanks - Bob -----Original Message----- From: Ketan Padegaonkar [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2008 4:43 AM To: swtbot-users@lists.sourceforge.net Subject: Re: [SWTBot-users] RCP testing question On 06-Oct-08, at 12:37 PM, Vincent Mahe wrote: > I encounter a similar problem when I try to catch an EMF model > editor with bot.activeEditor() or bot.editor(fileName). > > It is because SWTBotEclipseEditor encapsulate a StyledText editor, > which is a specialized subclass of IEditorReference. > The SWTBotEclipseEditor should be maintain generic and a specialized > SWTBotEclipseTextEditor should contain StyledText specific code. I guess so, most of the eclipse infrastructure was put together without much thought to see if things are even possible. The editor needs to support the following at least: 1. Multi page editors (possible combinations of forms and editors) 2. regular editors 3. GEF editors 4. Pure form editors (like the emf editor you point out) This part of the code could definitely use some love. David Green has filed a patch for GEF as well (http://swtbot.org/bugzilla/show_bug.cgi?id=113 ), I haven't looked at the patch for some time now, as I was traveling and may not have time to look at it for the next few weeks. > I will propose a patch for this soon (but it constitutes a non > trivial change in SWTBot API). Since you're interested in this, I'd recommend looking at the 1.5 port svn branch. The finder API is completely de-coupled from the widgets, which makes a cleaner design. The existing widgets are self-finding which makes for really bad code, since most users want to find widgets based on a lot of criteria, which gets pushed into base classes which have become bloated. The patch will definitely not be trivial since the SWTBotEclipseEditor implementation is really ugly code. I'd be nice if while doing this work we could clean up the eclipse bit of things, and things will be much cleaner with the port available in the branch. Lets keep the discussion going about cleaning this up. I've created a bug (http://swtbot.org/bugzilla/show_bug.cgi?id=118) for discussing this change. -- Ketan ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ SWTBot-users mailing list SWTBot-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/swtbot-users http://swtbot.org/ - a functional testing tool for SWT/Eclipse ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ SWTBot-users mailing list SWTBot-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/swtbot-users http://swtbot.org/ - a functional testing tool for SWT/Eclipse