Package com.android.tools.lint.detector.api

Examples of com.android.tools.lint.detector.api.XmlContext


    private void runFileDetectors(@NonNull Project project, @Nullable Project main) {
        // Look up manifest information (but not for library projects)
        File manifestFile = project.getManifestFile();
        if (manifestFile != null) {
            XmlContext context = new XmlContext(this, project, main, manifestFile, null);
            IDomParser parser = mClient.getDomParser();
            if (parser != null) {
                context.document = parser.parseXml(context);
                if (context.document != null) {
                    try {
View Full Code Here


                // Process files in alphabetical order, to ensure stable output
                // (for example for the duplicate resource detector)
                Arrays.sort(xmlFiles);
                for (File file : xmlFiles) {
                    if (LintUtils.isXmlFile(file)) {
                        XmlContext context = new XmlContext(this, project, main, file, type);
                        fireEvent(EventType.SCANNING_FILE, context);
                        visitor.visitFile(context, file);
                        if (mCanceled) {
                            return;
                        }
View Full Code Here

                String folderName = file.getParentFile().getName();
                ResourceFolderType type = ResourceFolderType.getFolderType(folderName);
                if (type != null) {
                    XmlVisitor visitor = getVisitor(type, xmlDetectors);
                    if (visitor != null) {
                        XmlContext context = new XmlContext(this, project, main, file, type);
                        fireEvent(EventType.SCANNING_FILE, context);
                        visitor.visitFile(context, file);
                    }
                }
            }
View Full Code Here

    }

    private void runFileDetectors(@NonNull Project project, @Nullable Project main) {
        // Look up manifest information (but not for library projects)
        for (File manifestFile : project.getManifestFiles()) {
            XmlContext context = new XmlContext(this, project, main, manifestFile, null);
            IDomParser parser = mClient.getDomParser();
            if (parser != null) {
                context.document = parser.parseXml(context);
                if (context.document != null) {
                    try {
View Full Code Here

                // Process files in alphabetical order, to ensure stable output
                // (for example for the duplicate resource detector)
                Arrays.sort(xmlFiles);
                for (File file : xmlFiles) {
                    if (LintUtils.isXmlFile(file)) {
                        XmlContext context = new XmlContext(this, project, main, file, type);
                        fireEvent(EventType.SCANNING_FILE, context);
                        visitor.visitFile(context, file);
                        if (mCanceled) {
                            return;
                        }
View Full Code Here

                String folderName = file.getParentFile().getName();
                ResourceFolderType type = ResourceFolderType.getFolderType(folderName);
                if (type != null) {
                    XmlVisitor visitor = getVisitor(type, xmlDetectors);
                    if (visitor != null) {
                        XmlContext context = new XmlContext(this, project, main, file, type);
                        fireEvent(EventType.SCANNING_FILE, context);
                        visitor.visitFile(context, file);
                    }
                }
            }
View Full Code Here

                String folderName = file.getParentFile().getName();
                ResourceFolderType type = ResourceFolderType.getFolderType(folderName);
                if (type != null) {
                    XmlVisitor visitor = getVisitor(type, xmlDetectors);
                    if (visitor != null) {
                        XmlContext context = new XmlContext(this, project, main, file, type);
                        fireEvent(EventType.SCANNING_FILE, context);
                        visitor.visitFile(context, file);
                    }
                }
            }
View Full Code Here

    private void runFileDetectors(@NonNull Project project, @Nullable Project main) {
        // Look up manifest information (but not for library projects)
        if (project.isAndroidProject()) {
            for (File manifestFile : project.getManifestFiles()) {
                XmlContext context = new XmlContext(this, project, main, manifestFile, null);
                IDomParser parser = mClient.getDomParser();
                if (parser != null) {
                    context.document = parser.parseXml(context);
                    if (context.document != null) {
                        try {
View Full Code Here

                // Process files in alphabetical order, to ensure stable output
                // (for example for the duplicate resource detector)
                Arrays.sort(xmlFiles);
                for (File file : xmlFiles) {
                    if (LintUtils.isXmlFile(file)) {
                        XmlContext context = new XmlContext(this, project, main, file, type);
                        fireEvent(EventType.SCANNING_FILE, context);
                        visitor.visitFile(context, file);
                        if (mCanceled) {
                            return;
                        }
View Full Code Here

TOP

Related Classes of com.android.tools.lint.detector.api.XmlContext

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.