Skip to main content
Inspiring
December 10, 2009
Question

PMD View blank in Flash Builder Beta 2 Standalone

  • December 10, 2009
  • 11 replies
  • 17325 views

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-pmd-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!

This topic has been closed for replies.

11 replies

Participant
August 13, 2012

I'm Sorry my english, i'm Brazilian and can solve this problem following this step:

change your workspace from "C:\Users\xxxxx\Adobe Flash Player" To any folder out from folder Users.

I don't know because work, but work.

Again I'm sorry my english and hope who this help you.

Participating Frequently
January 16, 2010

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

Participating Frequently
January 14, 2010

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\pmd.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

January 15, 2010

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.

Participating Frequently
January 15, 2010

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

robdodsonAuthor
Inspiring
January 4, 2010

Can anyone checkout my log file and let me know if anything stands out as missing or screwed up? I still haven't been able to get PMD to work :/

Participant
December 15, 2009

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.

December 15, 2009

@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

robdodsonAuthor
Inspiring
December 15, 2009

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-bundle-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-/flexpmd672037167065534572dir
Dec 15, 2009 12:53:17 PM com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD process
SEVERE: /var/folders/j2/j2HcmtGIH4iXMynRyqUXGE+++TI/-Tmp-/flexpmd672037167065534572dir/pmd.xml (No such file or directory)

robdodsonAuthor
Inspiring
December 15, 2009

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?

Participating Frequently
December 14, 2009

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

Participating Frequently
December 14, 2009

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

Ben

Participant
December 13, 2009

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

December 12, 2009

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

Known Participant
December 12, 2009

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

December 13, 2009

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

December 11, 2009

Hi,

can you make sure you download FlexPMD 1.0.1 from http://opensource.adobe.com/svn/opensource/flexpmd/maven-repository/release/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

Participating Frequently
December 11, 2009

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

December 11, 2009

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