Examples of IDomParser


Examples of com.android.tools.lint.client.api.IDomParser

            Attr attr = mIdToAttr.get(resource);
            if (attr != null) {
                location = mAttrToLocation.get(attr);
                if (location == null) {
                    File f = mAttrToFile.get(attr);
                    IDomParser parser = context.client.getParser();
                    Position start = parser.getStartPosition(context, attr);
                    Position end = null;
                    if (start != null) {
                        end = parser.getEndPosition(context, attr);
                    }
                    location = new Location(f, start, end);
                }
            } else {
                // Try to figure out the file if it's a file based resource (such as R.layout) --
View Full Code Here

Examples of com.android.tools.lint.client.api.IDomParser

                // Canonical list_item layout name: don't warn about these, it's
                // pretty common to want to paint custom list item backgrounds
                return;
            }

            IDomParser parser = context.client.getParser();
            Position start = parser.getStartPosition(context, attribute);
            Position end = null;
            if (start != null) {
                end = parser.getEndPosition(context, attribute);
            }
            Location location = new Location(context.file, start, end);
            if (mRootAttributes == null) {
                mRootAttributes = new ArrayList<Pair<Location,String>>();
            }
View Full Code Here

Examples of com.android.tools.lint.client.api.IDomParser

                    // that this layout is included so check the included layouts to make
                    // sure at least one included context is valid for this layout_param.
                    // We can't do that yet since we may be processing the include tag to
                    // this layout after the layout itself. Instead, stash a work order...
                    if (context.getScope().contains(Scope.ALL_RESOURCE_FILES)) {
                        IDomParser parser = context.parser;
                        Location.Handle handle = parser.createLocationHandle(context, attribute);
                        handle.setClientData(attribute);
                        mPending.add(Pair.of(name, handle));
                    }

                    return;
                }

                String parentTag = ((Element) layoutNode).getTagName();
                if (parentTag.equals(VIEW_MERGE)) {
                    // This is a merge which means we need to check the including contexts,
                    // wherever they are. This has to be done after all the files have been
                    // scanned since we are not processing the files in any particular order.
                    if (context.getScope().contains(Scope.ALL_RESOURCE_FILES)) {
                        IDomParser parser = context.parser;
                        Location.Handle handle = parser.createLocationHandle(context, attribute);
                        handle.setClientData(attribute);
                        mPending.add(Pair.of(name, handle));
                    }

                    return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.