ImageDataCollector / ScreenScrapinghttps://www.eclipse.org/forums/index.php/mv/msg/42885/139420/#msg_139420
I would like to use VE ability to make a screenshot of a SWT composite
in my GMF Editor. When I looked at the implementation I noticed it is
very platform specific.

Basically I just need following method of
org.eclipse.ve.internal.swt.targetvm.ImageCapture:

even easier, "Image getImage(Control)" without children would be sufficient.

I found the OS branching stuff in
org.eclipse.ve.internal.swt.ImageDataCollector
looking like:
if (Platform.OS_WIN32.equals(Platform.getOS()))
dataCollectorType =
(...)("org.eclipse.ve.internal.swt.targetvm.win32.ImageCapture ");
else if (Platform.WS_GTK.equals(Platform.getWS())){
....

Is it a good approach to implement the branching stuff and copy the
three classes to make it work? (these classes are not exported in VE). I
also noticed that these classes are 2+ years old, is there already a
replacement?

> I found the OS branching stuff in
> org.eclipse.ve.internal.swt.ImageDataCollector
> looking like:
> if (Platform.OS_WIN32.equals(Platform.getOS()))
> dataCollectorType =
> (...)("org.eclipse.ve.internal.swt.targetvm.win32.ImageCapture ");
> else if (Platform.WS_GTK.equals(Platform.getWS())){
> ...
>
> Is it a good approach to implement the branching stuff and copy the
> three classes to make it work? (these classes are not exported in VE). I
> also noticed that these classes are 2+ years old, is there already a
> replacement?
The code is 2 years old, but works. If that is what you need, copying and
branching is fine.
I would suggest that if you project is not open source you keep that
branched code in a separate bundle, so that you can release the forked
sources as per the EPL.

> I found the OS branching stuff in
> org.eclipse.ve.internal.swt.ImageDataCollector
> looking like:
> if (Platform.OS_WIN32.equals(Platform.getOS()))
> dataCollectorType =
> (...)("org.eclipse.ve.internal.swt.targetvm.win32.ImageCapture ");
> else if (Platform.WS_GTK.equals(Platform.getWS())){
> ...
>
> Is it a good approach to implement the branching stuff and copy the
> three classes to make it work? (these classes are not exported in VE). I
> also noticed that these classes are 2+ years old, is there already a
> replacement?
The code is 2 years old, but works. If that is what you need, copying and
branching is fine.
I would suggest that if you project is not open source you keep that
branched code in a separate bundle, so that you can release the forked
sources as per the EPL.

> Is it possible to do it this way? How would you suggest realizing it?
>
> thanks & regards
> stefan]]>Philippe Ombredanne2007-09-13T16:16:41-00:00Re: ImageDataCollector / ScreenScrapinghttps://www.eclipse.org/forums/index.php/mv/msg/42885/616542/#msg_616542

This requires that Shell with GUI is visible on screen, so it will
flash and annoy user.]]>Konstantin Scheglov2007-09-13T17:39:05-00:00Re: ImageDataCollector / ScreenScrapinghttps://www.eclipse.org/forums/index.php/mv/msg/42885/140462/#msg_140462

Solution in VE is good enough.
Yes, it is platform specific, but there are no other way.]]>Konstantin Scheglov2007-09-14T03:13:15-00:00Re: ImageDataCollector / ScreenScrapinghttps://www.eclipse.org/forums/index.php/mv/msg/42885/140504/#msg_140504

Konstantin:
Would you know of a better solution than good enough?
Are ether flaws in the current one?
What could be improved?
(from googling your name you seem to know more than a thing or two on the
topic of visual editing, your help would matter a lot if you care for VE)
:-P]]>Philippe Ombredanne2007-09-14T15:25:04-00:00Re: ImageDataCollector / ScreenScrapinghttps://www.eclipse.org/forums/index.php/mv/msg/42885/140568/#msg_140568
>> Solution in VE is good enough.
>> Yes, it is platform specific, but there are no other way.
>
> Konstantin:
> Would you know of a better solution than good enough?
> Are ether flaws in the current one?
> What could be improved?

I have not looked in VE screen shot making precisely. I just know
that they use native code and it is known that ther are no other good
way. For Win32 you can use OS.SendMessage(), for Linux and Mac native
code is unavoidable.

> (from googling your name you seem to know more than a thing or two on the
> topic of visual editing, your help would matter a lot if you care for VE)

:-)

In reallity screen shot making is the simplest part of WYSIWYG GUI
editor.]]>Konstantin Scheglov2007-09-14T16:57:13-00:00Re: ImageDataCollector / ScreenScrapinghttps://www.eclipse.org/forums/index.php/mv/msg/42885/616558/#msg_616558
>> Solution in VE is good enough.
>> Yes, it is platform specific, but there are no other way.
>
> Konstantin:
> Would you know of a better solution than good enough?
> Are ether flaws in the current one?
> What could be improved?

I have not looked in VE screen shot making precisely. I just know
that they use native code and it is known that ther are no other good
way. For Win32 you can use OS.SendMessage(), for Linux and Mac native
code is unavoidable.

> (from googling your name you seem to know more than a thing or two on the
> topic of visual editing, your help would matter a lot if you care for VE)

:-)

In reallity screen shot making is the simplest part of WYSIWYG GUI
editor.]]>Konstantin Scheglov2007-09-14T16:57:13-00:00Contributing to VE [wa Re: ImageDataCollector / ScreenScraping]https://www.eclipse.org/forums/index.php/mv/msg/42885/140574/#msg_140574
kscheglov@gmail.com> wrote in message
news:fceehg$dot$1@build.eclipse.org...
> > (from googling your name you seem to know more than a thing or two on
the
> > topic of visual editing, your help would matter a lot if you care for
VE)
>
> :-)
>
> In reallity screen shot making is the simplest part of WYSIWYG GUI
> editor.
agreed, is there an area of interest wher you think you could help?]]>Philippe Ombredanne2007-09-15T05:44:13-00:00Contributing to VE [wa Re: ImageDataCollector / ScreenScraping]https://www.eclipse.org/forums/index.php/mv/msg/42885/616559/#msg_616559
kscheglov@gmail.com> wrote in message
news:fceehg$dot$1@build.eclipse.org...
> > (from googling your name you seem to know more than a thing or two on
the
> > topic of visual editing, your help would matter a lot if you care for
VE)
>
> :-)
>
> In reallity screen shot making is the simplest part of WYSIWYG GUI
> editor.
agreed, is there an area of interest wher you think you could help?]]>Philippe Ombredanne2007-09-15T05:44:13-00:00