Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT "/dev/null" driver?(An SWT "implementation" that is "headless")
SWT "/dev/null" driver? [message #1114883] Mon, 23 September 2013 10:57 Go to next message
Alexandros Karypidis is currently offline Alexandros Karypidis
Messages: 59
Registered: March 2010
Member
Hi all,

I was wondering if there exist some sort of "/dev/null" driver for SWT. What I have in mind is a build that links to a library which (instead of calling into GTK, or Cocoa, or whatever actual window system) builds state but "renders nothing". In other words, an in-memory tree of widgets (window, menus, tables, etc) is created with an empty event queue, but nothing really gets drawn on the screen?

I was hoping I would be able to use SWTbot in an actual headless mode (as in running the tests on a Linux which does not even have an X server installed, not just launching the tests from an automated script e.g. using Ant).

I'm not sure if this is even feasible, but I can't seem to find anything like it. I'm wondering if this is an inherently meaningless idea.

I understand that this beats the whole point of actually rendering the GUI for testing, but my actual use case is to be able to run code against the SWT API without an actual display. I can provide more info, but it's just a sad story of some badly designed code that mixes the data model with the view. Imagine having a Table widget which gets populated by some code that does some complex processing of external input (network or file) and needing to get fetch the text placed in each cell to use it in another calculation (without actually displaying anything, or even having an X server running).
Re: SWT "/dev/null" driver? [message #1122402 is a reply to message #1114883] Tue, 01 October 2013 14:30 Go to previous message
Grant Gayed is currently offline Grant Gayed
Messages: 2151
Registered: July 2009
Senior Member
Hi,

SWT's API and non-visual parts are for the most part living within each
of the toolkit implementations, there isn't a separation between these
and the toolkit-specific parts like there is in AWT ("peers"). So SWT
is not structured/able to do what you're asking.

Grant


On 9/23/2013 6:57 AM, Alex Mising name wrote:
> Hi all,
>
> I was wondering if there exist some sort of "/dev/null" driver for SWT.
> What I have in mind is a build that links to a library which (instead of
> calling into GTK, or Cocoa, or whatever actual window system) builds
> state but "renders nothing". In other words, an in-memory tree of
> widgets (window, menus, tables, etc) is created with an empty event
> queue, but nothing really gets drawn on the screen?
>
> I was hoping I would be able to use SWTbot in an actual headless mode
> (as in running the tests on a Linux which does not even have an X server
> installed, not just launching the tests from an automated script e.g.
> using Ant).
>
> I'm not sure if this is even feasible, but I can't seem to find anything
> like it. I'm wondering if this is an inherently meaningless idea.
>
> I understand that this beats the whole point of actually rendering the
> GUI for testing, but my actual use case is to be able to run code
> against the SWT API without an actual display. I can provide more info,
> but it's just a sad story of some badly designed code that mixes the
> data model with the view. Imagine having a Table widget which gets
> populated by some code that does some complex processing of external
> input (network or file) and needing to get fetch the text placed in each
> cell to use it in another calculation (without actually displaying
> anything, or even having an X server running).
>
Previous Topic:CheckboxTableViewer with more than 2 columns?
Next Topic:Flickering panels in SWT_AWT bridge solved!
Goto Forum:
  


Current Time: Tue Sep 16 07:30:21 GMT 2014

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

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