Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » get Background color and Foreground color
get Background color and Foreground color [message #1790770] Sat, 16 June 2018 04:09 Go to next message
Hoang Nguyen is currently offline Hoang NguyenFriend
Messages: 2
Registered: June 2018
Junior Member
Hi guys,

In this below picture, i want to verify that line 103-105 will be not built (codes in gray color area)
index.php/fa/33137/0/

So, I try to get Background color/Foreground color by using:
 get-text-viewer | get-property backgroundColor | equals "#808080"

 get-text-viewer | get-property foregroundColor | equals "#808080"

But, it's failed (cannot get color and verify it)

Could you teach me how to I get background color / foreground color and verify color value?

Thanks.
  • Attachment: Untitled.png
    (Size: 11.69KB, Downloaded 105 times)
Re: get Background color and Foreground color [message #1791327 is a reply to message #1790770] Thu, 28 June 2018 07:23 Go to previous messageGo to next message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
Hi Hoang,

Seems it is not possible with pure ECL. Line bg color may be set with StyledText#addLineBackgroundListener(). In this case it isn't stored in any field, so it cannot be accessible via assertion.

Maybe you can achieve this by writing custom ecl command that gets bg color with aspects.
Re: get Background color and Foreground color [message #1791338 is a reply to message #1791327] Thu, 28 June 2018 08:36 Go to previous message
Hoang Nguyen is currently offline Hoang NguyenFriend
Messages: 2
Registered: June 2018
Junior Member
Viktoria Dlugopolskaya wrote on Thu, 28 June 2018 07:23
Hi Hoang,

Seems it is not possible with pure ECL. Line bg color may be set with StyledText#addLineBackgroundListener(). In this case it isn't stored in any field, so it cannot be accessible via assertion.

Maybe you can achieve this by writing custom ecl command that gets bg color with aspects.


Thank you for information ^^ I'll try to create my own ECL command.
Previous Topic:Can't create Run Configuration for testing RAP application
Next Topic:Failed to find org.eclipse.rcptt.tesla.swt.workbenchProvider
Goto Forum:
  


Current Time: Wed Sep 19 02:47:46 GMT 2018

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

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

Back to the top