Search in sources :

Example 1 with IUIMatchingMode

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()]);
}
Also used : InputXmlTree(org.talend.designer.xmlmap.model.emf.xmlmap.InputXmlTree) ArrayList(java.util.ArrayList) IUIMatchingMode(org.talend.designer.xmlmap.model.tree.IUIMatchingMode)

Aggregations

ArrayList (java.util.ArrayList)1 InputXmlTree (org.talend.designer.xmlmap.model.emf.xmlmap.InputXmlTree)1 IUIMatchingMode (org.talend.designer.xmlmap.model.tree.IUIMatchingMode)1