use of org.talend.designer.xmlmap.model.tree.IUIMatchingMode in project tdi-studio-se by Talend.
the class XmlMapNodeDirectEditManager method getMatchModel.
private IUIMatchingMode[] getMatchModel() {
IUIMatchingMode[] allMatchingModel = XML_MAP_MATCHING_MODE.values();
List<IUIMatchingMode> avilable = new ArrayList<IUIMatchingMode>();
if (model instanceof InputXmlTree) {
InputXmlTree inputTree = (InputXmlTree) model;
for (int i = 0; i < allMatchingModel.length; ++i) {
IUIMatchingMode matchingMode = allMatchingModel[i];
final String text = matchingMode.getLabel();
if (text.length() != 0) {
if (inputTree.getMatchingMode().equals(XML_MAP_MATCHING_MODE.ALL_ROWS.toString())) {
if (matchingMode.equals(XML_MAP_MATCHING_MODE.ALL_ROWS)) {
avilable.add(matchingMode);
}
} else {
if (!matchingMode.equals(XML_MAP_MATCHING_MODE.ALL_ROWS)) {
avilable.add(matchingMode);
}
}
}
}
}
return avilable.toArray(new IUIMatchingMode[avilable.size()]);
}
Aggregations