Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Urgent Help needed regarding CSS mechanism in rcp application
Urgent Help needed regarding CSS mechanism in rcp application [message #1062353] Fri, 07 June 2013 11:04 Go to next message
SD Khan is currently offline SD KhanFriend
Messages: 63
Registered: May 2013
Member
Hi all,

I have done the following steps to create an rcp application

1. Created a rcp application (3.x)

2. created extension point "org.eclipse.e4.ui.css.swt.theme" and added two themes in it and set

the respective css files for each theme.

3. Added a ViewerPreferencePage, which given the option to change theme.

Now, when i change theme , it work's fine and applied on all the swt controls which i have

specified in css file,

Now i have defined my own selector in the css file like "MySelector" and then specified it's

properties
like this

.MySelector
{
background-color:rgb(250,250,200);
}

i have debugged the code, the main class handling this is the "ThemeEngine", which reads this, one

thing for sure is that engine successfully read the whole css file including my own custom

selector, now what i want's is to get this selector and it's properties and values from the css

engine programmatically


Any idea/help/hint/clue/suggestion will be appreciated.

Regards,
SDK
Re: Urgent Help needed regarding CSS mechanism in rcp application [message #1062785 is a reply to message #1062353] Mon, 10 June 2013 17:30 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,
I am not sure, why you need this. The API only offers to retrieve the
Style for a widget. A hack possible would be to create a widget and
assign the selector as css class to it.
Cheers
Jonas

Am 07.06.2013 13:04, schrieb SD Khan:
> Hi all,
>
> I have done the following steps to create an rcp application
>
> 1. Created a rcp application (3.x)
>
> 2. created extension point "org.eclipse.e4.ui.css.swt.theme" and added
> two themes in it and set
> the respective css files for each theme.
>
> 3. Added a ViewerPreferencePage, which given the option to change theme.
>
> Now, when i change theme , it work's fine and applied on all the swt
> controls which i have
> specified in css file,
>
> Now i have defined my own selector in the css file like "MySelector" and
> then specified it's
> properties
> like this
> MySelector
> {
> background-color:rgb(250,250,200);
> }
>
> i have debugged the code, the main class handling this is the
> "ThemeEngine", which reads this, one
> thing for sure is that engine successfully read the whole css file
> including my own custom
> selector, now what i want's is to get this selector and it's properties
> and values from the css
> engine programmatically
>
> Any idea/help/hint/clue/suggestion will be appreciated.
>
> Regards,
> SDK
Previous Topic:[CSS] Changing the size of Radio Buttons and CheckButtons
Next Topic:@Optional resource not being injected
Goto Forum:
  


Current Time: Thu Mar 28 15:46:13 GMT 2024

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

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

Back to the top