Project: appceleratorstudio
Issue TISTUD-2784: Provide Content Assist for attribute names in Alloy view XML files
Alloy uses XML files to define views. We should provide content assist for the attributes of elements. {code:xml} {code} For attribute CA we need to look up the properties for the given element's type in the JS index, as well as the events. To look up the type name, we take the element name as the type name and determine the namespace prefix. The default prefix is {{Titanium.UI.}}. If there is an {{ns}} attribute, use it's value as the namespace. Alloy will provide us with the exceptions to the rule for namespace mappings. e.g. {{View}} -> {{Titanium.UI.View}} {{Label}} -> {{Titanium.UI.Label}} {{}} -> {{Titanium.Map.View}} {{Toolbar}} -> {{Titanium.UI.iOS.Toolbar}} The list of attribute name proposals is: # The list of properties of the type # The list of events of the type. Each event name is transformed to be {{"on" + Character.toUppercase(event.name().charAt(0)) + event.name().substring(1);}} - i.e. "click" -> "onClick" # The common set of attributes: {{class}}, {{id}} and {{ns}}. It should be noted that the {{Alloy}} element may only have {{class}} and {{id}} attributes. The special {{Require}} element may have {{class}}, {{id}}, {{src}}, and {{type}}.
Story points: 13