Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 298081 - [CSS] IPropertyDescriptor interface for reset styles and CSS Editor
Summary: [CSS] IPropertyDescriptor interface for reset styles and CSS Editor
Status: RESOLVED WORKSFORME
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Bogdan Gheorghe CLA
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks: 321050
  Show dependency tree
 
Reported: 2009-12-17 10:00 EST by Angelo ZERR CLA
Modified: 2019-06-05 07:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Angelo ZERR CLA 2009-12-17 10:00:46 EST
I think it shoud be cool to create an interface IPropertyDescriptor like EMF.Edit org.eclipse.emf.edit.provider.IItemPropertyDescriptor interface.

This interface could be have several methods like : 

public interface IPropertyDescriptor
{

    String[] getSupportedPropertiesName();

    Object getPropertyValue(String propertyName);

    boolean isPropertySet(String propertyName);

    boolean canSetProperty(String propertyName);

    void resetPropertyValue(String propertyName);

    void setPropertyValue(String propertyName, String propertyValue);

}

After SWTElement can implement this interface to manage several things : 

1. SWTElement#getSupportedPropertiesName() returns the CSS properties name supported by the SWT widget wrapped. Ex : for SWT Text, this method returns ["background-color", "color"....]. This inofmration can be used :

1.1. by CSS engine to reset only the properties supported by the widget (today the whole properties are iterate to rested each properties for each widgets)

1.2 by a CSS editor (like WTP) to provide into Eclipse View Properties the CSS properties supported when we write Text {...}. Autocompletion could use this information too.

2. SWTElement#setPropertyValue(String propertyName, String propertyValue) to set CSS property. Ex : SWTElement.setPropertyValue("color", "red");

3. SWTElement#getPropertyValue(String propertyName) to get CSS property. Ex : SWTElement.getPropertyValue("color") returns "red"

4. SWTElement#isPropertySet(String propertyName) to know if the CSS property was setted. This method can be usefull to know if the property must be restede or not.

5. SWTElement#resetPropertyValue(String propertyName) reset a CSS property. This method can be used when CSS engine is reseted (for instance to load new CSS styles) or when dynamic styles (ex : Text:focus) must be applyed.

Regards Angelo
Comment 1 Eclipse Genie CLA 2018-12-22 17:54:03 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Lars Vogel CLA 2019-06-05 07:35:50 EDT
This is a mass change to close all e4 bugs marked with "stalebug" whiteboard.

If this bug is still valid, please reopen and remove the "stalebug" keyword.