Examples of IFlexFile


Examples of com.adobe.ac.pmd.files.IFlexFile

   @Test
   public void testExclusions() throws PMDException
   {
      final AbstractFlexRule rule = new EmptyIfStmtRule();
      final IFlexFile duaneMxml = getTestFiles().get( "bug.Duane.mxml" );
      final Set< String > excludes = new HashSet< String >();

      excludes.add( "" );

      final int noExclusionViolationsLength = rule.processFile( duaneMxml,
View Full Code Here

Examples of com.adobe.ac.pmd.files.IFlexFile

                      TokenException,
                      PMDException
   {
      IParserNode ast = FileSetUtils.buildAst( getTestFiles().get( "RadonDataGrid.as" ) );
      radonDataGrid = NodeFactory.createPackage( ast ).getClassNode();
      final IFlexFile file = getTestFiles().get( "bug.FlexPMD233a.mxml" );
      ast = FileSetUtils.buildAst( file );
      bug233 = NodeFactory.createPackage( ast ).getClassNode();
      ast = FileSetUtils.buildAst( getTestFiles().get( "cairngorm.BindableModelLocator.as" ) );
      modelLocator = NodeFactory.createPackage( ast ).getClassNode();
      ast = FileSetUtils.buildAst( getTestFiles().get( "cairngorm.NonBindableModelLocator.as" ) );
View Full Code Here

Examples of com.adobe.ac.pmd.files.IFlexFile

   }

   private void processFile( final AllRule rule,
                             final String fileName ) throws PMDException
   {
      final IFlexFile duane = getTestFiles().get( fileName );
      rule.processFile( duane,
                        NodeFactory.createPackage( FileSetUtils.buildAst( duane ) ),
                        getTestFiles() );
   }
View Full Code Here

Examples of com.adobe.ac.pmd.files.IFlexFile

public class FunctionUtilsTest extends FlexPmdTestBase
{
   @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,
View Full Code Here

Examples of com.adobe.ac.pmd.files.IFlexFile

   private AS3Scanner initializeScanner( final SourceCode tokens )
   {
      final AS3Scanner scanner = new AS3Scanner();

      final IFlexFile flexFile = FileUtils.create( new File( tokens.getFileName() ),
                                                   new File( "" ) );

      if ( flexFile instanceof IMxmlFile )
      {
         final IMxmlFile mxml = ( IMxmlFile ) flexFile;
View Full Code Here

Examples of com.adobe.ac.pmd.files.IFlexFile

{
   @Test
   @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 );
View Full Code Here

Examples of com.adobe.ac.pmd.files.IFlexFile

{
   @Test
   @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

Examples of com.adobe.ac.pmd.files.IFlexFile

public class ClassMetricsTest extends FlexPmdTestBase
{
   @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 ),
                                                             classNode,
                                                             file,
                                                             0 );
View Full Code Here

Examples of com.adobe.ac.pmd.files.IFlexFile

   }

   @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 ),
                                                             classNode,
                                                             file,
                                                             0 );
View Full Code Here

Examples of com.adobe.ac.pmd.files.IFlexFile

   }

   @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 ),
                                                             classNode,
                                                             file,
                                                             0 );
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.