|
11 | 11 | * See the License for the specific language governing permissions and |
12 | 12 | * limitations under the License. |
13 | 13 | */ |
14 | | -package org.httprpc.sierra.previewer; |
| 14 | +package org.httprpc.sierra.tools.previewer; |
15 | 15 |
|
16 | 16 | import org.fife.ui.autocomplete.BasicCompletion; |
17 | 17 | import org.fife.ui.autocomplete.Completion; |
@@ -73,17 +73,10 @@ private void loadTags() { |
73 | 73 |
|
74 | 74 | private void addCommonAttributes() { |
75 | 75 | Map<String, String> attributes = new HashMap<>(); |
76 | | - // Add common attributes applicable to all components |
77 | | - attributes.put("name", "String"); |
78 | | - attributes.put("group", "String"); |
79 | | - attributes.put("border", "String"); |
80 | | - attributes.put("padding", "String"); |
81 | | - attributes.put("weight", "String"); |
82 | | - attributes.put("size", "String"); |
83 | | - attributes.put("tabTitle", "String"); |
84 | | - attributes.put("tabIcon", "String"); |
85 | | - attributes.put("style", "String"); |
86 | | - attributes.put("styleClass", "String"); |
| 76 | + // Add common attributes from UILoader.Attribute enum |
| 77 | + for (UILoader.Attribute attr : UILoader.Attribute.values()) { |
| 78 | + attributes.put(attr.getName(), attr.getType().getSimpleName()); |
| 79 | + } |
87 | 80 | baseClassAttributeDefinitions.put("CommonAttributes", attributes); |
88 | 81 | } |
89 | 82 |
|
|
0 commit comments