</type>
<type id="attrtext@databinding">
- <constant value="attr" displayName="form"/>
- <constant value="attr" displayName="for"/>
<constant value="text" displayName=""/>
+ <constant value="attr" displayName="for"/>
+ <constant value="attr" displayName="form"/>
</type>
</types>
\ No newline at end of file
// DataBinding
public static final String DATABINDINGVIEW_DEFAULT_MESSAGE = "Data-Binding view is not available."; //$NON-NLS-1$
public static final String DATABINDING_ARRAYITEM_VALUE_PREFIX = "$data."; //$NON-NLS-1$
+ public static final String DATABINDING_ARRAYITEM_VALUE_SUFFIX = ", attr: { 'data-index': $index }"; //$NON-NLS-1$
public static final String DATABINDING_TYPE_STATIC = "Static"; //$NON-NLS-1$
public static final String DATABINDING_TYPE_REMOTECALL = "Remote Call"; //$NON-NLS-1$
item.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
String str = targetPart.getProperty(BuilderConstants.ATTRIBUTE_DATA_BIND).getValue();
- final String info = makeInfoString(property2, displayName, value, str);
+ final String info = makeInfoString(targetPart, property2, displayName, value, str);
command =
new SetPartPropertyCommand(targetPart, BuilderConstants.ATTRIBUTE_DATA_BIND,
info);
}
- private String makeInfoString(PartProperty property2, String displayName, String value, String str) {
+ private String makeInfoString(Part targetPart, PartProperty property2, String displayName, String value, String str) {
String string = "";
if ((str != null) && (!str.isEmpty())) {
}
if ((displayName != null) && (!displayName.isEmpty())) {
- bindingInfos.put(value+"-"+displayName, property2.getValue());
+ bindingInfos.put("attr-"+displayName, property2.getValue());
} else {
bindingInfos.put(value, property2.getValue());
}
-
+
string = DataBindingTooltipParser.makeStringFromMap(bindingInfos);
} else {
if ((displayName != null) && (!displayName.isEmpty())) {
string = value + ": { " + displayName + ": " + property2.getValue() + " }";
} else {
- string = value + ": " + property2.getValue();
+ if (targetPart.getDescriptorId().equals("tizen.listitem")) {
+ string = value + ": " + property2.getValue() + BuilderConstants.DATABINDING_ARRAYITEM_VALUE_SUFFIX;
+ } else {
+ string = value + ": " + property2.getValue();
+ }
}
}
if (parentPropertyValue != null) {
addInfoTableItem(part, parentPropertyValue, part.getIdPropertyValue(),
key);
+ break;
}
} else {
addInfoTableItem(part, modelValue, part.getIdPropertyValue(), key);
Part part = (Part) tableItem.getData("PART");
String tableTypeValue = tableItem.getText(2);
if (part != null) {
- String propertyValue =
- part.getProperty(BuilderConstants.ATTRIBUTE_DATA_BIND).getValue();
- if ((propertyValue != null) && (!propertyValue.isEmpty())) {
- Map<String, String> bindingInfos = DataBindingTooltipParser.parseToMap(propertyValue);
- Object[] bindingTypes = bindingInfos.keySet().toArray();
- for (Object bindingType : bindingTypes) {
- if ((tableTypeValue != null) && (bindingType.toString().equals(tableTypeValue))) {
- bindingInfos.remove(bindingType);
- removeInfoTableItem(part, DataBindingTooltipParser.makeStringFromMap(bindingInfos));
+ if (part.getDescriptorId().equals("tizen.listitem")) {
+ removeInfoTableItem(part, "");
+ } else {
+ String propertyValue =
+ part.getProperty(BuilderConstants.ATTRIBUTE_DATA_BIND).getValue();
+ if ((propertyValue != null) && (!propertyValue.isEmpty())) {
+ Map<String, String> bindingInfos = DataBindingTooltipParser.parseToMap(propertyValue);
+ Object[] bindingTypes = bindingInfos.keySet().toArray();
+ for (Object bindingType : bindingTypes) {
+ if ((tableTypeValue != null) && (bindingType.toString().equals(tableTypeValue))) {
+ bindingInfos.remove(bindingType);
+ removeInfoTableItem(part, DataBindingTooltipParser.makeStringFromMap(bindingInfos));
+ }
}
}
}