Package de.mindcrimeilab.xsanalyzer.util

Examples of de.mindcrimeilab.xsanalyzer.util.NameComparator


        XSObjectList attributesObjectList = ctypedef.getAttributeUses();
        if (0 < attributesObjectList.getLength()) {
            List temp = XSListHelper.asList(attributesObjectList);
            attributes = new ArrayList<XSAttributeDeclaration>();
            CollectionsHelper.copyCollection((Collection<XSAttributeUse>) temp, attributes, new XsAttributeExtractor());
            Collections.sort(attributes, new NameComparator());
        }
        return attributes;
    }
View Full Code Here


     */
    public SimilarTypesListModelAdapter(final Map<String, ? extends XSObjectList> similarTypes) {
        data = Collections.unmodifiableMap(similarTypes);

        // use TreeMap to provide a sorted list view to the user
        Map<XSObject, String> map = new TreeMap<XSObject, String>(new NameComparator());
        // expand all values of the map and construct a list representing each
        // value of the map associated to its key.
        for (Entry<String, ? extends XSObjectList> entry : data.entrySet()) {
            XSObjectList list = entry.getValue();
            for (int i = 0; null != list && i < list.getLength(); ++i) {
View Full Code Here

        return (null != list) ? list.indexOf(object) : null;
    }

    private void updateModel(boolean sort) {
        if (sort) {
            final Comparator<XSObject> comparator = new NameComparator();
            for (List<XSObject> list : model.values()) {
                Collections.sort(list, comparator);
            }
        }
    }
View Full Code Here

        for (XSObject xso : keySet) {
            if (null != xso) {
                types.add(new DefaultMutableTreeNode(xso));
            }
        }
        Collections.sort(types, new DefaultMutableTreeNodeComparator(new NameComparator()));
    }
View Full Code Here

    public UnusedTypesListModelAdapter(Set<XSTypeDefinition> unusedTypes) {
        this.unusedTypes = new ArrayList<XSTypeDefinition>(unusedTypes);
        NamespaceFilter filter = new NamespaceFilter();
        filter.addNamespace("http://www.w3.org/2001/XMLSchema");
        CollectionsHelper.filterCollection(this.unusedTypes, filter);
        Collections.sort(this.unusedTypes, new NameComparator());
    }
View Full Code Here

TOP

Related Classes of de.mindcrimeilab.xsanalyzer.util.NameComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.