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!
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
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
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
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
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
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
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
@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
@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
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)
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.
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?
I've filled in the bug http://bugs.adobe.com/jira/browse/FLEXPMD-127
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)
@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
I switched workspaces by going to File > Switch workspace and then chose one which did not have any spaces (by default my workspace said Adobe Flash Builder Beta 2). I imported my preferences and tried to run PMD on a project I'm sure is full of problems. Still getting a blank view though. Is there more to switching workspaces than the steps I've listed?
*Edit*
Just to clarify, my new workspace path is Users/{myName}/Projects
When I go to Preferences > General > Workspace > Linked Resources
I see only 1 entry which reads DOCUMENTS - /Users/{myName}/Documents/Adobe Flash Builder Beta 2
Does this need to be changed as well?
I don't have Flash Builder installed as an Eclipse plugin, rather I'm using the stand alone version. So I ran Flash Builder Beta 2 debug from the command line. Hope that's correct. Here's the output I got when trying to run PMD on a src folder:
Dec 15, 2009 12:53:16 PM com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD process
INFO: java -Xmx256m -jar /Users/robdodson/Tools/FlashBuilder_Plugins/flex-pmd-all-in-one-bundl e-1.0.1/flex-pmd-command-line-1.0.jar -s /Users/robdodson/Projects/015_PUSHY/pushycat_fb_sokoban/trunk/src -o /var/folders/j2/j2HcmtGIH4iXMynRyqUXGE+++TI/-Tmp-/flexpmd672037167065 534572dir
Dec 15, 2009 12:53:17 PM com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD process
SEVERE: /var/folders/j2/j2HcmtGIH4iXMynRyqUXGE+++TI/-Tmp-/flexpmd672037167065 534572dir/pmd.xml (No such file or directory)
the way this pasted into the comment window, at least for me, it looks like there is a space where it says 'dir/ pmd.xml'
however, it doesn't look like there is a space in the command line output, so maybe it's weird text formatting on the part of the forum? just wanted to point that out.
*edit*
it also seems to do it on this line '/Users/robdodson/Tools/FlashBuilder_Plugins/flex-pmd-all-in-one-bund le-1.0.1/fl ex-pmd-command-line-1.0.jar'
where it says flex-pmd-command-line-1.0.jar. But in terminal it does not have extra spaces between the words.
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
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.
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
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)
North America
Europe, Middle East and Africa
Asia Pacific