Package org.gradle.foundation.output

Examples of org.gradle.foundation.output.FileLink


               + "/home/user/files/Thing2.JAVA:929: cannot find symbol\n"
               + "/home/user/files/Thing3.JaVa:77: incompatible types\n"
               + "* Try:\n"
               + "Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.";

       parseOutputTest(outputText, new FileLink(new File("/home/user/files/Thing.java"), 65, 95, 38),
               new FileLink(new File("/home/user/files/Thing2.JAVA"), 128, 160, 929),
               new FileLink(new File("/home/user/files/Thing3.JaVa"), 181, 212, 77));
   }
View Full Code Here


        }

        String remainder = matchedText.substring(realPathEnd);
        int lineNumber = PrefixedFileLinkDefinition.getLineNumber(remainder, lineNumberDelimiter);

        fileLinks.add(new FileLink(file, start + prefixIndex, end, lineNumber, this));
        return end;
    }
View Full Code Here

        }

        String remainder = matchedText.substring(realPathEnd);
        int lineNumber = getLineNumber(remainder, lineNumberDelimiter);

        fileLinks.add(new FileLink(file, start + prefixIndex, end, lineNumber, this));
        return end;
    }
View Full Code Here

    /**
     * This does a basic test. Text is output in several waves breaking within lines. There is a single file link in it. We should find it. Specifically, this is going to break up the file so it comes
     * in multiple parts.
     */
    public void testBasic() {
        FileLink expectedFileLink = new FileLink(new File("/home/user/project/modules/plugins/src/main/java/com/thing/plugins/gradle/ui/GradleComponent.java"), 114, 215, 186);

        appendTextWithoutFileLinks(":distributionDiskResources ");
        appendTextWithoutFileLinks("SKIPPED\n:installDiskResources SKIPPED\n");
        appendTextWithoutFileLinks(":idea-plugins:ideagradle:compileJava\n");
        appendTextWithoutFileLinks("[ant:javac] /home/user/project/modules/plugins");
View Full Code Here

    /**
     * This tests live output coming in where the result is multiple FileLinks. We'll just add many lines some have FileLinks some don't. We want to make sure the LiveOutputParser tracks all of them
     * correctly.
     */
    public void testMultipleFiles() {
        FileLink fileLink1 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java"), 120, 243, 38);
        FileLink fileLink2 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java"), 282, 408, -1);
        FileLink fileLink3 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml"), 531, 606, -1);
        FileLink fileLink4 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle"), 622, 679, -1);
        FileLink fileLink5 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html"), 832, 912, -1);

        appendTextWithoutFileLinks(":distributionDiskResources SKIPPED\n:installDiskResources");
        appendTextWithoutFileLinks(" SKIPPED\n:idea-plugins:ideagradle:compileJava\n\n");
        appendTextWithoutFileLinks("[ant:checkstyle] /home/user/modules/gradle/subprojects");
        appendTextWithFileLinks("/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s.\n", fileLink1);
View Full Code Here

    /**
     * This tests is we can successfully find FileLinks if several of them come in at once in one big block of multi-lined text. We'll add some text one line at a time, then add a single FileLink (on a
     * single line), then add many many lines at once that has 4 FileLinks in it.
     */
    public void testMultiplesAtOnce() {
        FileLink fileLink1 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java"), 120, 243, 38);
        FileLink fileLink2 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java"), 282, 408, -1);
        FileLink fileLink3 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml"), 531, 606, -1);
        FileLink fileLink4 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle"), 622, 679, -1);
        FileLink fileLink5 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html"), 832, 912, -1);

        appendTextWithoutFileLinks(":distributionDiskResources SKIPPED\n");
        appendTextWithoutFileLinks(":installDiskResources SKIPPED\n");
        appendTextWithoutFileLinks(":idea-plugins:ideagradle:compileJava\n\n");
        appendTextWithFileLinks(
View Full Code Here

     * This verifies that we can find a link to a groovy file as well as its line number. This was actually a bug and this test is based off of actual data (tests failed due to a compile error in
     * groovy). I tracked the problem down to the space after the delimiter (".groovy: 24" vs. ".groovy:24" ). After running this test with actual data, I'm going to test it with a line that doesn't
     * have a space just to make sure both work.
     */
    public void testGroovyFileLineDelimiter() {
        FileLink fileLink1 = new FileLink(new File("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.groovy"), 183, 306, 24);
        FileLink fileLink2 = new FileLink(new File("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.groovy"), 481, 603, 85);

        appendTextWithoutFileLinks(":distributionDiskResources SKIPPED\n");
        appendTextWithoutFileLinks(":installDiskResources SKIPPED\n");
        appendTextWithoutFileLinks(":idea-plugins:ideagradle:compileJava\n\n");
        appendTextWithoutFileLinks("org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:\n");
View Full Code Here

        assertTrue("Fake extension 1 was not added. ", definitionLord.getFileExtensions().contains(myExtension1));
        assertTrue("Fake extension 2 was not added. ", definitionLord.getFileExtensions().contains(myExtension2));

        //now verify the extension is used

        FileLink fileLink1 = new FileLink(new File("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.mytxtextension"), 183, 313, 24);
        FileLink fileLink2 = new FileLink(new File("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.othertxtextension"), 488, 618, -1);
        FileLink fileLink3 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java"), 632, 755, 38);

        appendTextWithoutFileLinks(":distributionDiskResources SKIPPED\n");
        appendTextWithoutFileLinks(":installDiskResources SKIPPED\n");
        appendTextWithoutFileLinks(":idea-plugins:ideagradle:compileJava\n\n");
        appendTextWithoutFileLinks("org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:\n");
View Full Code Here

     */
    public void testAddingPrefixedFileLink() {
        definitionLord.addPrefixedFileLink("Test Crap 1", "Some Garbage:", ".txt", ":");
        definitionLord.addPrefixedFileLink("Test Crap 2", "Some Trash:", ".txt", null);    //no line delimiter on this one

        FileLink fileLink1 = new FileLink(new File("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.txt"), 206, 325, 24);
        FileLink fileLink2 = new FileLink(new File("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.txt"), 517, 633, -1);
        FileLink fileLink3 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java"), 651, 774, 38);

        appendTextWithoutFileLinks(":distributionDiskResources SKIPPED\n");
        appendTextWithoutFileLinks(":installDiskResources SKIPPED\n");
        appendTextWithoutFileLinks(":idea-plugins:ideagradle:compileJava\n\n");
        appendTextWithoutFileLinks("org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:\n");
View Full Code Here

        File file = new File(directory, "index.html");
        if (verifyFileExists && !file.exists()) {
            return -1;
        }

        fileLinks.add(new FileLink(file, start + prefix.length(), end, -1, this));
        return end;
    }
View Full Code Here

TOP

Related Classes of org.gradle.foundation.output.FileLink

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.