4 Replies Latest reply on Dec 14, 2009 9:57 AM by tinylion_uk

    my best workflow so far.

    tinylion_uk Level 2

      Thought I'd share a way Ive found to work with PMD and the eclipse plug-in when adding the nature to a project which already has quite a lot of code.

       

      1. add the pmd nature

      2. turn on Monitorize

       

      First i tried just doing a clean build hoping all the code would be tested. it either didnt work or I think just stopped cus of too many files

       

      anyway, what ive now done to good effect is this.

       

      Go through each folder, or master package and do a manual PMD run (this also then displays the results in the flexPMD view panel, which wasnt happening when pmd was auto run by a build)

       

      once Ive gone through each folder and done a manual run, the errors etc in the problems panel just agregate nicely. Now I have a fully tested start point

       

      from then on only files I change and save are tested, during the build cycle, and all seems to be running very well.

       

      It helps a great deal if you set up a second problems panel just for pmd results.

       

      It's taken me a while to find this (although obvious) workflow, but now for the first time I have a fully tested code base that only retests changed files.

       

      and thanks for the 2500 problems lol

       

      I've found working this way to have the best results so far.

       

      builder 4

      sdk4 trunk

      pmd trunk

       

      glenn

       

      ps - typos - i've only been awake 30 minutes and still on first espresso!

        • 1. Re: my best workflow so far.
          Xavi Beumala Level 1

          Hi Glenn,

           

          Adding the nature to your project should be enough so that FlexPMD runs automatically on all your source files and see the errors in the errors panel. It shouldn't be necessary for you to run FlexPMD "manually". You might be experiencing an error related to http://forums.adobe.com/thread/537410

           

          I'll try to reproduce and fix the issue. It seems to be affecting several people.


          once Ive gone through each folder and done a manual run, the errors etc in the problems panel just agregate nicely. Now I have a fully tested start point

           

           

          Why do you go through each folder? Running FlexPMD in a parent folder should recursively scan all subfolders. Is it not the case for you?

          Go through each folder, or master package and do a manual PMD run (this also then displays the results in the flexPMD view panel, which wasnt happening when pmd was auto run by a build)

           

           

          When you add flexPMD nature to your projects it's not expected to see the problems in the FlexPMD View, you will only see the problmes in the problems View. FlexPMD View only displays the errors when FlexPMD is executed as an action.

          1 person found this helpful
          • 2. Re: my best workflow so far.
            tinylion_uk Level 2

            hi

             

            when i say go through each folder, that wasnt quite correct. what i actually do is break the code up into chunks, clicking on top level. when i try to do whole code is doesnt work for me. I have to select a folder (with sub folders) that only have so many files. im not sure of how many but too many seems to not work.

             

            Ive never been able to run pmd on my whole src directory (plug in or command line) it crashes with the error i posted earlier (the java index error one)

             

            thats the only reason i  go through manually. as long as i dont feed it too many files at one time all is well

            • 3. Re: my best workflow so far.
              Xavi Beumala Level 1

              Hi Glenn,

               

              let's then focus on fixing this :-)

               

              We're using FlexPMD internally in quite big projects with several thousands of classes and we don't apparently have performance problems. Could you please post again the error you're getting so that we can investigate?

               

              Cheers

              Xavi

              1 person found this helpful
              • 4. Re: my best workflow so far.
                tinylion_uk Level 2

                thanks Xavi,

                 

                 

                I'll spend a couple of hours this evening putting together a much more thorough set of results and logs etc for you.

                 

                are there any things you like me to include. any produced files etc.

                 

                if there is anything you know would help let me know and i'll egt all the info together. and will also try pmd with a number of projects here.

                 

                 

                thanks again, finding this a very useful tool and IMHO its things like this that will really help flex be taken seriously.We need these kinds of tools. Flex is still a baby compaired to java development etc, but knowing adobe is working on these kinds of tools is a good sign of things to come.

                 

                let me know what if there are any particulars you want and I'll just get on putting my results and experiences togethre for you. Will post here and JIRA later today

                 

                all the best

                 

                g