• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

PMD View blank in Flash Builder Beta 2 Standalone

Participant ,
Dec 10, 2009 Dec 10, 2009

Copy link to clipboard

Copied

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!

TOPICS
FlexPMD

Views

16.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 13, 2009 Dec 13, 2009

Copy link to clipboard

Copied

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

/ M

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 13, 2009 Dec 13, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 14, 2009 Dec 14, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 14, 2009 Dec 14, 2009

Copy link to clipboard

Copied

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

Ben

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 14, 2009 Dec 14, 2009

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 15, 2009 Dec 15, 2009

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 15, 2009 Dec 15, 2009

Copy link to clipboard

Copied

@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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 15, 2009 Dec 15, 2009

Copy link to clipboard

Copied

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 15, 2009 Dec 15, 2009

Copy link to clipboard

Copied

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-bundle-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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 03, 2010 Jan 03, 2010

Copy link to clipboard

Copied

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 😕

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 14, 2010 Jan 14, 2010

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 15, 2010 Jan 15, 2010

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 15, 2010 Jan 15, 2010

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 15, 2010 Jan 15, 2010

Copy link to clipboard

Copied

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 16, 2010 Jan 16, 2010

Copy link to clipboard

Copied


You need to ADD the following parameter in the Eclipse FlexPMD preferences, under "Java command line":
-Djava.io.tmpdir=C:\Users\XXX\AppData\Local\Temp
(replace the path above to point to your TEMP directory)

Thanks to Catalin Buzolu for this workaround.

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 15, 2010 Jan 15, 2010

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 13, 2012 Aug 13, 2012

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines