|
Note: FlexPMD plugin requires FlexPMD v.1.0.1 Make sure you download the latest version FlexPMD eclipse pluginFlexPMD eclipse plugin is a beta release that targets two different type of users with two different goals:
If you find any problem or want to submit any feature request feel free to log it in in the bugbase http://bugs.adobe.com/jira
1. InstallationAt the moment the plugin has been tested in the following environments:
The plugin has to be installed following the standard Eclipse update mechanism. Open eclipse and follow these steps:
2. Configure FlexPMD pluginBefore using the plugin you will have to configure FlexPMD on eclipse preferences so that FlexPMD and FlexCPD jars, among other things, are properly referenced.
3. Supported workflows3.1 Code review workflowOnce FlexPMD is properly configured you'll be able to run FlexPMD on any folder and see the violations in the FlexPMD View.
At this point the FlexPMD View will appear displaying the results grouped by violation.
In this view you will be able to double click the files containing the violations, they will be opened in the apropiate FlashBuilder editor. If you prefer you can group the violations based on the class they apply to. In this case double clicking the child nodes will open the file and navigate to the affected line, double clicking on the class node will open the file.
Group by Class is an interesting filter if you're looking at how certain areas of your code are affected. Group by Violation filter is handy when you want to know how the violation's distribution looks like. All violations will be added as markers to the source classes as errors, warnings or info messages. After looking at the report you can always get rid of the markers by right clicking on a project and select FlexPMD > Clean FlexPMD markers. Additionally you can remove a concrete error by right-clicking on it and selecting delete. 3.2 Development workflowIf you're interested in a more interactive and integrated development workflow you can add to your project a FlexPMDNature.
Note: If at any point you want to remove the nature you can selecte FlexPMD > Remove FlexPMD Nature After building your project (fully or incrementally) FlexPMD will be executed and violations will be listed in the standard problems view
Double clicking the errors, warnings or info markers will open the file in FlashBuilder editors. You'll see the markers inline in the files as well:
4. FlexPMD OutlineIn the FlexPMD Outline View you'll see the violations in the currently opened editor.
If the arrows button is toggled, whenever the file is saved FlexPMD will be re-executed on it and the Outline will be updated providing always up-to-date information to the developer with very little delay and without having to compile the entire project. Double clicking on any violation will navigate to it in the editor. It's important to note that the OutlineView works on any project, not only the ones with a FlexPMDNature. If you open a .as or .mxml file in a project that doesn't have flexPmdNature and the OutlinView has the monitorize option toggled, after the first save the outline will be updated. 5. FlexCPD integrationYou can execute FlexCPD by right-click in a source folder and select FlexPMD > Find suspect cut & paste. The FlexCPD view will be automatically opened displaying the results.
6. Usage strategiesIt's very likely that when you start using FlexPMD on your projects you'll get lots of violations. This can by several reasons. Below you'll find some tricks you can use in order to make FlexPMD more useful by avoiding unnecessary noise. 6.1 Fine tune your rulesetIf you define a violation in your ruleset as an error the plugin will re-inforce the rule by breaking your build. Whenever you try to run your project you'll get a message telling you there're errors in the project and prompting you if you want to continue. Even though you will be able to continue the execution it's not a good practice. If you operate this way, in could be the case that, compilation errors would be swallowed by FlexPMD errors. Make sure you have a good flexPMD error strategy defined in your ruleset and make sure your team follows it. If accordingly to your strategy there's a FlexPMD error you have to fix it before continuing. 6.2 Filtering problemsOnce you add the FlexPMD nature or execute FlexPMD on any folder the violations will be reported as standard markers and errors in the standard Eclipse errors view. This means that if your ruleset defines a certain violation as an error your project will have an error and will complain when trying to run it. As displayed in the image below, FlexPMD errors, warnings and info messages are displayed all together with Flex compiler errors. This, in lots of cases, can distract developers and swallow important compiler notifications. Although not specific to the FlexPMD plugin, there's an easy way to create a specialised view for only displaying FlexPMD issues. To do so, use the following steps:
In the configuration dialog select
Then in the standard "Problems View" follow the same process to filter out "FlexPMD errors". Uncheck its type from the types list. 6.3 Projects with lots of violationsMost probably, even though you have customised and fine tuned your ruleset, you'll get error violations in your projects that will distract you while developing. In most cases it might not be an option to invest time on fixing these violations thus reducing the FlexPMD added value. Here's what the plugin can do for you in these cases. Don't add flexPMDNature to your project. This will prevent flexPMD from scanning and reporting violations on the entire project.
7. Upcoming features in future releases
8. Known issues
9. Where can I get the logsIf you have any problem you can ask for help in the forums. For a quicker resolution please make sure you've read the Known issues section above and that you provide the following information:
|
|











