diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/PropertyParser.java b/plugins/android-designer/src/com/intellij/android/designer/model/PropertyParser.java index 0425e8779ff2..01fcc650807a 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/model/PropertyParser.java +++ b/plugins/android-designer/src/com/intellij/android/designer/model/PropertyParser.java @@ -155,16 +155,15 @@ public class PropertyParser { } if (model != null) { - property.setImportant(model.isImportantProperty(name)); - property.setExpert(model.isExpertProperty(name)); - property.setDeprecated(model.isDeprecatedProperty(name)); + model.decorate(property, name); } properties.add(property); } if (padding != null) { - List children = padding.getChildren(null); + List children = padding.getChildren(null); + children.add(PropertyTable.extractProperty(properties, "paddingLeft")); children.add(PropertyTable.extractProperty(properties, "paddingTop")); children.add(PropertyTable.extractProperty(properties, "paddingRight")); @@ -267,13 +266,20 @@ public class PropertyParser { } if (margin != null) { - List children = margin.getChildren(null); + List children = margin.getChildren(null); + children.add(PropertyTable.extractProperty(properties, "marginLeft")); children.add(PropertyTable.extractProperty(properties, "marginTop")); children.add(PropertyTable.extractProperty(properties, "marginRight")); children.add(PropertyTable.extractProperty(properties, "marginBottom")); children.add(PropertyTable.extractProperty(properties, "marginStart")); children.add(PropertyTable.extractProperty(properties, "marginEnd")); + + if (model != null) { + for (Property child : children) { + model.decorate(child, "layout:margin." + child.getName()); + } + } } } diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/views-meta-model.xml b/plugins/android-designer/src/com/intellij/android/designer/model/views-meta-model.xml index 705340e17495..eb0c43d6d096 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/model/views-meta-model.xml +++ b/plugins/android-designer/src/com/intellij/android/designer/model/views-meta-model.xml @@ -1013,7 +1013,7 @@ tooltip="FrameLayout is designed to block out an area on the screen to display a single item."/> diff --git a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/FlagProperty.java b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/FlagProperty.java index dccd4a9bd1fa..6be484046935 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/FlagProperty.java +++ b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/FlagProperty.java @@ -50,10 +50,7 @@ public class FlagProperty extends Property { if (model != null) { for (Property option : myOptions) { - String optionName = name + "." + option.getName(); - option.setImportant(model.isImportantProperty(optionName)); - option.setExpert(model.isExpertProperty(optionName)); - option.setDeprecated(model.isDeprecatedProperty(optionName)); + model.decorate(option, name + "." + option.getName()); } } } diff --git a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/model/MetaModel.java b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/model/MetaModel.java index 8fea8ebad914..4bb2fd945785 100644 --- a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/model/MetaModel.java +++ b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/model/MetaModel.java @@ -16,6 +16,7 @@ package com.intellij.designer.model; import com.intellij.designer.palette.Item; +import com.intellij.designer.propertyTable.Property; import com.intellij.openapi.util.IconLoader; import org.jetbrains.annotations.NotNull; @@ -144,4 +145,10 @@ public class MetaModel { public void setDeprecatedProperties(List deprecatedProperties) { myDeprecatedProperties = deprecatedProperties; } + + public void decorate(Property property, String name) { + property.setImportant(isImportantProperty(name)); + property.setExpert(isExpertProperty(name)); + property.setDeprecated(isDeprecatedProperty(name)); + } } \ No newline at end of file