Community
Participate
Working Groups
In seeking to extend "padding" support (bug XXXXXX), I realized I had no idea what the "composite" attribute meant when defining a property handler in a plugin.xml. The schema definition has no details, and the code in CSSSWTEngineImpl#initializeCSSPropertyHandlers() seems to have a subtle bug: for (IConfigurationElement ce : e.getConfigurationElements()) { // line 100 if (ce.getName().equals("handler")) { String name = ce.getAttribute("composite"); String adapter = ce.getAttribute("adapter"); // if (className.equals(adapter)) { IConfigurationElement[] children = ce.getChildren(); String[] names = new String[children.length]; for (int i = 0; i < children.length; i++) { if (children[i].getName().equals("property-name")) names[i] = children[i].getAttribute("name"); } try { if (handlersMap.containsKey(adapter)) { HashMap adapterMap = (HashMap) handlersMap.get(adapter); if (!adapterMap.containsKey(name)){ // 114 "composite" is defined (and used) as an optional boolean value — not a name as on line 102. On line 114, this "composite" boolean value (possibly blank, or "true" or "false") is looked up in the adapterMap, which is actually keyed by adapter class names, and so this conditional expression is always true. Some of the handlers defined in org.eclipse.e4.ui.css.swt do set composite=false. I suspect it was an attempt to define a composite property using other property handlers?
(In reply to comment #0) > In seeking to extend "padding" support (bug XXXXXX), I realized I had no idea Oops, submitted that is for bug 364070.
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. If the bug is still relevant, please remove the "stalebug" whiteboard tag.