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 370 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:Load all projects from a folder.
Next Topic:Failed to find org.eclipse.rcptt.tesla.swt.workbenchProvider
Goto Forum:
  


Current Time: Thu Mar 28 17:00:09 GMT 2024

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

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

Back to the top