Package com.adobe.ac.pmd.nodes

Examples of com.adobe.ac.pmd.nodes.IClass


            + "RaoulTest.as" ) );
      final IParserNode bug888Ast = FileSetUtils.buildAst( getTestFiles().get( "bug."
            + "FlexPMD88.as" ) );
      final IParserNode pngEncoderAst = FileSetUtils.buildAst( getTestFiles().get( "PngEncoder.as" ) );

      final IClass radonDataGrid = NodeFactory.createPackage( dataGridAst ).getClassNode();
      final IClass nonBindableModelLocator = NodeFactory.createPackage( modelLocatorAst ).getClassNode();
      final IClass flexUnit4TestCase = NodeFactory.createPackage( flexUnit4TestCaseAst ).getClassNode();
      final IClass bug88 = NodeFactory.createPackage( bug888Ast ).getClassNode();
      final IClass pngEncoder = NodeFactory.createPackage( pngEncoderAst ).getClassNode();

      constructor = radonDataGrid.getFunctions().get( 0 );
      drawHighlightIndicator = radonDataGrid.getFunctions().get( 1 );
      drawSelectionIndicator = radonDataGrid.getFunctions().get( 2 );
      drawRowBackground = radonDataGrid.getFunctions().get( 3 );
      placeSortArrow = radonDataGrid.getFunctions().get( 4 );
      isTrueGetter = radonDataGrid.getFunctions().get( 5 );
      isTrueSetter = radonDataGrid.getFunctions().get( 6 );
      getHeight = nonBindableModelLocator.getFunctions().get( 2 );
      flexunit4Test = flexUnit4TestCase.getFunctions().get( 1 );
      flexunit4TestSetUp = flexUnit4TestCase.getFunctions().get( 0 );
      bug88Constructor = bug88.getConstructor();
      fDCTQuant = pngEncoder.getFunctions().get( 9 );
   }
View Full Code Here


   @Before
   public void setup() throws PMDException
   {
      final IParserNode nonBindableModelLocatorAst = FileSetUtils.buildAst( getTestFiles().get( "cairngorm.NonBindableModelLocator.as" ) );
      final IClass nonBindableModelLocator = NodeFactory.createPackage( nonBindableModelLocatorAst )
                                                        .getClassNode();
      first = nonBindableModelLocator.getAttributes().get( 0 );
      second = nonBindableModelLocator.getAttributes().get( 1 );
      third = nonBindableModelLocator.getAttributes().get( 2 );
      final IParserNode asDocsAst = FileSetUtils.buildAst( getTestFiles().get( "asDocs.EmptyWithDocClass.as" ) );
      final IClass asDocs = NodeFactory.createPackage( asDocsAst ).getClassNode();
      withAsDoc = asDocs.getAttributes().get( 0 );

   }
View Full Code Here

   @Before
   public void setup() throws PMDException
   {
      final IParserNode ast = FileSetUtils.buildAst( getTestFiles().get( "cairngorm.NonBindableModelLocator.as" ) );
      final IClass nonBindableModelLocator = NodeFactory.createPackage( ast ).getClassNode();
      first = nonBindableModelLocator.getAttributes().get( 0 );
   }
View Full Code Here

   @Test
   public void testComputeFunctionLength() throws PMDException
   {
      final IFlexFile file = getTestFiles().get( "RadonDataGrid.as" );
      final IParserNode dataGridAst = FileSetUtils.buildAst( file );
      final IClass radonDataGrid = NodeFactory.createPackage( dataGridAst ).getClassNode();

      assertEquals( 6,
                    FunctionUtils.computeFunctionLength( file,
                                                         radonDataGrid.getFunctions().get( 0 ).getBody() ) );

      assertEquals( 9,
                    FunctionUtils.computeFunctionLength( file,
                                                         radonDataGrid.getFunctions().get( 1 ).getBody() ) );

      assertEquals( 21,
                    FunctionUtils.computeFunctionLength( file,
                                                         radonDataGrid.getFunctions().get( 2 ).getBody() ) );

      assertEquals( 16,
                    FunctionUtils.computeFunctionLength( file,
                                                         radonDataGrid.getFunctions().get( 3 ).getBody() ) );

      assertEquals( 10,
                    FunctionUtils.computeFunctionLength( file,
                                                         radonDataGrid.getFunctions().get( 4 ).getBody() ) );
   }
View Full Code Here

   @Ignore("This test requires test-data that was not donated to Apache")
   public void testCreate() throws PMDException
   {
      final IFlexFile file = getTestFiles().get( "bug.FlexPMD60.as" );
      final IParserNode ast = FileSetUtils.buildAst( file );
      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
      final InternalFunctionMetrics classMetrics = InternalFunctionMetrics.create( new ProjectMetrics(),
                                                                                   "bug",
                                                                                   classNode );

      assertEquals( 1,
View Full Code Here

   @Ignore("This test requires test-data that was not donated to Apache")
   public void testComputeMultiLineComments() throws PMDException
   {
      final IFlexFile file = getTestFiles().get( "bug.FlexPMD60.as" );
      final IParserNode ast = FileSetUtils.buildAst( file );
      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();

      assertEquals( 6,
                    MetricUtils.computeMultiLineComments( classNode ) );
   }
View Full Code Here

   @Test
   public void testBug157() throws PMDException
   {
      final IFlexFile file = getTestFiles().get( "bug.FlexPMD157.as" );
      final IParserNode ast = FileSetUtils.buildAst( file );
      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
      final ClassMetrics classMetrics = ClassMetrics.create( "bug",
                                                             new File( file.getFilePath() ),
                                                             InternalFunctionMetrics.create( new ProjectMetrics(),
                                                                                             file.getFullyQualifiedName(),
                                                                                             classNode ),
View Full Code Here

   @Test
   public void testBug181() throws PMDException
   {
      final IFlexFile file = getTestFiles().get( "bug.FlexPMD181.as" );
      final IParserNode ast = FileSetUtils.buildAst( file );
      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
      final ClassMetrics classMetrics = ClassMetrics.create( "bug",
                                                             new File( file.getFilePath() ),
                                                             InternalFunctionMetrics.create( new ProjectMetrics(),
                                                                                             file.getFullyQualifiedName(),
                                                                                             classNode ),
View Full Code Here

   @Test
   public void testBug232() throws PMDException
   {
      final IFlexFile file = getTestFiles().get( "bug.FlexPMD232.as" );
      final IParserNode ast = FileSetUtils.buildAst( file );
      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
      final ClassMetrics classMetrics = ClassMetrics.create( "bug",
                                                             new File( file.getFilePath() ),
                                                             InternalFunctionMetrics.create( new ProjectMetrics(),
                                                                                             file.getFullyQualifiedName(),
                                                                                             classNode ),
View Full Code Here

   @Test
   public void testBug233() throws PMDException
   {
      final IFlexFile file = getTestFiles().get( "bug.Duane.mxml" );
      final IParserNode ast = FileSetUtils.buildAst( file );
      final IClass classNode = NodeFactory.createPackage( ast ).getClassNode();
      final ClassMetrics classMetrics = ClassMetrics.create( "bug",
                                                             new File( file.getFilePath() ),
                                                             InternalFunctionMetrics.create( new ProjectMetrics(),
                                                                                             file.getFullyQualifiedName(),
                                                                                             classNode ),
View Full Code Here

TOP

Related Classes of com.adobe.ac.pmd.nodes.IClass

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.