Skip navigation
Currently Being Moderated

PMD View blank in Flash Builder Beta 2 Standalone

Dec 10, 2009 1:35 PM

Following the instructions on the wiki I downloaded the plugin through the help menu in FB from here: http://opensource.adobe.com/svn/opensource/flexpmd/plugin/trunk/flex-p md-eclipse-plugin-site

 

Plugin is configured in preferences with the following settings:

 

FlexPMD command line installation: /Users/{myName}/Tools/FlashBuilder_Plugins/flex-pmd-all-in-one-bundle -1.0.1/flex-pmd-command-line-1.0.jar

FlexPMD custom ruleset: (blank)

Java command line: java -Xmx256m

FlexCPD command line installation: /Users/{myName}/Tools/FlashBuilder_Plugins/flex-pmd-all-in-one-bundle -1.0.1/flex-pmd-cpd-command-line-1.0.jar

Minimum tokens: 25

 

When I select a folder and say 'Run FlexPMD' it opens the FlexPMD view but there is no output.

 

Currently testing on an actionscript only file. Does the project have to use MXML?

 

Thanks!

 
Replies 1 2 Previous Next
  • Currently Being Moderated
    Dec 11, 2009 1:00 AM   in reply to Scruffpuff

    Same issue here,

     

    I am using the latest drop of flash builder - 262635 (I am on the prerelease program). I am using the plugin with Eclipse 3.5.

     

    CPD works very well (and surprisingly fast), but PMD shows no output with rule set blank. I have no custome ruleset to test against.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2009 1:18 AM   in reply to Scruffpuff

    Hi,

     

    can you make sure you download FlexPMD 1.0.1 from http://opensource.adobe.com/svn/opensource/flexpmd/maven-repository/re lease/com/adobe/ac/flex-pmd/1.0/flex-pmd-all-in-one-bundle-1.0.1.zip

     

    I see you're using /fle x-pmd-command-line-1.0.jar instead of 1.0.1

     

    This should fix your issue.

     

    Cheers

    Xavi Beumala

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2009 7:18 AM   in reply to Xavi Beumala

    Hi, having the same problem. CPD works, but PMD shows an empty view. (FB3).

     

    I downloaded the sipfile you mentioned, but not sure how you recognized him using the 1.0 instead of 1.0.1 because all the files are still named xxx-1.0.jar, even in the 1.0.1 zipfile. Is that ok?

     

    Regards,

     

    Ben

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2009 7:23 AM   in reply to Ben Smeets

    Hi Ben,

     

    you're right, files have the 1.0 naming.

     

    Can you give me some further details on your environment? FB version and eclipse version?

    Can you see the "running FlexPMD" process message in the bottom right corner?

    Is the nature also failing or is only the "run flexPMD" right-click action?

    If you open "error log" view on Windows > Show views > Other > Error log can you see any error in there?

     

    Thanks

    Xavi

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2009 7:44 AM   in reply to Xavi Beumala

    I'm having same issue in Flex Builder 3 Standalone Version: 3.0.205647.

     

    FlexCPD runs fine, right-click FlexPMD, I can briefly see the green progress status in bottom corner, but nothing happens. I downloaded the 1.0.1 zip, but all file names are 1.0. Thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2009 7:49 AM   in reply to Xavi Beumala

    Some more info:

    - the green running bar blinks for .5 seconds

    - Command line running of flexpmd works great

    - flexCPD works through the pluging (including the view)

    - add FlexPMD nature works

    - cannot seem to find the error log view

    - Using Flex builder 3 build 3.0.2.214193

    - Eclipse version: 3.3.1.R33x_r20070911-_19UEkpF-B7Uh2hKy75y

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2009 8:37 AM   in reply to Ben Smeets

    When you add flexPMD nature and compile can you see FlexPMD violations in the standard error view?

    Are you in FB standalone?

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2009 9:07 AM   in reply to Xavi Beumala

    I added FlexPMD Nature, compiled and have no errors

    .

    Using FlexBuilder 3 stand-alone.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2009 2:23 PM   in reply to Xavi Beumala

    The only error view I can turn on, is the normal Flex Builder "problems" view. Nothing is shown there.

     

    I am in Flex builder standalone yes.

     

    Ben

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 12, 2009 2:40 AM   in reply to Scruffpuff

    I also have the same problem with no errors beeing returned, just a empty view. I'm running osx 10.5 (intel) with Flash Builder beta 2 (eclipse 3.4.0). And of course with the latest plugin version 1.0.1.  PMD does not work but the find cut/paste works perfect.

     

    But I suspect that this is a workspace specific bug, beacuse I hooked up pmd on another workspace and it worked perfectly. So finally I tested to remove my current workspace (the one where pmd did not start) and create a new one from scratch, but pmd still wouldnt run. It's wierd.

     

    Cheers

    / Martin

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 12, 2009 12:44 PM   in reply to marteinn_se

    I'm also getting blank view panels. Errors/warning/info showing fine in the problems panel

     

    using lastest version of everything as far as i know.

     

    screen shot so you can see what i mean. also noticed in outline panel, on docs there's an icon, on my version its a "monitorize' button. see pic

     

    really like what you have done so far, and looking forward to the future of this tool. Already finding it usefull

     

    cheers

     

    glenn

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 6:58 AM   in reply to marteinn_se

    I tried adding the nature to another workspace as well, no luck for me.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 9:31 AM   in reply to Scruffpuff

    I have the same error. Tried the same setup on a new workspace and worked perfectly. Here is the error I get in the log with the default workspace ( maybe some lines are irrelevant ):

     

     

    !ENTRY org.eclipse.ui 2 0 2009-12-13 18:18:02.754

    !MESSAGE Warnings while parsing the key bindings from the 'org.eclipse.ui.commands' extension point

    !SUBENTRY 1 org.eclipse.ui 2 0 2009-12-13 18:18:02.754

    !MESSAGE Cannot bind to an undefined command: plug-in='com.adobe.ac.pmd.eclipse', id='com.adobe.ac.pmd.eclipse.flexpmd.runCommand.category'

     

     

    !ENTRY org.eclipse.ui 4 4 2009-12-13 18:18:03.663

    !MESSAGE Unable to create menu item "com.adobe.ac.pmd.eclipse.toolbar.runCommand", command "com.adobe.ac.pmd.eclipse.flexpmd.runCommand.category" not defined

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 10:06 AM   in reply to Glenn Williams

    Hi Glenn,

     

    looking at your screenshot I can only see 1 error. The outline view should display the errors in your active editor. We have a known issue that if FlexPMD is executed while file is opened the outline View won't be updated the first time.

     

    A part from that everything else looks fine to me. Remember that when you run FlexPMD as a nature FlexPMD view won't display anything. FlexPMD view is only used when FlexPMD is executed manually.

     

    Regarding the icon issue I've logged a bug for it: http://bugs.adobe.com/jira/browse/FLEXPMD-123

     

    Cheers

    Xavi Beumala

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 10:25 AM   in reply to marteinn_se

    @Martin I've filled in a new bug in Jira regarding the workspace problem you're experiencing http://bugs.adobe.com/jira/browse/FLEXPMD-124

     

    Please, can you add any further information you have as well as the workspace logs so that I can have a look please? You can find the logs in the your workspace root folder under ./metadata/.log If possible clean up the log file, launch eclipse and try to add pmd nature and clean your project.

     

    Thanks

    Xavi Beumala

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 11:30 AM   in reply to Xavi Beumala

    @devertex @Ben @odoenet @scruffpuff

     

    I've discovered an issue that might end up not running / displaying FlexPMD results. If your preferences point to a wrong jar or to a bad location the plugin will fail silently. I don't think this is the case for @scruffpuff but it's worth you all check your preferences params. The most important one is FlexPMD command line installation which should point to flex-pmd-command-line-1.0.jar

     

    If this doesn't fix the problems, which I guess won't for all of you, could you please run eclipse from the command line with the -debug option?

     

    Win: eclipse.exe -debug

    OSX: {eclipse_folder}/Eclipse.app/Contents/MacOS/eclipse -debug

     

    Then right-click in a source folder an execute FlexPMD > Run FlexPMD

     

    After that you should see some information in the console with further information on what's failing. Could you paste the information here?

     

    I've logged in a bug and an ehancement request:

     

    FlexPMD fails silently:

    http://bugs.adobe.com/jira/browse/FLEXPMD-125

     

    Improve installation process / user experience:

    http://bugs.adobe.com/jira/browse/FLEXPMD-126

     

     

    Cheers

    Xavi Beumala

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 11:33 AM   in reply to Xavi Beumala

    Here's my output from FlashBuilder debug.

     

    Application Started: 20997

    2009-12-13 20:26:03.824 FlashBuilder[71219:10b] Error loading /Library/Contextual Menu Items/StuffItCM.plugin/Contents/MacOS/StuffItCM:  dlopen(/Library/Contextual Menu Items/StuffItCM.plugin/Contents/MacOS/StuffItCM, 262): no suitable image found.  Did find:

    /Library/Contextual Menu Items/StuffItCM.plugin/Contents/MacOS/StuffItCM: mach-o, but wrong architecture

     

    2009-12-13 20:26:03.824 FlashBuilder[71219:10b] Cannot find function pointer MyCMPluginFactory for factory 02E3F072-9CCB-11D5-A0B2-00306575F8A2 in CFBundle/CFPlugIn 0x4d3c6a40 </Library/Contextual Menu Items/StuffItCM.plugin> (bundle, not loaded)

    Dec 13, 2009 8:26:07 PM com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD process

     

    INFO: java -Xmx256m -jar /Applications/flex-pmd-all-in-one-bundle-1/flex-pmd-command-line-1.0. jar -s /Users/martinsandstrom/workspaces/***/*********/*******/src -o /var/folders/+G/+GG-a7t-Fu4gIp8SXBVd6E+++TI/-Tmp-/flexpmd894948818965 2837549dir

    Dec 13, 2009 8:26:07 PM com.adobe.ac.pmd.eclipse.utils.cli.ErrorLogDevice log

     

    WARNING: 2009-dec-13 20:26:07 com.adobe.ac.pmd.commandline.FlexPMD areCommandLineOptionsCorrect

    Dec 13, 2009 8:26:07 PM com.adobe.ac.pmd.eclipse.utils.cli.ErrorLogDevice log

     

    WARNING: ALLVARLIG: Usage: java com.adobe.ac.pmd.commandline.FlexPMD (-s|--sourceDirectory) <sourceDirectory> (-o|--outputDirectory) <outputDirectory> [(-r|--ruleSet) <ruleSet>] [(-e|--excludePackage) <excludePackage>]

    Dec 13, 2009 8:26:07 PM com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD process

     

    SEVERE: /var/folders/+G/+GG-a7t-Fu4gIp8SXBVd6E+++TI/-Tmp-/flexpmd894948818965 2837549dir/pmd.xml (No such file or directory)

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 12:16 PM   in reply to Xavi Beumala

    It seems I found the problem. I tried to create a new workspace with a space in the path and I got the error. I tried to find some secret config in the .metadata folder without result. Maybe it's in the plugin that the path is not converted form "/path to/" to "/path\ to/" or the oposite.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 12:23 PM   in reply to devertex

    That might be the problem. Beacuse the workspace I am having trouble with contains a space in the workspace name,

     

    / M

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 12:24 PM   in reply to marteinn_se

    Hi Martin,

     

    looking at your code, the interesting / important part is:

     

    INFO: java -Xmx256m -jar /Applications/flex-pmd-all-in-one-bundle-1/flex-pmd-command-line-1.0. jar -s /Users/martinsandstrom/workspaces/***/*********/*******/src -o /var/folders/+G/+GG-a7t-Fu4gIp8SXBVd6E+++TI/-Tmp-/flexpmd894948818965 2837549dir

    Dec 13, 2009 8:26:07 PM com.adobe.ac.pmd.eclipse.utils.cli.ErrorLogDevice log

     

     

    WARNING: ALLVARLIG: Usage: java com.adobe.ac.pmd.commandline.FlexPMD (-s|--sourceDirectory) <sourceDirectory> (-o|--outputDirectory) <outputDirectory> [(-r|--ruleSet) <ruleSet>] [(-e|--excludePackage) <excludePackage>]

    Dec 13, 2009 8:26:07 PM com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD process

     

     

    It looks like the problem comes from /Users/martinsandstrom/workspaces/***/*********/*******/src Is there any white space in this path?

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 12:27 PM   in reply to Xavi Beumala

    Sorry about that, I had to censor it for client purposes

     

    But yes, it contains a space. To be more exact, the workspace name contains a space, like this = "workspace 2".

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 12:27 PM   in reply to Xavi Beumala
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 12:32 PM   in reply to Xavi Beumala

    Thats great. Will do a re-checkout of my troubling project tomorrow morning and see how it goes, i'm sure it will work like a charm.

     

    Great findings everyone!

    / M

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 12:37 PM   in reply to marteinn_se

    I'm getting a similar error on Windows 7 Pro.

     

    It looks like it's trying to write to an output directory in my user directory, but can't. So, I have FlexBuilder 3 and the SDK Command Prompt both set to run as administrator and still no go. I moved the FlexPMD command files to my FlexBuilder 3 plug-ins folder and no go.

     

    All the temp folders it attempted to make are empty.

     

    Thanks.

     

    Dec 13, 2009 12:22:12 PM com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD process

    INFO: java -Xmx256m -jar C:\Flex\flexpmd\flex-pmd-command-line-1.0.jar -s C:\Users\odoe\Documents\Flex Builder 3\WDORS -o C:\Users\odoe\AppData\Local\

    Temp\flexpmd42452dir

    Dec 13, 2009 12:22:13 PM com.adobe.ac.pmd.eclipse.utils.cli.ErrorLogDevice log

    WARNING: Dec 13, 2009 12:22:13 PM com.adobe.ac.pmd.commandline.FlexPMD areCommandLineOptionsCorrect

    Dec 13, 2009 12:22:13 PM com.adobe.ac.pmd.eclipse.utils.cli.ErrorLogDevice log

    WARNING: SEVERE: Usage: java com.adobe.ac.pmd.commandline.FlexPMD (-s|--sourceDirectory) <sourceDirectory> (-o|--outputDirectory) <outputDirectory> [(

    -r|--ruleSet) <ruleSet>] [(-e|--excludePackage) <excludePackage>]

    Dec 13, 2009 12:22:13 PM com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD process

    SEVERE: C:\Users\odoe\AppData\Local\Temp\flexpmd42452dir\pmd.xml (The system cannot find the file specified)

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 12:42 PM   in reply to odoenet

    @odoenet

     

    Your problem seems to be the same regarding the spaces. There're spaces in the path of your workspace: C:\Users\odoe\Documents\Flex Builder 3\

     

    The log is not explicit about that and it says the pmd folder doesn't exist, but the cause problem comes from the spaces... Can you try executing PMD in a project / workspace without spaces?

     

     

    Cheers

    Xavi

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2009 2:19 PM   in reply to Xavi Beumala

    Thanks. Switching to a workspace with no spaces and works great!

    Posted earlier before finishing reading the current replies.

    Thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 14, 2009 12:55 AM   in reply to Scruffpuff

    Nice to see the possible solution. I can't change the path to something without spaces though. Hope PMD will be updated soon to allow for this. (The view I mean, because PMD itself has no problems with it ).

     

    Cheers, Ben

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 14, 2009 3:45 AM   in reply to Ben Smeets

    Couldn't help myself and did a quick test in a workspace without spaces, that fixed the problem for me.

     

    Ben

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 15, 2009 2:15 AM   in reply to Scruffpuff

    I am using flexbuilder 3 standalone.PMD view is blank.But I am able to run the PMD from the command line though.Workspace and the project i tried does not contain any blank spaces.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 15, 2009 3:56 AM   in reply to flex2008

    @flex2008 @scruffpuff

     

    Can you please follow these steps:

     

    - run eclipse from the command line with -debug option

    - invoke flexPMD from eclipse (right click in source folder > FlexPMD > Run FlexPMD)

     

    Paste here your relevant logs from the console window

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 14, 2010 11:45 AM   in reply to Scruffpuff

    I have tried FlexPMD with almost all possible combinations - with Flex 3, with Flex 4 Standalone, with Flex 4 Plugin, using workspace with space, without space, using my C: partition, my D partition, etc. Without being able to see anything at all on the FlexPMD view.


    After finding this forum, I have tried running eclipse with -debug, and got this stack trace:

     

    Application Started: 16427
    Jan 14, 2010 7:38:24 PM com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD process
    INFO: java -Xmx256m -jar D:\bin\FlexPMD\flex-pmd-command-line-1.0.jar -s C:\test
    e\fdaga -o C:\Users\JOOSAL~1\AppData\Local\Temp\flexpmd3892770551481749445dir
    Jan 14, 2010 7:38:29 PM com.adobe.ac.pmd.eclipse.utils.cli.ErrorLogDevice log
    WARNING: 14/Jan/2010 19:38:29 com.adobe.ac.pmd.engines.AbstractFlexPmdEngine <in
    it>
    Jan 14, 2010 7:38:29 PM com.adobe.ac.pmd.eclipse.utils.cli.ErrorLogDevice log
    WARNING: WARNING: Access is denied at java.io.WinNTFileSystem.createFileExclusiv
    ely(Native Method)
    Jan 14, 2010 7:38:29 PM com.adobe.ac.pmd.eclipse.utils.cli.ErrorLogDevice log
    WARNING: java.io.File.checkAndCreate(Unknown Source)
    Jan 14, 2010 7:38:29 PM com.adobe.ac.pmd.eclipse.utils.cli.ErrorLogDevice log
    WARNING: java.io.File.createTempFile(Unknown Source)
    Jan 14, 2010 7:38:29 PM com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD process
    SEVERE: C:\Users\JOOSAL~1\AppData\Local\Temp\flexpmd3892770551481749445dir\pm d.x
    ml (The system cannot find the file specified)

     

    It seems the problem might be due to my User Account in Windows, which have spaces and special characters (João Saleiro) - but I might be wrong. I can't change my user account name, which makes FlexPMD useless for now. And I was hoping to show it on a presentation I will be giving for the community next saturday (day 16). Is there any workaround that allows me to use FlexPMD inside eclipse, so I can use it for now? Isn't there an easy way to set the output directory to a different one?

     

    Thank you,

     

    João Saleiro

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 15, 2010 2:02 AM   in reply to João Saleiro

    Hi Joao,

     

    I'm sorry to hear the plugin is not working on your environment. I'm almost sure it's because of your home directory. I'm afraid I won't be able to provide you a fix / workaround for this before tomorrow

     

    the way we're currently getting the output folder is with the Java File API: File.createTempFile So it's java who chooses where to create this temp file... I'm not sure if Java provides a way to change this location.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 15, 2010 3:20 AM   in reply to Xavi Beumala

    Xavi,

     

    what about if the user can set the output directory on the preferences of the plugin? I can imagine cases where I would like to keep the PMD generated report, and for that I would be glad to output it to a directory set by me. What do you think?

     

    João Saleiro

    www.webfuel.pt

    www.riapt.org

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 15, 2010 11:41 AM   in reply to Xavi Beumala

    I'm having the same problem. I posted my logs to the bug report page before I found this page, so I wont duplicate them here. See them here:

    http://bugs.adobe.com/jira/browse/FLEXPMD-120

     

    I have no spaces in my project, workspace, PMD commandline jars, or windows user home paths.

     

    The exact same command listed in the console as failing, works when I run it manually on the commandline.

     

    I forgot to mention in the bug, my versions are:

     

    Flash Builder: Version 4.0 (build 253292)
    Eclipse Platform: Version: 3.4.2 Build id: M20090211-1700

    OS: Windows Vista SP2 32-bit

     

    I've tried running FlexPMD both as a build nature (it added no warnings/errors to my flex 'problems' panel) and as a command (the FlexPMD View opens after running it, but it's empty)

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 15, 2010 6:12 PM   in reply to Scruffpuff

    It looks like the problem with mine was not the Windows user account, but the fact that Windows (I'm using Windows 7) was not allowing JAVA to write to the Temp directory. Running Eclipse as Administrator solved my problem.

     

    Hope this helps

     
    |
    Mark as:
1 2 Previous Next

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points