Package org.gradle.foundation.output

Examples of org.gradle.foundation.output.FileLink


      }
      else
      {
         if( hasClickableFiles )
         {
            FileLink fileLink = getFileLinkAt( point );
            if( fileLink != null )
            {
               interaction.fileClicked( fileLink.getFile(), fileLink.getLineNumber() );
            }
         }
      }
   }
View Full Code Here


    @param fileLinks the FileLinks to apply
    */
   private void highlightFileLinks( List<FileLink> fileLinks ) {
      Iterator<FileLink> iterator = fileLinks.iterator();
      while( iterator.hasNext() ) {
         FileLink fileLink = iterator.next();

         document.setCharacterAttributes( fileLink.getStartingIndex(), fileLink.getLength(), fileStyle, true );
      }
   }
View Full Code Here

    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

    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( "[ant:checkstyle] /home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s.\n", fileLink1 );
View Full Code Here

     * 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" );
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

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.