├── .ci ├── README.md └── files │ └── regenerate_metadata.sh ├── .github ├── actions │ └── setup │ │ └── action.yml ├── dependabot.yml └── workflows │ ├── build-pr.yml │ ├── build-release.yml │ ├── build-snapshot.yml │ ├── build.yml │ ├── publish-release.yml │ └── publish-snapshot.yml ├── .gitignore ├── .mvn └── wrapper │ └── maven-wrapper.properties ├── CHANGES.TXT ├── LICENSE.md ├── README.md ├── ReleaseNotes.md ├── do-release.sh ├── mvnw ├── mvnw.cmd ├── net.sourceforge.pmd.eclipse.p2updatesite ├── category.xml ├── pom.xml └── src │ └── main │ └── resources │ └── category.xml ├── net.sourceforge.pmd.eclipse.plugin.test.fragment ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── fragment.xml ├── pom.xml └── src │ └── main │ ├── java │ └── test │ │ └── RuleSetsExtension.java │ └── resources │ └── rulesets │ ├── extra1.xml │ └── extra2.xml ├── net.sourceforge.pmd.eclipse.plugin.test ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── plugin.xml ├── pom.xml └── src │ └── main │ ├── java │ └── net │ │ └── sourceforge │ │ └── pmd │ │ └── eclipse │ │ ├── AbstractSWTBotTest.java │ │ ├── BasicPMDTest.java │ │ ├── EclipseUtils.java │ │ ├── LoggingRule.java │ │ ├── core │ │ ├── PMDCorePluginTest.java │ │ ├── RuleSetManagerTest.java │ │ └── ext │ │ │ └── RuleSetsExtensionProcessorTest.java │ │ ├── internal │ │ ├── ResourceUtil.java │ │ ├── RuleSetAssertUtil.java │ │ └── TestActivator.java │ │ ├── runtime │ │ ├── builder │ │ │ └── PMDNatureTest.java │ │ ├── cmd │ │ │ ├── DetectCutAndPasteCmdTest.java │ │ │ ├── MultipleRulesetsTest.java │ │ │ ├── RenderReportCmdTest.java │ │ │ ├── ReviewCmdTest.java │ │ │ └── ReviewCodeCmdNonJavaTest.java │ │ ├── preferences │ │ │ └── impl │ │ │ │ ├── ChangeGlobalRuleSetExternallyTest.java │ │ │ │ ├── PreferencesChangedExternallyTest.java │ │ │ │ └── PreferencesManagerImplTest.java │ │ └── properties │ │ │ ├── ProjectPropertiesModelTest.java │ │ │ └── impl │ │ │ ├── ProjectPropertiesImplTest.java │ │ │ └── ProjectPropertiesManagerImplTest.java │ │ ├── ui │ │ ├── actions │ │ │ ├── PMDCheckActionTest.java │ │ │ ├── PMDGenerateASTActionTest.java │ │ │ └── internal │ │ │ │ └── InternalRuleSetUtilTest.java │ │ ├── dialogs │ │ │ └── ViolationDetailsDialogTest.java │ │ ├── preferences │ │ │ └── br │ │ │ │ ├── PMDPreferencePage2Test.java │ │ │ │ └── RuleUIUtilTest.java │ │ └── properties │ │ │ ├── ExternalRuleSetFileTest.java │ │ │ ├── PMDProjectPropertyPageTest.java │ │ │ └── UpdateProjectPropertiesCmdTest.java │ │ └── util │ │ └── internal │ │ └── StringUtilTest.java │ └── resources │ ├── net │ └── sourceforge │ │ └── pmd │ │ └── eclipse │ │ ├── runtime │ │ ├── cmd │ │ │ └── multiplerulesets │ │ │ │ ├── first │ │ │ │ └── First.java │ │ │ │ ├── ruleset1.xml │ │ │ │ ├── ruleset2.xml │ │ │ │ ├── second │ │ │ │ └── Second.java │ │ │ │ └── third │ │ │ │ └── Third.java │ │ ├── preferences │ │ │ └── impl │ │ │ │ ├── pmd.prefs │ │ │ │ └── test-ruleset.xml │ │ └── properties │ │ │ └── impl │ │ │ └── projectproperties.xml │ │ └── ui │ │ └── properties │ │ ├── pmd-properties │ │ ├── ruleset1.xml │ │ └── ruleset2.xml │ └── test.template ├── net.sourceforge.pmd.eclipse.plugin ├── CREDITS.txt ├── LICENSE.txt ├── META-INF │ └── MANIFEST.MF ├── TODO.txt ├── about.ini ├── about.mappings ├── about.properties ├── build.properties ├── checkstyle-suppressions.xml ├── doc │ └── howto │ │ ├── confpmd.html │ │ ├── css │ │ ├── inst.css │ │ ├── ns4_only.css │ │ ├── print.css │ │ └── tigris.css │ │ ├── fragment.html │ │ ├── images │ │ ├── corporate_logo.gif │ │ ├── file.gif │ │ ├── folder-closed.gif │ │ ├── folder-open.gif │ │ ├── help_logo.gif │ │ ├── icon_alert.gif │ │ ├── icon_alertsml.gif │ │ ├── icon_arrowfolder1_sml.gif │ │ ├── icon_arrowfolder2_sml.gif │ │ ├── icon_arrowfolderclosed1_sml.gif │ │ ├── icon_arrowfolderopen2_sml.gif │ │ ├── icon_arrowmembers1_sml.gif │ │ ├── icon_arrowmembers2_sml.gif │ │ ├── icon_arrowusergroups1_sml.gif │ │ ├── icon_arrowusergroups2_sml.gif │ │ ├── icon_arrowwaste1_sml.gif │ │ ├── icon_arrowwaste2_sml.gif │ │ ├── icon_confirmsml.gif │ │ ├── icon_doc_lrg.gif │ │ ├── icon_doc_sml.gif │ │ ├── icon_error_lrg.gif │ │ ├── icon_error_sml.gif │ │ ├── icon_folder_lrg.gif │ │ ├── icon_folder_sml.gif │ │ ├── icon_help_lrg.gif │ │ ├── icon_help_sml.gif │ │ ├── icon_info_lrg.gif │ │ ├── icon_info_sml.gif │ │ ├── icon_infosml.gif │ │ ├── icon_members_lrg.gif │ │ ├── icon_members_sml.gif │ │ ├── icon_sortdown.gif │ │ ├── icon_sortleft.gif │ │ ├── icon_sortright.gif │ │ ├── icon_sortup.gif │ │ ├── icon_success_lrg.gif │ │ ├── icon_success_sml.gif │ │ ├── icon_usergroups_lrg.gif │ │ ├── icon_usergroups_sml.gif │ │ ├── icon_warning_lrg.gif │ │ ├── icon_warning_sml.gif │ │ ├── icon_waste_lrg.gif │ │ ├── icon_waste_sml.gif │ │ ├── nw_maj.gif │ │ ├── nw_maj_hi.gif │ │ ├── nw_maj_rond.gif │ │ ├── nw_med.gif │ │ ├── nw_med_hi.gif │ │ ├── nw_med_rond.gif │ │ ├── nw_min.gif │ │ ├── nw_min_036.gif │ │ ├── nw_min_hi.gif │ │ ├── pmd │ │ │ ├── file.gif │ │ │ ├── prio_1.gif │ │ │ ├── prio_2.gif │ │ │ ├── prio_3.gif │ │ │ ├── prio_4.gif │ │ │ ├── prio_5.gif │ │ │ ├── prj.gif │ │ │ └── remvio.gif │ │ ├── poweredby_036.gif │ │ ├── product_logo.gif │ │ ├── se_maj_rond.gif │ │ ├── strich.gif │ │ ├── sw_maj_rond.gif │ │ ├── sw_med_rond.gif │ │ └── sw_min.gif │ │ ├── reportbugs.html │ │ ├── reviewrule.html │ │ ├── usecpd.html │ │ ├── usepmd.html │ │ └── usepmdlarge.html ├── icons │ ├── add.gif │ ├── btn_calculate.gif │ ├── btn_collapse.gif │ ├── btn_diamond_white.png │ ├── btn_dot_white.png │ ├── btn_expand.gif │ ├── btn_filemarkers.gif │ ├── btn_files.gif │ ├── btn_markerfiles.gif │ ├── btn_packfiles.gif │ ├── btn_prio0.png │ ├── btn_prio1.gif │ ├── btn_prio2.gif │ ├── btn_prio3.gif │ ├── btn_prio4.gif │ ├── btn_prio5.gif │ ├── btn_quickfix.gif │ ├── btn_refresh.gif │ ├── btn_remvio.gif │ ├── btn_review.gif │ ├── checkAll.png │ ├── delete.gif │ ├── downArrow.png │ ├── editTool.png │ ├── error.gif │ ├── export.gif │ ├── file.gif │ ├── filter.gif │ ├── filter_r.png │ ├── filter_x.png │ ├── forbidden.png │ ├── icon_cpd.gif │ ├── icon_dataflow.png │ ├── icon_empty.png │ ├── icon_filter.png │ ├── icon_greenCheck.png │ ├── icon_outline.gif │ ├── icon_overview.gif │ ├── icon_run.gif │ ├── icon_spinningArrows.png │ ├── import.gif │ ├── info.gif │ ├── lab_arrdn.gif │ ├── lab_arrup.gif │ ├── lab_err1.gif │ ├── lab_err2.gif │ ├── lab_err3.gif │ ├── lab_err4.gif │ ├── lab_err5.gif │ ├── lab_errdfa.gif │ ├── lab_error.gif │ ├── lab_info.gif │ ├── lab_warn.gif │ ├── markerP1.png │ ├── markerP2.png │ ├── markerP3.png │ ├── markerP4.png │ ├── markerP5.png │ ├── obj_javacu.gif │ ├── obj_package.gif │ ├── obj_project.gif │ ├── ok.gif │ ├── pmd-icon-16.gif │ ├── pmd-icon-32.gif │ ├── prio_1.gif │ ├── prio_2.gif │ ├── prio_3.gif │ ├── prio_4.gif │ ├── prio_5.gif │ ├── prj.gif │ ├── remvio.gif │ ├── sortChecked.png │ ├── uncheckAll.png │ ├── upArrow.png │ └── warn.gif ├── messages.properties ├── nl │ └── fr │ │ ├── messages.properties │ │ └── welcome.xml ├── plugin.properties ├── plugin.xml ├── plugin_bg.properties ├── plugin_fr.properties ├── plugin_it.properties ├── plugin_ru.properties ├── plugin_tr.properties ├── pom.xml ├── schema │ └── rulesets.exsd ├── src │ └── main │ │ ├── java │ │ └── net │ │ │ └── sourceforge │ │ │ └── pmd │ │ │ └── eclipse │ │ │ ├── core │ │ │ ├── IRuleSetManager.java │ │ │ ├── IRuleSetsExtension.java │ │ │ ├── PMDCoreException.java │ │ │ ├── ext │ │ │ │ └── RuleSetsExtensionProcessor.java │ │ │ ├── impl │ │ │ │ └── RuleSetManagerImpl.java │ │ │ └── internal │ │ │ │ └── FileModificationUtil.java │ │ │ ├── logging │ │ │ └── internal │ │ │ │ ├── EclipseLogAppender.java │ │ │ │ ├── JulLoggingHandler.java │ │ │ │ └── LogbackConfiguration.java │ │ │ ├── plugin │ │ │ ├── FileChangeReviewer.java │ │ │ ├── PMDPlugin.java │ │ │ └── UISettings.java │ │ │ ├── runtime │ │ │ ├── PMDRuntimeConstants.java │ │ │ ├── builder │ │ │ │ ├── MarkerUtil.java │ │ │ │ ├── PMDBuilder.java │ │ │ │ └── PMDNature.java │ │ │ ├── cmd │ │ │ │ ├── AbstractDefaultCommand.java │ │ │ │ ├── AbstractProjectCommand.java │ │ │ │ ├── BaseVisitor.java │ │ │ │ ├── BuildProjectCommand.java │ │ │ │ ├── CPDVisitor.java │ │ │ │ ├── DeleteMarkersCommand.java │ │ │ │ ├── DeltaVisitor.java │ │ │ │ ├── DetectCutAndPasteCmd.java │ │ │ │ ├── DisableRuleHandler.java │ │ │ │ ├── FakeRuleViolation.java │ │ │ │ ├── JavaProjectClassLoader.java │ │ │ │ ├── JobCommandProcessor.java │ │ │ │ ├── MarkerInfo2.java │ │ │ │ ├── RenderReportsCmd.java │ │ │ │ ├── ResourceVisitor.java │ │ │ │ ├── ReviewCodeCmd.java │ │ │ │ ├── ReviewResourceForRuleCommand.java │ │ │ │ └── internal │ │ │ │ │ ├── CpdMarkWithSourceCode.java │ │ │ │ │ ├── CpdMatchWithSourceCode.java │ │ │ │ │ └── CpdResult.java │ │ │ ├── preferences │ │ │ │ ├── IPreferences.java │ │ │ │ ├── IPreferencesFactory.java │ │ │ │ ├── IPreferencesManager.java │ │ │ │ └── impl │ │ │ │ │ ├── PreferenceUIStore.java │ │ │ │ │ ├── PreferencesFactoryImpl.java │ │ │ │ │ ├── PreferencesImpl.java │ │ │ │ │ └── PreferencesManagerImpl.java │ │ │ ├── properties │ │ │ │ ├── IProjectProperties.java │ │ │ │ ├── IProjectPropertiesManager.java │ │ │ │ ├── IPropertiesFactory.java │ │ │ │ ├── PropertiesException.java │ │ │ │ └── impl │ │ │ │ │ ├── ProjectPropertiesImpl.java │ │ │ │ │ ├── ProjectPropertiesManagerImpl.java │ │ │ │ │ ├── ProjectPropertiesTO.java │ │ │ │ │ ├── ProjectPropertiesTimestampTupel.java │ │ │ │ │ ├── PropertiesFactoryImpl.java │ │ │ │ │ └── RuleSpecTO.java │ │ │ └── writer │ │ │ │ ├── IAstWriter.java │ │ │ │ ├── IRuleSetWriter.java │ │ │ │ ├── IWriterFactory.java │ │ │ │ ├── WriterException.java │ │ │ │ └── impl │ │ │ │ ├── AstWriterImpl.java │ │ │ │ ├── RuleSetWriterImpl.java │ │ │ │ └── WriterFactoryImpl.java │ │ │ ├── search │ │ │ └── RuleSearchPage.java │ │ │ ├── ui │ │ │ ├── AbstractColumnDescriptor.java │ │ │ ├── BasicTableLabelProvider.java │ │ │ ├── ColumnDescriptor.java │ │ │ ├── IndexedString.java │ │ │ ├── ItemColumnDescriptor.java │ │ │ ├── ItemFieldAccessor.java │ │ │ ├── ItemFieldAccessorAdapter.java │ │ │ ├── LabelProvider.java │ │ │ ├── ModifyListener.java │ │ │ ├── PMDMarkerImageProvider.java │ │ │ ├── PMDUiConstants.java │ │ │ ├── PageBuilder.java │ │ │ ├── RuleLabelDecorator.java │ │ │ ├── Shape.java │ │ │ ├── ShapeDescriptor.java │ │ │ ├── ShapePainter.java │ │ │ ├── ShapePicker.java │ │ │ ├── StringArranger.java │ │ │ ├── actions │ │ │ │ ├── AbstractUIAction.java │ │ │ │ ├── CPDCheckProjectAction.java │ │ │ │ ├── ClearReviewsAction.java │ │ │ │ ├── GenerateReportAction.java │ │ │ │ ├── PMDCheckAction.java │ │ │ │ ├── PMDGenerateASTAction.java │ │ │ │ ├── PMDRemoveMarkersAction.java │ │ │ │ ├── ReviewCodeHandler.java │ │ │ │ ├── RuleSetUtil.java │ │ │ │ ├── ShowDataflowAction.java │ │ │ │ └── internal │ │ │ │ │ └── InternalRuleSetUtil.java │ │ │ ├── dialogs │ │ │ │ ├── CPDCheckDialog.java │ │ │ │ ├── NewPropertyDialog.java │ │ │ │ ├── ViolationDetailsDialog.java │ │ │ │ └── ViolationDetailsDialogPage.java │ │ │ ├── editors │ │ │ │ ├── BasicLineStyleListener.java │ │ │ │ ├── StyleExtractor.java │ │ │ │ ├── SyntaxData.java │ │ │ │ ├── SyntaxManager.java │ │ │ │ └── TextChange.java │ │ │ ├── filters │ │ │ │ ├── BasicAccessor.java │ │ │ │ ├── FilterColumnUI.java │ │ │ │ ├── FilterHolder.java │ │ │ │ └── FilterPreferencesPage.java │ │ │ ├── model │ │ │ │ ├── AbstractPMDRecord.java │ │ │ │ ├── DataflowMethodRecord.java │ │ │ │ ├── FileRecord.java │ │ │ │ ├── FileToMarkerRecord.java │ │ │ │ ├── FolderRecord.java │ │ │ │ ├── MarkerRecord.java │ │ │ │ ├── PackageRecord.java │ │ │ │ ├── ProjectRecord.java │ │ │ │ ├── RepositoryUtil.java │ │ │ │ └── RootRecord.java │ │ │ ├── nls │ │ │ │ ├── StringKeys.java │ │ │ │ └── StringTable.java │ │ │ ├── preferences │ │ │ │ ├── AbstractStructuredContentProvider.java │ │ │ │ ├── AbstractTableLabelProvider.java │ │ │ │ ├── CPDPreferencePage.java │ │ │ │ ├── GeneralPreferencesPage.java │ │ │ │ ├── IconSelector.java │ │ │ │ ├── RuleDupeChecker.java │ │ │ │ ├── RuleLabelProvider.java │ │ │ │ ├── RuleSetContentProvider.java │ │ │ │ ├── RuleSetExcludeIncludePattern.java │ │ │ │ ├── RuleSetExcludeIncludePatternContentProvider.java │ │ │ │ ├── RuleSetExcludeIncludePatternLabelProvider.java │ │ │ │ ├── RuleSetSelectionDialog.java │ │ │ │ ├── RuleTableViewerSorter.java │ │ │ │ ├── br │ │ │ │ │ ├── AbstractPMDPreferencePage.java │ │ │ │ │ ├── AbstractRuleColumnDescriptor.java │ │ │ │ │ ├── AbstractTableManager.java │ │ │ │ │ ├── AbstractTreeTableManager.java │ │ │ │ │ ├── BUGs.txt │ │ │ │ │ ├── BasicRuleFieldAccessor.java │ │ │ │ │ ├── BasicRuleSetFieldAccessor.java │ │ │ │ │ ├── BasicTableManager.java │ │ │ │ │ ├── BasicValueFormatter.java │ │ │ │ │ ├── CellPainterBuilder.java │ │ │ │ │ ├── EditorFactory.java │ │ │ │ │ ├── FormatManager.java │ │ │ │ │ ├── IconColumnDescriptor.java │ │ │ │ │ ├── ImageColumnDescriptor.java │ │ │ │ │ ├── ImplementationType.java │ │ │ │ │ ├── MarkerColumnsUI.java │ │ │ │ │ ├── PMDPreferencePage2.java │ │ │ │ │ ├── PropertyChangeListener.java │ │ │ │ │ ├── RuleCollection.java │ │ │ │ │ ├── RuleColumnDescriptor.java │ │ │ │ │ ├── RuleFieldAccessor.java │ │ │ │ │ ├── RuleGroup.java │ │ │ │ │ ├── RuleLabelProvider.java │ │ │ │ │ ├── RuleSelection.java │ │ │ │ │ ├── RuleSelectionListener.java │ │ │ │ │ ├── RuleSetFieldAccessor.java │ │ │ │ │ ├── RuleSetTreeItemProvider.java │ │ │ │ │ ├── RuleTableColumns.java │ │ │ │ │ ├── RuleTableManager.java │ │ │ │ │ ├── RuleUIUtil.java │ │ │ │ │ ├── RuleUtil.java │ │ │ │ │ ├── RuleVisitor.java │ │ │ │ │ ├── SimpleColumnDescriptor.java │ │ │ │ │ ├── SizeChangeListener.java │ │ │ │ │ ├── SortListener.java │ │ │ │ │ ├── TODO items │ │ │ │ │ ├── TextColumnDescriptor.java │ │ │ │ │ ├── TreeUtil.java │ │ │ │ │ ├── UI_BUGs.txt │ │ │ │ │ ├── ValueChangeListener.java │ │ │ │ │ ├── ValueFormatter.java │ │ │ │ │ └── ValueResetHandler.java │ │ │ │ ├── editors │ │ │ │ │ ├── AbstractEditorFactory.java │ │ │ │ │ ├── AbstractMultiValueEditorFactory.java │ │ │ │ │ ├── AbstractNumericEditorFactory.java │ │ │ │ │ ├── AbstractRealNumberEditor.java │ │ │ │ │ ├── BooleanEditorFactory.java │ │ │ │ │ ├── CharacterEditorFactory.java │ │ │ │ │ ├── DoubleEditorFactory.java │ │ │ │ │ ├── EnumerationEditorFactory.java │ │ │ │ │ ├── FilePicker.java │ │ │ │ │ ├── IntegerEditorFactory.java │ │ │ │ │ ├── MethodPicker.java │ │ │ │ │ ├── MultiEnumerationEditorFactory.java │ │ │ │ │ ├── MultiIntegerEditorFactory.java │ │ │ │ │ ├── MultiStringEditorFactory.java │ │ │ │ │ ├── RegexEditorFactory.java │ │ │ │ │ ├── SWTUtil.java │ │ │ │ │ ├── StringEditorFactory.java │ │ │ │ │ └── TypeText.java │ │ │ │ ├── internal │ │ │ │ │ ├── AbstractEditorFactory.java │ │ │ │ │ └── PropertyEditorFactory.java │ │ │ │ └── panelmanagers │ │ │ │ │ ├── AbstractRulePanelManager.java │ │ │ │ │ ├── Configuration.java │ │ │ │ │ ├── CreateRuleWizard.java │ │ │ │ │ ├── DescriptionPanelManager.java │ │ │ │ │ ├── EditorUsageMode.java │ │ │ │ │ ├── ExamplePanelManager.java │ │ │ │ │ ├── ExclusionPanelManager.java │ │ │ │ │ ├── FormArranger.java │ │ │ │ │ ├── ListManager.java │ │ │ │ │ ├── PerRulePropertyPanelManager.java │ │ │ │ │ ├── QuickFixPanelManager.java │ │ │ │ │ ├── RulePanelManager.java │ │ │ │ │ ├── RulePropertyManager.java │ │ │ │ │ ├── RuleTarget.java │ │ │ │ │ ├── SummaryPanelManager.java │ │ │ │ │ └── XPathPanelManager.java │ │ │ ├── priority │ │ │ │ ├── PriorityColumnUI.java │ │ │ │ ├── PriorityDescriptor.java │ │ │ │ ├── PriorityDescriptorCache.java │ │ │ │ └── PriorityDescriptorIcon.java │ │ │ ├── properties │ │ │ │ ├── MarkerPropertyTester.java │ │ │ │ ├── PMDMarkerPropertyPage.java │ │ │ │ ├── PMDProjectPropertyPage.java │ │ │ │ ├── PMDPropertyPageBean.java │ │ │ │ ├── PMDPropertyPageController.java │ │ │ │ └── UpdateProjectPropertiesCmd.java │ │ │ ├── quickfix │ │ │ │ ├── AbstractFix.java │ │ │ │ ├── CommentOutLineFix.java │ │ │ │ ├── DeleteLineFix.java │ │ │ │ ├── Fix.java │ │ │ │ ├── PMDResolution.java │ │ │ │ ├── PMDResolutionGenerator.java │ │ │ │ └── SearchAndReplace.java │ │ │ ├── reports │ │ │ │ ├── ReportColumnUI.java │ │ │ │ ├── ReportManager.java │ │ │ │ └── ReportPreferencesPage.java │ │ │ └── views │ │ │ │ ├── AbstractPMDPagebookView.java │ │ │ │ ├── AbstractResourceView.java │ │ │ │ ├── AbstractStructureInspectorPage.java │ │ │ │ ├── ChangeEvaluator.java │ │ │ │ ├── ChangeRecord.java │ │ │ │ ├── DataflowResizeAction.java │ │ │ │ ├── PMDPerspective.java │ │ │ │ ├── PriorityFilter.java │ │ │ │ ├── ProjectFilter.java │ │ │ │ ├── RefreshableTablePage.java │ │ │ │ ├── TableColumnSorter.java │ │ │ │ ├── ViewMemento.java │ │ │ │ ├── ViolationOutline.java │ │ │ │ ├── ViolationOutlineContentProvider.java │ │ │ │ ├── ViolationOutlineLabelProvider.java │ │ │ │ ├── ViolationOutlinePage.java │ │ │ │ ├── ViolationOutlinePageBR.java │ │ │ │ ├── ViolationOverview.java │ │ │ │ ├── ViolationOverviewContentProvider.java │ │ │ │ ├── ViolationOverviewDoubleClickListener.java │ │ │ │ ├── ViolationOverviewLabelProvider.java │ │ │ │ ├── ViolationOverviewMenuManager.java │ │ │ │ ├── actions │ │ │ │ ├── AbstractPMDAction.java │ │ │ │ ├── AbstractViolationSelectionAction.java │ │ │ │ ├── CalculateStatisticsAction.java │ │ │ │ ├── CollapseAllAction.java │ │ │ │ ├── DisableRuleAction.java │ │ │ │ ├── ExpandAllAction.java │ │ │ │ ├── MarkerContributionFactory.java │ │ │ │ ├── MarkerMenuFiller.java │ │ │ │ ├── PackageSwitchAction.java │ │ │ │ ├── PriorityFilterAction.java │ │ │ │ ├── ProjectFilterAction.java │ │ │ │ ├── QuickFixAction.java │ │ │ │ ├── RemoveViolationAction.java │ │ │ │ ├── ReviewAction.java │ │ │ │ ├── ReviewResourceAction.java │ │ │ │ ├── ShowViolationDetailsAction.java │ │ │ │ ├── ShowViolationDetailsHandler.java │ │ │ │ └── ViolationPresentationTypeAction.java │ │ │ │ ├── ast │ │ │ │ ├── ASTContentProvider.java │ │ │ │ ├── ASTLabelProvider.java │ │ │ │ ├── ASTPainterHelper.java │ │ │ │ ├── ASTUtil.java │ │ │ │ ├── ASTView.java │ │ │ │ ├── ASTViewPage.java │ │ │ │ ├── CommentUtil.java │ │ │ │ ├── NodeColumnUI.java │ │ │ │ ├── NodeImageDeriver.java │ │ │ │ └── XPathEvaluator.java │ │ │ │ ├── cpd │ │ │ │ ├── CPDView.java │ │ │ │ ├── CPDViewDoubleClickEventListener.java │ │ │ │ ├── CPDViewLabelProvider.java │ │ │ │ └── CPDViewTooltipListener.java │ │ │ │ ├── cpd2 │ │ │ │ ├── CPDView2.java │ │ │ │ ├── CPDViewLabelProvider2.java │ │ │ │ └── CPDViewTooltipListener2.java │ │ │ │ └── dataflow │ │ │ │ ├── DataflowAnomalyTableContentProvider.java │ │ │ │ ├── DataflowAnomalyTableLabelProvider.java │ │ │ │ ├── DataflowAnomalyTableViewer.java │ │ │ │ ├── DataflowGraph.java │ │ │ │ ├── DataflowGraphTable.java │ │ │ │ ├── DataflowGraphTableData.java │ │ │ │ ├── DataflowGraphViewer.java │ │ │ │ ├── DataflowView.java │ │ │ │ └── DataflowViewPage.java │ │ │ └── util │ │ │ ├── AbstractCellPainterBuilder.java │ │ │ ├── ColourManager.java │ │ │ ├── FontBuilder.java │ │ │ ├── ResourceManager.java │ │ │ ├── StyledTextBuilder.java │ │ │ ├── TextAsColourShapeBuilder.java │ │ │ ├── UniqueItemsAsShapeBuilder.java │ │ │ ├── Util.java │ │ │ └── internal │ │ │ ├── IOUtil.java │ │ │ ├── SWTUtil.java │ │ │ ├── SpyingRule.java │ │ │ └── StringUtil.java │ │ └── resources │ │ ├── net │ │ └── sourceforge │ │ │ └── pmd │ │ │ └── eclipse │ │ │ └── ui │ │ │ └── editors │ │ │ ├── c.properties │ │ │ ├── cpp.properties │ │ │ ├── ecmascript.properties │ │ │ ├── fortran77.properties │ │ │ ├── java.properties │ │ │ ├── ruby.properties │ │ │ ├── scala.properties │ │ │ └── xpath.properties │ │ └── properties │ │ ├── CommandProcessorStrategy.properties │ │ └── QuickFix.properties ├── toc.xml └── welcome.xml ├── net.sourceforge.pmd.eclipse ├── build.properties ├── feature.properties ├── feature.xml ├── pmd_logo_small.jpg └── pom.xml ├── pmd-eclipse-plugin.setup ├── pom.xml ├── target-platforms ├── 2024-06.target ├── 2024-06.tpd ├── 2024-09.target ├── 2024-09.tpd ├── 2024-12.target ├── 2024-12.tpd ├── 2025-03.target └── 2025-03.tpd └── test-projects ├── .gitignore ├── project-with-libs ├── project6 │ ├── .classpath │ ├── .gitignore │ ├── .pmd │ ├── .project │ ├── .ruleset │ └── src │ │ └── project6 │ │ ├── Sample1.java │ │ ├── Sample2.java │ │ ├── Sample3.java │ │ └── Sample4.java ├── sample-lib1 │ ├── .classpath │ ├── .gitignore │ ├── .project │ ├── create-jar.jardesc │ └── src │ │ └── sample │ │ └── lib1 │ │ └── MyInterface.java ├── sample-lib2 │ ├── .classpath │ ├── .gitignore │ ├── .project │ └── src │ │ └── sample │ │ └── lib2 │ │ └── MyInterface.java ├── sample-lib3 │ ├── .classpath │ ├── .gitignore │ ├── .project │ ├── create-jar.jardesc │ └── src │ │ └── sample │ │ └── lib3 │ │ └── MyInterface.java └── sample-lib4 │ ├── .classpath │ ├── .gitignore │ ├── .project │ ├── create-jar.jardesc │ └── src │ └── sample │ └── lib4 │ └── MyInterface.java ├── project1 ├── .classpath ├── .gitignore ├── .pmd ├── .project └── src │ └── project1 │ └── TestViolation.java ├── project2 ├── .classpath ├── .gitignore ├── .pmd ├── .project ├── ruleset.xml └── src │ └── project2 │ └── TestViolation.java ├── project3 ├── .gitignore ├── pom.xml └── src │ └── main │ └── java │ └── project3 │ └── TestViolation.java ├── project4 ├── .gitignore ├── pom.xml ├── ruleset1.xml ├── ruleset2.xml └── src │ └── main │ └── java │ └── project4 │ ├── first │ └── First.java │ ├── second │ └── Second.java │ └── third │ └── Third.java ├── project5 ├── .pmd ├── .project └── pack │ └── GlobalClassSample.cls └── readme.md /.ci/README.md: -------------------------------------------------------------------------------- 1 | # Build Scripts for pmd-eclipse-plugin 2 | 3 | ## GPG Signing 4 | 5 | Since 7.9.0, the plugin is signed with the same GPG key, that is used to sign the main PMD artifacts 6 | for maven central. 7 | 8 | See . 9 | 10 | Tycho's [GPG Plugin](https://tycho.eclipseprojects.io/doc/latest/tycho-gpg-plugin/sign-p2-artifacts-mojo.html) 11 | is used for that. 12 | 13 | There is no need anymore to use jar signer and use a real Let's Encrypt certificate. 14 | 15 | **How it works:** 16 | 17 | * The GPG key is only needed for the two workflows `publish-snapshot.yml` and `publish-releases.yml` 18 | * The key is setup with setup-java, the private gpg key is imported from the (secret) environment 19 | variable `PMD_CI_GPG_PRIVATE_KEY`. 20 | * The gpg plugin uses the environment variable `MAVEN_GPG_PASSPHRASE` for the passphrase. This is 21 | configured as well as a secret. The tycho gpg plugin is activated only when profile `sign` is activated. 22 | -------------------------------------------------------------------------------- /.github/actions/setup/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Setup' 2 | description: 'Setup java and xvfb' 3 | 4 | runs: 5 | using: 'composite' 6 | steps: 7 | - name: Set up JDK 21 8 | uses: actions/setup-java@v4 9 | with: 10 | distribution: temurin 11 | java-version: '21' 12 | - name: Cache local Maven repository 13 | uses: actions/cache@v4 14 | with: 15 | path: | 16 | ~/.m2/repository 17 | net.sourceforge.pmd.eclipse.plugin/japicmp-data 18 | # re-cache on changes in the pom and target files 19 | key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', '**/*.target') }} 20 | restore-keys: | 21 | ${{ runner.os }}-maven- 22 | - name: Setup xvfb 23 | if: ${{ runner.os == 'Linux' }} 24 | shell: bash 25 | run: | 26 | #see https://github.com/GabrielBB/xvfb-action 27 | sudo apt-get install --yes xvfb 28 | sudo apt-get install --yes libgtk2.0-0 29 | echo 'xvfb_cmd=xvfb-run --auto-servernum' >> "$GITHUB_ENV" 30 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "maven" 9 | directory: "/" 10 | schedule: 11 | interval: "weekly" 12 | # Allow up to 10 open pull requests for maven dependencies 13 | open-pull-requests-limit: 10 14 | -------------------------------------------------------------------------------- /.github/workflows/build-pr.yml: -------------------------------------------------------------------------------- 1 | name: Build Pull Request 2 | 3 | on: 4 | pull_request: 5 | merge_group: 6 | types: [checks_requested] 7 | 8 | jobs: 9 | build: 10 | name: Build Pull Request 11 | uses: ./.github/workflows/build.yml 12 | -------------------------------------------------------------------------------- /.github/workflows/build-release.yml: -------------------------------------------------------------------------------- 1 | name: Build Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - '**' 7 | workflow_dispatch: 8 | 9 | jobs: 10 | build: 11 | name: Build Release 12 | uses: ./.github/workflows/build.yml 13 | -------------------------------------------------------------------------------- /.github/workflows/build-snapshot.yml: -------------------------------------------------------------------------------- 1 | name: Build Snapshot 2 | 3 | on: 4 | push: 5 | branches: 6 | - '**' 7 | # don't run on dependabot branches. Dependabot will create pull requests, which will then be run instead 8 | - '!dependabot/**' 9 | workflow_dispatch: 10 | schedule: 11 | # build it monthly: At 05:00 on day-of-month 1. 12 | - cron: '0 5 1 * *' 13 | 14 | jobs: 15 | build: 16 | name: Build Snapshot 17 | uses: ./.github/workflows/build.yml 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .settings/ 3 | .project 4 | .classpath 5 | .checkstyle 6 | .pmd 7 | .ruleset 8 | .pmdruleset.xml 9 | net.sourceforge.pmd.eclipse.plugin/japicmp-data 10 | net.sourceforge.pmd.eclipse.plugin.test/screenshots 11 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | wrapperVersion=3.3.2 18 | distributionType=only-script 19 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip 20 | -------------------------------------------------------------------------------- /CHANGES.TXT: -------------------------------------------------------------------------------- 1 | 10-08-2012: 2 | - Fix build: Update MANIFEST.MF Bundle-Version, add js-cvs-12122009.jar, use JDK 1.6 instead of 1.5. Also changed eclipse/plugins/org.eclipse.pde.build_3.8.0.v20110728/scripts/build.xml to set the builderDirectory using pathconvert. This is almost certainly the Wrong Way but has the advantage of working. 3 | - Convert all tests from JUnit 3.x to 4.x. 4 | - Make some failing tests pass. 5 | 6 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.p2updatesite/category.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | PMD Plugin for Eclipse 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.p2updatesite/src/main/resources/category.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | PMD Plugin for Eclipse 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test.fragment/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: PMD eclipse test fragment 4 | Bundle-SymbolicName: net.sourceforge.pmd.eclipse.plugin.test.fragment;singleton:=true 5 | Bundle-Version: 7.15.0.qualifier 6 | Bundle-Vendor: PMD Development Team 7 | Fragment-Host: net.sourceforge.pmd.eclipse.plugin 8 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 9 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test.fragment/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/main/java,src/main/resources 2 | output.. = target/classes/ 3 | bin.includes = .,\ 4 | fragment.xml,\ 5 | META-INF/ 6 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test.fragment/fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test.fragment/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | net.sourceforge.pmd 8 | net.sourceforge.pmd.eclipse.parent 9 | 7.15.0-SNAPSHOT 10 | ../pom.xml 11 | 12 | 13 | net.sourceforge.pmd.eclipse.plugin.test.fragment 14 | eclipse-plugin 15 | 16 | 17 | ${basedir}/../${keystorePath} 18 | 19 | 20 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Version: 7.15.0.qualifier 4 | Import-Package: org.apache.commons.io 5 | Bundle-Name: PMD Test Plugin 6 | Bundle-SymbolicName: net.sourceforge.pmd.eclipse.plugin.test;singleton:=true 7 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 8 | Bundle-Vendor: PMD Development Team 9 | Require-Bundle: org.eclipse.ui, 10 | net.sourceforge.pmd.eclipse.plugin, 11 | org.eclipse.core.runtime, 12 | org.eclipse.core.resources, 13 | org.eclipse.jdt, 14 | org.eclipse.jdt.core, 15 | org.eclipse.jdt.launching, 16 | org.junit, 17 | org.eclipse.swtbot.go, 18 | org.eclipse.jdt.ui, 19 | org.eclipse.ui.navigator.resources 20 | Bundle-Activator: net.sourceforge.pmd.eclipse.internal.TestActivator 21 | Bundle-ActivationPolicy: lazy 22 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = .,\ 2 | META-INF/,\ 3 | plugin.xml 4 | source.. = src/main/java/,src/main/resources 5 | output.. = target/classes/ 6 | additional.bundles = net.sourceforge.pmd.eclipse.plugin.test.fragment 7 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | net.sourceforge.pmd 8 | net.sourceforge.pmd.eclipse.parent 9 | 7.15.0-SNAPSHOT 10 | ../pom.xml 11 | 12 | 13 | net.sourceforge.pmd.eclipse.plugin.test 14 | eclipse-test-plugin 15 | 16 | 17 | ${basedir}/../${keystorePath} 18 | 19 | 20 | 21 | 22 | 23 | org.eclipse.tycho 24 | tycho-surefire-plugin 25 | 26 | 27 | org.eclipse.tycho 28 | target-platform-configuration 29 | 30 | 31 | 32 | 33 | eclipse-plugin 34 | net.sourceforge.pmd.eclipse.plugin.test.fragment 35 | 0.0.0 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/java/net/sourceforge/pmd/eclipse/LoggingRule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse; 6 | 7 | import org.junit.rules.TestWatcher; 8 | import org.junit.runner.Description; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | 12 | public class LoggingRule extends TestWatcher { 13 | 14 | @Override 15 | protected void starting(Description description) { 16 | final Logger LOG = LoggerFactory.getLogger(description.getClassName()); 17 | LOG.debug("\n*\n*\n* Starting test {}\n*\n*\n*", description.getMethodName()); 18 | } 19 | 20 | @Override 21 | protected void finished(Description description) { 22 | final Logger LOG = LoggerFactory.getLogger(description.getClassName()); 23 | LOG.debug("\n*\n*\n* Finished test {}\n*\n*\n*", description.getMethodName()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/java/net/sourceforge/pmd/eclipse/internal/TestActivator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.internal; 6 | 7 | import org.eclipse.core.runtime.IStatus; 8 | import org.eclipse.core.runtime.Status; 9 | import org.eclipse.ui.plugin.AbstractUIPlugin; 10 | import org.slf4j.LoggerFactory; 11 | 12 | import net.sourceforge.pmd.eclipse.plugin.PMDPlugin; 13 | 14 | import ch.qos.logback.classic.Level; 15 | import ch.qos.logback.classic.Logger; 16 | 17 | public class TestActivator extends AbstractUIPlugin { 18 | 19 | public TestActivator() { 20 | PMDPlugin mainPlugin = PMDPlugin.getDefault(); 21 | Object l = LoggerFactory.getLogger("net.sourceforge.pmd"); 22 | if (l instanceof Logger) { 23 | Logger logger = (Logger) l; 24 | logger.setAdditive(true); 25 | logger.setLevel(Level.DEBUG); 26 | } else { 27 | mainPlugin.getLog().log(new Status(IStatus.WARNING, PMDPlugin.PLUGIN_ID, "Couldn't setup logging for tests.")); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/java/net/sourceforge/pmd/eclipse/runtime/builder/PMDNatureTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.builder; 6 | 7 | import org.eclipse.core.resources.IProject; 8 | import org.eclipse.core.resources.IResource; 9 | import org.eclipse.jdt.core.JavaCore; 10 | import org.junit.Assert; 11 | import org.junit.Test; 12 | 13 | import net.sourceforge.pmd.eclipse.EclipseUtils; 14 | 15 | public class PMDNatureTest { 16 | 17 | @Test 18 | public void addPMDNatureForNonJavaProject() throws Exception { 19 | IProject testProject = EclipseUtils.createProject("TestNonJavaProject"); 20 | Assert.assertTrue("A test project cannot be created; the tests cannot be performed.", 21 | testProject != null && testProject.exists() && testProject.isAccessible()); 22 | Assert.assertFalse(testProject.hasNature(JavaCore.NATURE_ID)); 23 | Assert.assertFalse(testProject.hasNature(PMDNature.PMD_NATURE)); 24 | 25 | PMDNature.addPMDNature(testProject, null); 26 | 27 | Assert.assertTrue(testProject.hasNature(PMDNature.PMD_NATURE)); 28 | 29 | if (testProject.exists() && testProject.isAccessible()) { 30 | EclipseUtils.removePMDNature(testProject); 31 | testProject.refreshLocal(IResource.DEPTH_INFINITE, null); 32 | testProject.delete(true, true, null); 33 | testProject = null; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/java/net/sourceforge/pmd/eclipse/runtime/preferences/impl/PreferencesManagerImplTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.preferences.impl; 6 | 7 | import org.junit.Assert; 8 | import org.junit.Test; 9 | 10 | import net.sourceforge.pmd.eclipse.plugin.PMDPlugin; 11 | import net.sourceforge.pmd.eclipse.runtime.preferences.IPreferences; 12 | import net.sourceforge.pmd.eclipse.runtime.preferences.IPreferencesManager; 13 | 14 | public class PreferencesManagerImplTest { 15 | 16 | /** 17 | * See bug https://sourceforge.net/p/pmd/bugs/1184/ 18 | * 19 | * Inactive rules were not stored / loaded 20 | */ 21 | @Test 22 | public void storeAndLoadInactiveRules() { 23 | String ruleName = "LocalVariableCouldBeFinal"; 24 | 25 | IPreferencesManager manager = PMDPlugin.getDefault().getPreferencesManager(); 26 | IPreferences preferences = manager.loadPreferences(); 27 | preferences.isActive(ruleName, false); 28 | manager.storePreferences(preferences); 29 | Assert.assertFalse(preferences.getActiveRuleNames().contains(ruleName)); 30 | 31 | preferences = manager.reloadPreferences(); 32 | Assert.assertFalse(preferences.getActiveRuleNames().contains(ruleName)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/java/net/sourceforge/pmd/eclipse/ui/actions/internal/InternalRuleSetUtilTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | 6 | package net.sourceforge.pmd.eclipse.ui.actions.internal; 7 | 8 | import java.util.Collection; 9 | import java.util.HashSet; 10 | import java.util.Set; 11 | import java.util.regex.Pattern; 12 | 13 | import org.junit.Assert; 14 | import org.junit.Test; 15 | 16 | public class InternalRuleSetUtilTest { 17 | 18 | @Test 19 | public void convertStringPatterns() { 20 | Set stringPatterns = new HashSet<>(); 21 | stringPatterns.add(".*src/main/java.*"); 22 | 23 | Collection patterns = InternalRuleSetUtil.convertStringPatterns(stringPatterns); 24 | Assert.assertEquals(1, patterns.size()); 25 | Assert.assertEquals(stringPatterns.toString(), patterns.toString()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/RuleUIUtilTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | import static org.junit.Assert.assertNotNull; 8 | 9 | import org.junit.Test; 10 | 11 | import net.sourceforge.pmd.eclipse.ui.IndexedString; 12 | import net.sourceforge.pmd.lang.rule.Rule; 13 | import net.sourceforge.pmd.lang.rule.xpath.XPathRule; 14 | import net.sourceforge.pmd.lang.rule.xpath.XPathVersion; 15 | 16 | public class RuleUIUtilTest { 17 | 18 | /** 19 | * There should be no UnsupportedOperationException... 20 | */ 21 | @Test 22 | public void testTndexedPropertyStringFromRule() { 23 | Rule rule = new XPathRule(XPathVersion.DEFAULT, ""); 24 | IndexedString s = RuleUIUtil.indexedPropertyStringFrom(rule); 25 | assertNotNull(s); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/java/net/sourceforge/pmd/eclipse/util/internal/StringUtilTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.util.internal; 6 | 7 | import org.junit.Assert; 8 | import org.junit.Test; 9 | 10 | public class StringUtilTest { 11 | 12 | @Test 13 | public void testMaxCommonLeadingWhitespaceForAll() { 14 | Assert.assertEquals(4, StringUtil.maxCommonLeadingWhitespaceForAll(new String[] { " a", " b" })); 15 | Assert.assertEquals(0, StringUtil.maxCommonLeadingWhitespaceForAll(new String[] { " a", "b" })); 16 | Assert.assertEquals(4, StringUtil.maxCommonLeadingWhitespaceForAll(new String[] { " a", " b" })); 17 | } 18 | 19 | @Test 20 | public void testTrimStartOn() { 21 | Assert.assertArrayEquals(new String[] { "a", "b" }, 22 | StringUtil.trimStartOn(new String[] { " a", " b" }, 4)); 23 | Assert.assertArrayEquals(new String[] { "a", " b" }, 24 | StringUtil.trimStartOn(new String[] { " a", " b" }, 2)); 25 | Assert.assertArrayEquals(new String[] { " a", " b" }, 26 | StringUtil.trimStartOn(new String[] { " a", " b" }, 0)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/resources/net/sourceforge/pmd/eclipse/runtime/cmd/multiplerulesets/first/First.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.cmd.multiplerulesets.first; 6 | 7 | public class First { 8 | 9 | public static boolean isBoolean() { 10 | return true; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/resources/net/sourceforge/pmd/eclipse/runtime/cmd/multiplerulesets/ruleset1.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Rules 10 | 11 | .*/src/main/java/net/sourceforge/pmd/eclipse/runtime/cmd/multiplerulesets/third/.* 12 | 13 | 14 | 1 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/resources/net/sourceforge/pmd/eclipse/runtime/cmd/multiplerulesets/ruleset2.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Custom rule 10 | 11 | .*/src/main/java/net/sourceforge/pmd/eclipse/runtime/cmd/multiplerulesets/second/.* 12 | 13 | 14 | 1 15 | 16 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/resources/net/sourceforge/pmd/eclipse/runtime/cmd/multiplerulesets/second/Second.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.cmd.multiplerulesets.second; 6 | 7 | public class Second { 8 | 9 | public static boolean isBoolean() { 10 | return true; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/resources/net/sourceforge/pmd/eclipse/runtime/cmd/multiplerulesets/third/Third.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.cmd.multiplerulesets.third; 6 | 7 | public class Third { 8 | 9 | public static boolean isBoolean() { 10 | return true; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/resources/net/sourceforge/pmd/eclipse/runtime/preferences/impl/pmd.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | net.sourceforge.pmd.eclipse.plugin.active_rules=DoNotCallSystemExit 3 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/resources/net/sourceforge/pmd/eclipse/runtime/preferences/impl/test-ruleset.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | My custom rules 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/resources/net/sourceforge/pmd/eclipse/runtime/properties/impl/projectproperties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | workingsetname 4 | true 5 | rulesetfile 6 | 7 | .project 8 | 9 | 10 | *.java 11 | 12 | 13 | 14 | JumbledIncrementer 15 | java-basic 16 | 17 | 18 | ForLoopShouldBeWhileLoop 19 | java-basic 20 | 21 | 22 | false 23 | false 24 | true 25 | 26 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/resources/net/sourceforge/pmd/eclipse/ui/properties/pmd-properties: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | .pmd-ruleset.xml 5 | false 6 | true 7 | true 8 | 9 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/resources/net/sourceforge/pmd/eclipse/ui/properties/ruleset1.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | My custom rules 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/resources/net/sourceforge/pmd/eclipse/ui/properties/ruleset2.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | My custom rules 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin.test/src/main/resources/test.template: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | public class Test { 6 | 7 | public static void main(String[] args) { 8 | } 9 | 10 | public void foo() { 11 | try { 12 | // EmptyCatchBlock!! 13 | } catch (Exception e) { 14 | 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/CREDITS.txt: -------------------------------------------------------------------------------- 1 | GREAT THANKS TO ALL CONTRIBUTORS 2 | -------------------------------- 3 | 4 | Ebu smoothed icons 5 | Jacques Lebourgeois fix malformed UTF-8 characters 6 | Eduard Naum fix JDK 1.3 runtime problem 7 | Chris Grindstaff fix SWTException when PMD is run on a file with syntax error 8 | Brian Remedios improvements in the PMDPlugin class 9 | preferences rule table have sortable columns 10 | Pablo Alba enhancements to the Violations View (legacy) 11 | Sven Jacob bug fixes 12 | Joe Freeman new option to control full building per project 13 | 14 | ------------------------------------------ 15 | *** SPECIAL THANKS TO SEBASTIAN RAFFEL *** 16 | ------------------------------------------ 17 | for his great job on the PMD perspective, new views and dataflow analysis support. 18 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/TODO.txt: -------------------------------------------------------------------------------- 1 | ### 2 | ### Short term (before next release) 3 | ### 4 | 5 | ### 6 | ### Medium term (following release, or soon after) 7 | ### 8 | 9 | Refactor plugin projects. Do we really need 5 projects? Can we get by with 2? 10 | There's a whole lot of layers, can we simply things a bit? 11 | 12 | ### 13 | ### Long term (wish list) 14 | ### 15 | 16 | Upgrade plugin code to Java 5. 17 | 18 | Warn if non reference Rule looks like it might be a built-in PMD rule, and ask if replace with reference. On Add? On Import? On Upgrade? 19 | Add Upgrade button, which will check current workspace RuleSet against PMD rules showing differences (new PMD rules, rules in 20 | Allow checking to see what rules from PMD are missing (useful for upgrade process). 21 | Allow auto-enabling newly added/imported Rules in Projects which are not using custom RuleSet, currently they are not selected. 22 | Allow custom RuleSet editing to also take place at project level, instead of just at Workspace level. 23 | 24 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/about.ini: -------------------------------------------------------------------------------- 1 | # about.ini 2 | # contains information about a feature 3 | # java.io.Properties file (ISO 8859-1 with "\" escapes) 4 | # "%key" are externalized strings defined in about.properties 5 | # This file does not need to be translated. 6 | 7 | # Property "aboutText" contains blurb for "About" dialog (translated) 8 | aboutText=%blurb 9 | 10 | # Property "featureImage" contains path to feature image (32x32) 11 | featureImage=icons/pmd-icon-32.gif 12 | 13 | # Property "welcomePage" contains path to welcome page (special XML-based format) 14 | # optional 15 | welcomePage=$nl$/welcome.xml 16 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/about.mappings: -------------------------------------------------------------------------------- 1 | # about.mappings 2 | # contains fill-ins for about.properties 3 | # java.io.Properties file (ISO 8859-1 with "\" escapes) 4 | # This file does not need to be translated. 5 | 6 | 0=@pmd.version@ 7 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/about.properties: -------------------------------------------------------------------------------- 1 | # about.properties 2 | # contains externalized strings for about.ini 3 | # java.io.Properties file (ISO 8859-1 with "\" escapes) 4 | # fill-ins are supplied by about.mappings 5 | # This file should be translated. 6 | 7 | blurb=Eclipse PMD Plugin\n\ 8 | \n\ 9 | Version: {featureVersion}\n\ 10 | PMD Version: {0}\n\ 11 | \n\ 12 | (c) 1997-2025 PMD for Eclipse Development Team\n\ 13 | Visit https://pmd.github.io and https://github.com/pmd/pmd-eclipse-plugin\n\ 14 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/checkstyle-suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/css/print.css: -------------------------------------------------------------------------------- 1 | /* $Id: print.css,v 1.2 2003/04/10 22:58:32 tfahrner Exp $ */ 2 | 3 | #banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks { 4 | display: none; 5 | } 6 | body.docs div.docs { 7 | margin: 0 !important; 8 | border: none !important 9 | } 10 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/corporate_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/corporate_logo.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/file.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/file.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/folder-closed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/folder-closed.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/folder-open.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/folder-open.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/help_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/help_logo.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_alert.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_alert.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_alertsml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_alertsml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowfolder1_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowfolder1_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowfolder2_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowfolder2_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowfolderclosed1_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowfolderclosed1_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowfolderopen2_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowfolderopen2_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowmembers1_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowmembers1_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowmembers2_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowmembers2_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowusergroups1_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowusergroups1_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowusergroups2_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowusergroups2_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowwaste1_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowwaste1_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowwaste2_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_arrowwaste2_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_confirmsml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_confirmsml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_doc_lrg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_doc_lrg.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_doc_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_doc_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_error_lrg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_error_lrg.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_error_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_error_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_folder_lrg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_folder_lrg.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_folder_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_folder_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_help_lrg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_help_lrg.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_help_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_help_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_info_lrg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_info_lrg.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_info_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_info_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_infosml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_infosml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_members_lrg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_members_lrg.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_members_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_members_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_sortdown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_sortdown.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_sortleft.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_sortleft.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_sortright.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_sortright.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_sortup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_sortup.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_success_lrg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_success_lrg.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_success_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_success_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_usergroups_lrg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_usergroups_lrg.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_usergroups_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_usergroups_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_warning_lrg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_warning_lrg.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_warning_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_warning_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_waste_lrg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_waste_lrg.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_waste_sml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/icon_waste_sml.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_maj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_maj.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_maj_hi.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_maj_hi.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_maj_rond.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_maj_rond.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_med.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_med.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_med_hi.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_med_hi.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_med_rond.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_med_rond.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_min.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_min.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_min_036.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_min_036.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_min_hi.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/nw_min_hi.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/file.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/file.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/prio_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/prio_1.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/prio_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/prio_2.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/prio_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/prio_3.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/prio_4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/prio_4.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/prio_5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/prio_5.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/prj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/prj.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/remvio.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/pmd/remvio.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/poweredby_036.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/poweredby_036.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/product_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/product_logo.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/se_maj_rond.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/se_maj_rond.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/strich.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/strich.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/sw_maj_rond.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/sw_maj_rond.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/sw_med_rond.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/sw_med_rond.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/images/sw_min.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/images/sw_min.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/reportbugs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | How to report bugs 10 | 11 | 12 |
13 |
14 |

How to report bugs

15 |

16 | If you find something is not running as you expected and think it's a bug, please 17 | follow the following procedure. 18 |

19 |

20 | The PMD Plugin has a logging facility based on Log4J. The first thing is 21 | to switch the trace level to DEBUG : Go to Window -> Preferences -> PMD and 22 | configure the "Logging options". Also verify the logfile location. Delete then the 23 | logfile first (probably a file called pmd-eclipse.log) to throw away old 24 | informations. 25 |

26 |

27 | Restart Eclipse and try to reproduce the problems. Zip the log file and report the 28 | bug on sourceforge (you need to 29 | be logged in order to submit a bug). 30 | Don't forget to select as module "Eclipse". Attach the 31 | zipped log file to the request. 32 |

33 |

Thanks for your help !

34 |
35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/reviewrule.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/doc/howto/reviewrule.html -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/doc/howto/usecpd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | How to find suspect cut and paste code 10 | 11 | 12 |
13 |
14 |

How to find suspect cut and paste code

15 |

16 | PMD comes with a usefull feature called CPD. CPD stands for Cut and Paste Detector. 17 | It's a tool that scan a set of files and look for suspect code replicas. 18 |

19 |

20 | To check the files of a project, simply select "Find Suspect Cut And Paste" on the 21 | project context menu. After scanning, a report window will be displayed indicating 22 | if duplicate code has been found and where. 23 |

24 |

25 | CPD can be parameterized by the minimum size of the replica. To specify this parameter, 26 | open the workbench preferences dialog and select the PMD->CPD Preferences category. 27 | In the "Minimum tile size" entry field, enter the size specified in number of lines. 28 |

29 |
30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/add.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/add.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_calculate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_calculate.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_collapse.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_diamond_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_diamond_white.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_dot_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_dot_white.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_expand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_expand.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_filemarkers.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_filemarkers.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_files.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_files.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_markerfiles.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_markerfiles.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_packfiles.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_packfiles.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_prio0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_prio0.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_prio1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_prio1.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_prio2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_prio2.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_prio3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_prio3.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_prio4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_prio4.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_prio5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_prio5.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_quickfix.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_quickfix.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_refresh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_refresh.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_remvio.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_remvio.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/btn_review.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/btn_review.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/checkAll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/checkAll.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/delete.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/delete.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/downArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/downArrow.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/editTool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/editTool.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/error.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/export.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/export.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/file.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/file.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/filter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/filter.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/filter_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/filter_r.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/filter_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/filter_x.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/forbidden.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/forbidden.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/icon_cpd.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/icon_cpd.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/icon_dataflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/icon_dataflow.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/icon_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/icon_empty.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/icon_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/icon_filter.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/icon_greenCheck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/icon_greenCheck.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/icon_outline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/icon_outline.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/icon_overview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/icon_overview.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/icon_run.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/icon_run.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/icon_spinningArrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/icon_spinningArrows.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/import.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/import.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/info.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/info.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/lab_arrdn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/lab_arrdn.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/lab_arrup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/lab_arrup.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/lab_err1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/lab_err1.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/lab_err2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/lab_err2.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/lab_err3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/lab_err3.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/lab_err4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/lab_err4.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/lab_err5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/lab_err5.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/lab_errdfa.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/lab_errdfa.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/lab_error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/lab_error.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/lab_info.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/lab_info.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/lab_warn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/lab_warn.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/markerP1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/markerP1.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/markerP2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/markerP2.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/markerP3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/markerP3.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/markerP4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/markerP4.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/markerP5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/markerP5.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/obj_javacu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/obj_javacu.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/obj_package.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/obj_package.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/obj_project.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/obj_project.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/ok.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/ok.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/pmd-icon-16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/pmd-icon-16.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/pmd-icon-32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/pmd-icon-32.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/prio_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/prio_1.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/prio_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/prio_2.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/prio_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/prio_3.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/prio_4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/prio_4.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/prio_5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/prio_5.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/prj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/prj.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/remvio.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/remvio.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/sortChecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/sortChecked.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/uncheckAll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/uncheckAll.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/upArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/upArrow.png -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/icons/warn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/icons/warn.gif -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/nl/fr/messages.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/nl/fr/messages.properties -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/plugin.properties: -------------------------------------------------------------------------------- 1 | # PMD Eclipse Plugin externalized strings 2 | 3 | marker.category = PMD Markers 4 | marker.pmd = PMD Marker 5 | marker.pmd.prio1 = PMD Marker (Prio 1) 6 | marker.pmd.prio2 = PMD Marker (Prio 2) 7 | marker.pmd.prio3 = PMD Marker (Prio 3) 8 | marker.pmd.prio4 = PMD Marker (Prio 4) 9 | marker.pmd.prio5 = PMD Marker (Prio 5) 10 | marker.task = PMD Task Marker 11 | marker.dfa = PMD DFA Marker 12 | 13 | builder.name = PMD Builder 14 | nature.name = PMD Nature 15 | 16 | # PMD Eclipse Plugin externalized strings 17 | 18 | plugin.name = PMD Plug-in 19 | plugin.provider = PMD Project 20 | 21 | keywords.pmd = PMD 22 | 23 | preferences.pmd = PMD 24 | preferences.rulesets = Rule Configuration 25 | preferences.cpd = CPD Preferences 26 | preferences.report = Reports 27 | preferences.filter = File Filters 28 | properties.pmd = PMD 29 | 30 | menu.pmd = PMD 31 | action.checkcpd = Find Suspect Cut And Paste... 32 | action.checkpmd = Check Code 33 | action.clearpmd = Clear Violations 34 | action.clearall = Clear All PMD Violations 35 | action.ast = Generate Abstract Syntax Tree 36 | action.clearreviews = Clear Violation Reviews 37 | action.generatereport = Generate Reports 38 | action.showdataflow = Show Method Dataflow 39 | 40 | view.category = PMD 41 | view.perspective = PMD 42 | view.violation = PMD Violations 43 | view.outline = Violations Outline 44 | view.overview = Violations Overview 45 | view.dataflowview = Dataflow View 46 | view.cpd = CPD View 47 | 48 | action.show_details = Show details... 49 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/plugin_bg.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/plugin_bg.properties -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/plugin_fr.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/plugin_fr.properties -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/plugin_it.properties: -------------------------------------------------------------------------------- 1 | # PMD Eclipse Plugin externalized strings 2 | 3 | plugin.name = PMD UI Plugin 4 | plugin.provider = PMD Team 5 | 6 | preferences.pmd = PMD 7 | preferences.rulesets = Configurazione dei ruoli 8 | preferences.cpd = Preferenze di CPD 9 | properties.pmd = PMD 10 | 11 | marker.pmd = PMD Marker 12 | marker.task = PMD Task Marker 13 | marker.dfa = PMD DFA Marker 14 | 15 | builder.name = PMD Builder 16 | nature.name = Natura di PMD 17 | 18 | menu.pmd = PMD 19 | action.checkcpd = Trova sospetto copia ed incolla 20 | action.checkpmd = Controlla il codice con PMD 21 | action.clearpmd = Svuota violazioni di PMD 22 | action.clearall = Svuota tutte le violazioni di PMD 23 | action.ast = Genera albero sintattico astratto 24 | action.clearreviews = Svuota le violazioni di review 25 | action.generatereport = Genera report 26 | action.showdataflow = Mostra il dataflow del metodo 27 | 28 | view.category = PMD 29 | view.perspective = PMD 30 | view.violation = Violazioni di PMD 31 | view.outline = Violazioni dell'outline 32 | view.overview = Violazioni dell'overview 33 | view.dataflowview = Vedi Dataflow 34 | view.cpdview = Vedi CPD 35 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/plugin_ru.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/plugin_ru.properties -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/plugin_tr.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse.plugin/plugin_tr.properties -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/core/IRuleSetManager.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.core; 6 | 7 | import java.util.Collection; 8 | 9 | import net.sourceforge.pmd.lang.rule.RuleSet; 10 | 11 | /** 12 | * Interface for a rule set manager. A RuleSetManager handle a set of rule sets. 13 | * 14 | * @author Philippe Herlin 15 | * 16 | */ 17 | public interface IRuleSetManager { 18 | 19 | /** 20 | * Register an additional rule set. 21 | * @param ruleSet the ruleset to register 22 | */ 23 | void registerRuleSet(RuleSet ruleSet); 24 | 25 | /** 26 | * Unregister a rule set. 27 | * @param ruleSet the ruleset to unregister 28 | */ 29 | void unregisterRuleSet(RuleSet ruleSet); 30 | 31 | /** 32 | * Gets the additionally registered rulesets. 33 | * @return a set of registered ruleset; this can be empty but never null 34 | */ 35 | Collection getRegisteredRuleSets(); 36 | 37 | /** 38 | * Register a rule set for the default set. 39 | * @param ruleSet the ruleset to register 40 | */ 41 | void registerDefaultRuleSet(RuleSet ruleSet); 42 | 43 | /** 44 | * Unregister a rule set from the default set. 45 | * @param ruleSet the ruleset to unregister 46 | */ 47 | void unregisterDefaultRuleSet(RuleSet ruleSet); 48 | 49 | /** 50 | * Gets the default rulesets. 51 | * @return the plugin default ruleset set 52 | */ 53 | Collection getDefaultRuleSets(); 54 | } 55 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/core/IRuleSetsExtension.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.core; 6 | 7 | import java.util.Set; 8 | 9 | import net.sourceforge.pmd.lang.rule.RuleSet; 10 | 11 | /** 12 | * This is the interface for implementors of the RuleSets extension point. 13 | * 14 | * @author Herlin 15 | * 16 | */ 17 | 18 | public interface IRuleSetsExtension { 19 | 20 | /** 21 | * Allows an extension to add more rules to to completely replace the sets of rulesets. 22 | * @param registeredRuleSets the already registered rulesets (modifiable set) 23 | */ 24 | void registerRuleSets(Set registeredRuleSets); 25 | 26 | /** 27 | * Allows an extension to specify rulesets that has to be loaded when no rulesets has been defined 28 | * for the plugin (for instance, after creating a new workspace). 29 | * @param defaultRuleSets the set of default rulesets (modifiable set) 30 | */ 31 | void registerDefaultRuleSets(Set defaultRuleSets); 32 | } 33 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/core/PMDCoreException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.core; 6 | 7 | /** 8 | * Root exception of the CORE plug-in. 9 | * 10 | * @author Herlin 11 | * 12 | */ 13 | 14 | public class PMDCoreException extends Exception { 15 | 16 | private static final long serialVersionUID = 1L; 17 | 18 | /** 19 | * Default constructor. 20 | */ 21 | public PMDCoreException() { 22 | super(); 23 | } 24 | 25 | /** 26 | * Constructor with a message and a root cause. 27 | * @param arg0 exception message. 28 | * @param arg1 root cause exception. 29 | */ 30 | public PMDCoreException(String arg0, Throwable arg1) { 31 | super(arg0, arg1); 32 | } 33 | 34 | /** 35 | * Constructor with only a message. 36 | * @param arg0 exception message. 37 | */ 38 | public PMDCoreException(String arg0) { 39 | super(arg0); 40 | } 41 | 42 | /** 43 | * Constructor with a root cause exception only. 44 | * @param arg0 root cause exception 45 | */ 46 | public PMDCoreException(Throwable arg0) { 47 | super(arg0); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/core/internal/FileModificationUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.core.internal; 6 | 7 | import java.io.File; 8 | import java.io.IOException; 9 | import java.nio.file.Files; 10 | import java.nio.file.attribute.FileTime; 11 | 12 | import org.slf4j.Logger; 13 | import org.slf4j.LoggerFactory; 14 | 15 | public final class FileModificationUtil { 16 | private static final Logger LOG = LoggerFactory.getLogger(FileModificationUtil.class); 17 | 18 | private FileModificationUtil() { 19 | // utility 20 | } 21 | 22 | public static long getFileModificationTimestamp(File f) { 23 | long result = 0L; 24 | if (f.exists()) { 25 | // Note: File::lastModified() might be not accurate enough, there's this bug: 26 | // https://bugs.openjdk.java.net/browse/JDK-8177809 27 | FileTime filesLastMod; 28 | try { 29 | filesLastMod = Files.getLastModifiedTime(f.toPath()); 30 | result = filesLastMod.toMillis(); 31 | LOG.debug("File {} last mod: {}", f, result); 32 | } catch (IOException e) { 33 | LOG.debug("Error while reading file modification timestamp for {}: {}", f, e.toString()); 34 | } 35 | } 36 | return result; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/cmd/DisableRuleHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.cmd; 6 | 7 | import org.eclipse.core.commands.AbstractHandler; 8 | import org.eclipse.core.commands.ExecutionEvent; 9 | import org.eclipse.core.commands.ExecutionException; 10 | import org.eclipse.ui.handlers.HandlerUtil; 11 | 12 | public class DisableRuleHandler extends AbstractHandler { 13 | 14 | @Override 15 | public Object execute(ExecutionEvent event) throws ExecutionException { 16 | HandlerUtil.getActiveWorkbenchWindow(event).close(); 17 | return null; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/cmd/MarkerInfo2.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.cmd; 6 | 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | import org.eclipse.core.resources.IFile; 11 | import org.eclipse.core.resources.IMarker; 12 | import org.eclipse.core.runtime.CoreException; 13 | 14 | /** 15 | * 16 | * @author Brian Remedios 17 | */ 18 | public class MarkerInfo2 { 19 | 20 | private final String type; 21 | private Map data; 22 | 23 | public MarkerInfo2(String theType, int expectedSize) { 24 | type = theType; 25 | data = new HashMap<>(expectedSize); 26 | } 27 | 28 | public void add(String name, Object value) { 29 | data.put(name, value); 30 | } 31 | 32 | public void add(String name, int value) { 33 | add(name, Integer.valueOf(value)); 34 | } 35 | 36 | public void addAsMarkerTo(IFile file) throws CoreException { 37 | 38 | IMarker marker = file.createMarker(type); 39 | marker.setAttributes(data.keySet().toArray(new String[0]), data.values().toArray()); 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return "MarkerInfo2: rule=" + data.get("rulename") + ", message=" + data.get(IMarker.MESSAGE) + ", line=" 45 | + data.get(IMarker.LINE_NUMBER); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/cmd/ResourceVisitor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.cmd; 6 | 7 | import org.eclipse.core.resources.IResource; 8 | import org.eclipse.core.resources.IResourceVisitor; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | 12 | /** 13 | * This class visits all of the resources in the Eclipse Workspace, and runs PMD 14 | * on them if they happen to be Java files. 15 | * 16 | *

Any violations get tagged onto the file as problems in the tasks list. 17 | * 18 | * @author Philippe Herlin 19 | * 20 | */ 21 | public class ResourceVisitor extends BaseVisitor implements IResourceVisitor { 22 | private static final Logger LOG = LoggerFactory.getLogger(ResourceVisitor.class); 23 | 24 | @Override 25 | public boolean visit(final IResource resource) { 26 | LOG.debug("Visiting resource {}", resource.getName()); 27 | boolean fVisitChildren = true; 28 | 29 | if (this.isCanceled()) { 30 | fVisitChildren = false; 31 | } else { 32 | this.reviewResource(resource); 33 | } 34 | 35 | return fVisitChildren; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/cmd/internal/CpdMarkWithSourceCode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | 6 | package net.sourceforge.pmd.eclipse.runtime.cmd.internal; 7 | 8 | import net.sourceforge.pmd.cpd.Mark; 9 | 10 | public class CpdMarkWithSourceCode { 11 | private final Mark mark; 12 | private final CharSequence sourceCode; 13 | 14 | public CpdMarkWithSourceCode(CpdResult result, Mark mark) { 15 | this.mark = mark; 16 | sourceCode = result.getSourceCodeSlices().get(this.mark); 17 | } 18 | 19 | public Mark getMark() { 20 | return mark; 21 | } 22 | 23 | public CharSequence getSourceCode() { 24 | return sourceCode; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/cmd/internal/CpdMatchWithSourceCode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | 6 | package net.sourceforge.pmd.eclipse.runtime.cmd.internal; 7 | 8 | import java.util.HashMap; 9 | import java.util.Map; 10 | 11 | import net.sourceforge.pmd.cpd.Mark; 12 | import net.sourceforge.pmd.cpd.Match; 13 | 14 | public class CpdMatchWithSourceCode { 15 | private final Match match; 16 | private final Map sourceCodeSlices = new HashMap<>(); 17 | 18 | public CpdMatchWithSourceCode(CpdResult result, Match match) { 19 | this.match = match; 20 | for (Mark mark : this.match.getMarkSet()) { 21 | sourceCodeSlices.put(mark, result.getSourceCodeSlices().get(mark)); 22 | } 23 | } 24 | 25 | public Match getMatch() { 26 | return match; 27 | } 28 | 29 | public Map getSourceCodeSlices() { 30 | return sourceCodeSlices; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/cmd/internal/CpdResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | 6 | package net.sourceforge.pmd.eclipse.runtime.cmd.internal; 7 | 8 | import java.util.ArrayList; 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | import net.sourceforge.pmd.cpd.CPDReport; 14 | import net.sourceforge.pmd.cpd.Mark; 15 | import net.sourceforge.pmd.cpd.Match; 16 | 17 | public class CpdResult { 18 | private List matches = new ArrayList<>(); 19 | private Map sourceCodeSlices = new HashMap<>(); 20 | 21 | public CpdResult(CPDReport report) { 22 | matches.addAll(report.getMatches()); 23 | for (Match match : matches) { 24 | for (Mark mark : match.getMarkSet()) { 25 | sourceCodeSlices.put(mark, report.getSourceCodeSlice(mark)); 26 | } 27 | } 28 | } 29 | 30 | public List getMatches() { 31 | return matches; 32 | } 33 | 34 | public Map getSourceCodeSlices() { 35 | return sourceCodeSlices; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/preferences/IPreferencesFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.preferences; 6 | 7 | /** 8 | * Factory for all the preferences package objects 9 | * 10 | * @author Herlin 11 | * 12 | */ 13 | 14 | public interface IPreferencesFactory { 15 | 16 | /** 17 | * @return the instance of the preferences manager 18 | */ 19 | IPreferencesManager getPreferencesManager(); 20 | 21 | /** 22 | * Return a new instance, not initialized, of a preferences information structure for the 23 | * specified preferences manager. 24 | * @param prefencesManager a instance of a preferences manager 25 | */ 26 | IPreferences newPreferences(IPreferencesManager prefencesManager); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/preferences/impl/PreferencesFactoryImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.preferences.impl; 6 | 7 | import net.sourceforge.pmd.eclipse.runtime.preferences.IPreferences; 8 | import net.sourceforge.pmd.eclipse.runtime.preferences.IPreferencesFactory; 9 | import net.sourceforge.pmd.eclipse.runtime.preferences.IPreferencesManager; 10 | 11 | /** 12 | * This class is an implementation for the factory of the Preferences package objects. 13 | * 14 | * @author Herlin 15 | * 16 | */ 17 | 18 | public class PreferencesFactoryImpl implements IPreferencesFactory { 19 | private IPreferencesManager preferencesManager = null; 20 | 21 | @Override 22 | public IPreferencesManager getPreferencesManager() { 23 | if (preferencesManager == null) { 24 | preferencesManager = new PreferencesManagerImpl(); 25 | } 26 | 27 | return preferencesManager; 28 | } 29 | 30 | @Override 31 | public IPreferences newPreferences(IPreferencesManager thePreferencesManager) { 32 | return new PreferencesImpl(thePreferencesManager); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/properties/IProjectPropertiesManager.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.properties; 6 | 7 | import org.eclipse.core.resources.IProject; 8 | 9 | /** 10 | * Project Properties Manager interface. 11 | * 12 | * @author Philippe Herlin 13 | * 14 | */ 15 | public interface IProjectPropertiesManager { 16 | /** 17 | * Load a project properties 18 | * 19 | * @param project 20 | * a project 21 | */ 22 | IProjectProperties loadProjectProperties(IProject project) throws PropertiesException; 23 | 24 | /** 25 | * Save project properties 26 | * 27 | * @param projectProperties 28 | * the project properties to save 29 | * @throws PropertiesException 30 | */ 31 | void storeProjectProperties(IProjectProperties projectProperties) throws PropertiesException; 32 | 33 | /** 34 | * Remove a project when it is deleted. 35 | * 36 | * @param project 37 | * the project 38 | */ 39 | void removeProjectProperties(IProject project); 40 | } 41 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/properties/IPropertiesFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.properties; 6 | 7 | import org.eclipse.core.resources.IProject; 8 | 9 | /** 10 | * This interface specifies factory method to create objects from the properties package 11 | * 12 | * @author Herlin 13 | * 14 | */ 15 | 16 | public interface IPropertiesFactory { 17 | 18 | /** 19 | * Get a properties manager 20 | */ 21 | IProjectPropertiesManager getProjectPropertiesManager(); 22 | 23 | /** 24 | * Instantiate a new Project Properties information structure for a particular project and 25 | * a particular project properties manager 26 | */ 27 | IProjectProperties newProjectProperties(IProject project, IProjectPropertiesManager projetcPropertiesManager); 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/properties/PropertiesException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.properties; 6 | 7 | /** 8 | * This exception can be thrown by operations on properties 9 | * 10 | * @author Herlin 11 | * 12 | */ 13 | 14 | public class PropertiesException extends Exception { 15 | 16 | private static final long serialVersionUID = 1L; 17 | 18 | /** 19 | * 20 | */ 21 | public PropertiesException() { 22 | super(); 23 | } 24 | 25 | /** 26 | * @param arg0 27 | * @param arg1 28 | */ 29 | public PropertiesException(String arg0, Throwable arg1) { 30 | super(arg0, arg1); 31 | } 32 | 33 | /** 34 | * @param arg0 35 | */ 36 | public PropertiesException(String arg0) { 37 | super(arg0); 38 | } 39 | 40 | /** 41 | * @param arg0 42 | */ 43 | public PropertiesException(Throwable arg0) { 44 | super(arg0); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/properties/impl/PropertiesFactoryImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.properties.impl; 6 | 7 | import org.eclipse.core.resources.IProject; 8 | 9 | import net.sourceforge.pmd.eclipse.runtime.properties.IProjectProperties; 10 | import net.sourceforge.pmd.eclipse.runtime.properties.IProjectPropertiesManager; 11 | import net.sourceforge.pmd.eclipse.runtime.properties.IPropertiesFactory; 12 | 13 | /** 14 | * Implements a factory for the objects of the properties package. 15 | * 16 | * @author Herlin 17 | */ 18 | public class PropertiesFactoryImpl implements IPropertiesFactory { 19 | private IProjectPropertiesManager projectPropertiesManager; 20 | 21 | @Override 22 | public IProjectPropertiesManager getProjectPropertiesManager() { 23 | if (this.projectPropertiesManager == null) { 24 | this.projectPropertiesManager = new ProjectPropertiesManagerImpl(); 25 | } 26 | 27 | return this.projectPropertiesManager; 28 | } 29 | 30 | @Override 31 | public IProjectProperties newProjectProperties(IProject project, IProjectPropertiesManager newProjectPropertiesManager) { 32 | return new ProjectPropertiesImpl(project, newProjectPropertiesManager); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/writer/IAstWriter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.writer; 6 | 7 | import java.io.OutputStream; 8 | 9 | import net.sourceforge.pmd.lang.java.ast.ASTCompilationUnit; 10 | 11 | /** 12 | * Interface of an AST Writer. An IAstWriter is an object used to "serialize" an 13 | * AST. 14 | * 15 | * @author Philippe Herlin 16 | * 17 | */ 18 | public interface IAstWriter { 19 | 20 | /** 21 | * Serialize an AST into an output stream. 22 | * 23 | * @param outputStream 24 | * the target output 25 | * @param compilationUnit 26 | * the compilation unit to serialize 27 | * @throws WriterException 28 | */ 29 | void write(OutputStream outputStream, ASTCompilationUnit compilationUnit) throws WriterException; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/writer/IRuleSetWriter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.writer; 6 | 7 | import java.io.OutputStream; 8 | 9 | import net.sourceforge.pmd.lang.rule.RuleSet; 10 | 11 | /** 12 | * Interface for a rule set writer. A rule set writer is an object used to 13 | * "serialize" a rule set. 14 | * 15 | * @author Philippe Herlin 16 | * 17 | */ 18 | public interface IRuleSetWriter { 19 | 20 | /** 21 | * Write a ruleset as an XML stream. 22 | * 23 | * @param outputStream 24 | * the output target 25 | * @param ruleSet 26 | * the ruleset to serialize 27 | */ 28 | void write(OutputStream outputStream, RuleSet ruleSet) throws WriterException; 29 | } 30 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/writer/IWriterFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.writer; 6 | 7 | /** 8 | * Interface of a factory for the writer package objects 9 | * 10 | * @author Philippe Herlin 11 | * 12 | */ 13 | public interface IWriterFactory { 14 | 15 | /** 16 | * @return a ruleset writer 17 | */ 18 | IRuleSetWriter getRuleSetWriter(); 19 | 20 | /** 21 | * @return an AST writer 22 | */ 23 | IAstWriter getAstWriter(); 24 | } 25 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/writer/WriterException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.writer; 6 | 7 | /** 8 | * General exception thrown by objects of this package 9 | * 10 | * @author Herlin 11 | * 12 | */ 13 | 14 | public class WriterException extends Exception { 15 | 16 | private static final long serialVersionUID = 1L; 17 | 18 | /** 19 | * 20 | */ 21 | public WriterException() { 22 | super(); 23 | } 24 | 25 | /** 26 | * @param arg0 27 | * @param arg1 28 | */ 29 | public WriterException(String arg0, Throwable arg1) { 30 | super(arg0, arg1); 31 | } 32 | 33 | /** 34 | * @param arg0 35 | */ 36 | public WriterException(String arg0) { 37 | super(arg0); 38 | } 39 | 40 | /** 41 | * @param arg0 42 | */ 43 | public WriterException(Throwable arg0) { 44 | super(arg0); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/writer/impl/AstWriterImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.writer.impl; 6 | 7 | import java.io.IOException; 8 | import java.io.OutputStream; 9 | import java.io.PrintStream; 10 | import java.nio.charset.StandardCharsets; 11 | 12 | import net.sourceforge.pmd.eclipse.runtime.writer.IAstWriter; 13 | import net.sourceforge.pmd.eclipse.runtime.writer.WriterException; 14 | import net.sourceforge.pmd.lang.java.ast.ASTCompilationUnit; 15 | import net.sourceforge.pmd.util.treeexport.XmlTreeRenderer; 16 | 17 | /** 18 | * Implements a default AST Writer 19 | * 20 | * @author Philippe Herlin 21 | * 22 | */ 23 | class AstWriterImpl implements IAstWriter { 24 | @Override 25 | public void write(OutputStream outputStream, ASTCompilationUnit compilationUnit) throws WriterException { 26 | try { 27 | XmlTreeRenderer renderer = new XmlTreeRenderer(); 28 | renderer.renderSubtree(compilationUnit, new PrintStream(outputStream, true, StandardCharsets.UTF_8.name())); 29 | } catch (IOException e) { 30 | throw new WriterException(e); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/writer/impl/RuleSetWriterImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.writer.impl; 6 | 7 | import java.io.IOException; 8 | import java.io.OutputStream; 9 | 10 | import net.sourceforge.pmd.eclipse.runtime.writer.IRuleSetWriter; 11 | import net.sourceforge.pmd.eclipse.runtime.writer.WriterException; 12 | import net.sourceforge.pmd.lang.rule.RuleSet; 13 | import net.sourceforge.pmd.lang.rule.RuleSetWriter; 14 | 15 | /** 16 | * Generate an XML rule set file from a rule set. 17 | * 18 | *

This class is a rewriting of the original from PMD 19 | * engine that doesn't support xpath properties ! 20 | * 21 | * @author Philippe Herlin 22 | */ 23 | class RuleSetWriterImpl implements IRuleSetWriter { 24 | 25 | /** 26 | * Write a ruleset as an XML stream. 27 | * 28 | * @param writer 29 | * the output writer 30 | * @param ruleSet 31 | * the ruleset to serialize 32 | */ 33 | @Override 34 | public void write(OutputStream outputStream, RuleSet ruleSet) throws WriterException { 35 | try { 36 | RuleSetWriter ruleSetWriter = new RuleSetWriter(outputStream); 37 | ruleSetWriter.write(ruleSet); 38 | outputStream.flush(); 39 | } catch (IOException e) { 40 | throw new WriterException(e); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/writer/impl/WriterFactoryImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.runtime.writer.impl; 6 | 7 | import net.sourceforge.pmd.eclipse.runtime.writer.IAstWriter; 8 | import net.sourceforge.pmd.eclipse.runtime.writer.IRuleSetWriter; 9 | import net.sourceforge.pmd.eclipse.runtime.writer.IWriterFactory; 10 | 11 | /** 12 | * The writer factory produces writers such as the one for the ruleset file. 13 | * This class is the abstract base class for writer factories. 14 | * 15 | * @author Philippe Herlin 16 | */ 17 | public class WriterFactoryImpl implements IWriterFactory { 18 | 19 | @Override 20 | public IRuleSetWriter getRuleSetWriter() { 21 | return new RuleSetWriterImpl(); 22 | } 23 | 24 | @Override 25 | public IAstWriter getAstWriter() { 26 | return new AstWriterImpl(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/ColumnDescriptor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui; 6 | 7 | /** 8 | * 9 | * @author Brian Remedios 10 | */ 11 | public interface ColumnDescriptor { 12 | 13 | String id(); 14 | 15 | String label(); 16 | 17 | String tooltip(); 18 | 19 | int defaultWidth(); 20 | } 21 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/IndexedString.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui; 6 | 7 | import java.util.Collections; 8 | import java.util.List; 9 | 10 | /** 11 | * A string that maintains a set of interesting indicies about itself. 12 | * 13 | * @author Brian Remedios 14 | */ 15 | public class IndexedString implements Comparable { 16 | 17 | public final String string; 18 | public final List indexSpans; 19 | 20 | public static final IndexedString EMPTY = new IndexedString(""); 21 | 22 | public IndexedString(String theString) { 23 | this(theString, Collections.emptyList()); 24 | } 25 | 26 | public IndexedString(String theString, List theSpans) { 27 | string = theString; 28 | indexSpans = theSpans; 29 | } 30 | 31 | @Override 32 | public int compareTo(IndexedString other) { 33 | int deltaLength = other.string.length() - string.length(); 34 | 35 | return deltaLength == 0 ? other.string.compareTo(string) : deltaLength; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/ItemFieldAccessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui; 6 | 7 | import java.util.Comparator; 8 | 9 | import org.eclipse.swt.graphics.Image; 10 | 11 | /** 12 | * 13 | * @author Brian Remedios 14 | */ 15 | public interface ItemFieldAccessor { 16 | 17 | T valueFor(V item); 18 | 19 | Image imageFor(V item); 20 | 21 | String labelFor(V item); 22 | 23 | Comparator comparator(); 24 | } 25 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/ItemFieldAccessorAdapter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui; 6 | 7 | import java.util.Comparator; 8 | 9 | import org.eclipse.swt.graphics.Image; 10 | 11 | public class ItemFieldAccessorAdapter implements ItemFieldAccessor { 12 | 13 | private final Comparator comparator; // can be null 14 | 15 | public ItemFieldAccessorAdapter(Comparator aComparator) { 16 | comparator = aComparator; 17 | } 18 | 19 | @Override 20 | public Comparator comparator() { 21 | return comparator; 22 | } 23 | 24 | @Override 25 | public T valueFor(V item) { 26 | return null; 27 | } 28 | 29 | @Override 30 | public Image imageFor(V item) { 31 | return null; 32 | } 33 | 34 | @Override 35 | public String labelFor(V item) { 36 | return null; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/LabelProvider.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui; 6 | 7 | /** 8 | * 9 | * @author Brian Remedios 10 | */ 11 | public interface LabelProvider { 12 | 13 | String labelFor(Object item); 14 | } 15 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/ModifyListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui; 6 | 7 | /** 8 | * 9 | * @author Brian Remedios 10 | */ 11 | public interface ModifyListener { 12 | 13 | void setModified(); 14 | } 15 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/actions/ShowDataflowAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.actions; 6 | 7 | import org.eclipse.jface.action.IAction; 8 | import org.eclipse.jface.viewers.ISelection; 9 | import org.eclipse.ui.IObjectActionDelegate; 10 | import org.eclipse.ui.IWorkbenchPage; 11 | import org.eclipse.ui.IWorkbenchPart; 12 | import org.eclipse.ui.PartInitException; 13 | 14 | import net.sourceforge.pmd.eclipse.plugin.PMDPlugin; 15 | import net.sourceforge.pmd.eclipse.ui.PMDUiConstants; 16 | import net.sourceforge.pmd.eclipse.ui.nls.StringKeys; 17 | 18 | /** 19 | * 20 | * @author SebastianRaffel ( 26.05.2005 ) 21 | */ 22 | public class ShowDataflowAction implements IObjectActionDelegate { 23 | private IWorkbenchPage workbenchPage; 24 | 25 | @Override 26 | public void setActivePart(IAction action, IWorkbenchPart targetPart) { 27 | this.workbenchPage = targetPart.getSite().getPage(); 28 | } 29 | 30 | @Override 31 | public void run(IAction action) { 32 | if (this.workbenchPage != null) { 33 | try { 34 | this.workbenchPage.showView(PMDUiConstants.ID_DATAFLOWVIEW); 35 | 36 | } catch (PartInitException pie) { 37 | PMDPlugin.getDefault().logError(StringKeys.ERROR_VIEW_EXCEPTION + this.toString(), pie); 38 | } 39 | } 40 | } 41 | 42 | @Override 43 | public void selectionChanged(IAction action, ISelection selection) { 44 | action.setEnabled(true); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/editors/BasicLineStyleListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.editors; 6 | 7 | import java.util.List; 8 | 9 | import org.eclipse.swt.custom.LineStyleEvent; 10 | import org.eclipse.swt.custom.LineStyleListener; 11 | import org.eclipse.swt.custom.StyleRange; 12 | 13 | /** 14 | * This class performs the syntax highlighting and styling for Pmpe. 15 | */ 16 | public class BasicLineStyleListener extends StyleExtractor implements LineStyleListener { 17 | 18 | /** 19 | * PmpeLineStyleListener constructor 20 | * 21 | * @param syntaxData 22 | * the syntax data to use 23 | */ 24 | public BasicLineStyleListener(SyntaxData theSyntaxData) { 25 | super(theSyntaxData); 26 | } 27 | 28 | /** 29 | * Called by StyledText to get styles for a line. 30 | */ 31 | @Override 32 | public void lineGetStyle(LineStyleEvent event) { 33 | 34 | List styles = lineStylesFor(event.lineText, event.lineOffset, event.lineText.length()); 35 | 36 | event.styles = styles.toArray(new StyleRange[0]); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/editors/TextChange.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.editors; 6 | 7 | class TextChange { 8 | // The starting offset of the change 9 | private int start; 10 | 11 | // The length of the change 12 | private int length; 13 | 14 | // The replaced text 15 | private String replacedText; 16 | 17 | /** 18 | * Constructs a TextChange. 19 | * 20 | * @param start 21 | * the starting offset of the change 22 | * @param length 23 | * the length of the change 24 | * @param replacedText 25 | * the text that was replaced 26 | */ 27 | TextChange(int start, int length, String replacedText) { 28 | this.start = start; 29 | this.length = length; 30 | this.replacedText = replacedText; 31 | } 32 | 33 | /** 34 | * Returns the start 35 | * 36 | * @return int 37 | */ 38 | public int getStart() { 39 | return start; 40 | } 41 | 42 | /** 43 | * Returns the length 44 | * 45 | * @return int 46 | */ 47 | public int getLength() { 48 | return length; 49 | } 50 | 51 | /** 52 | * Returns the replacedText 53 | * 54 | * @return String 55 | */ 56 | public String getReplacedText() { 57 | return replacedText; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/filters/BasicAccessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.filters; 6 | 7 | import net.sourceforge.pmd.eclipse.ui.filters.FilterHolder.Accessor; 8 | 9 | /** 10 | * 11 | * @author Brian Remedios 12 | */ 13 | class BasicAccessor implements Accessor { 14 | 15 | @Override 16 | public boolean boolValueFor(FilterHolder fh) { 17 | return false; 18 | } 19 | 20 | @Override 21 | public String textValueFor(FilterHolder fh) { 22 | return null; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/AbstractStructuredContentProvider.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences; 6 | 7 | import org.eclipse.jface.viewers.IStructuredContentProvider; 8 | import org.eclipse.jface.viewers.Viewer; 9 | 10 | /** 11 | * Base class for IStructuredContentProviders. 12 | * 13 | * @see IStructuredContentProvider 14 | * 15 | */ 16 | public abstract class AbstractStructuredContentProvider implements IStructuredContentProvider { 17 | 18 | @Override 19 | public void dispose() { 20 | // to be overridden 21 | } 22 | 23 | @Override 24 | public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { 25 | // to be overriden 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/AbstractTableLabelProvider.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences; 6 | 7 | import org.eclipse.jface.viewers.ILabelProviderListener; 8 | import org.eclipse.jface.viewers.ITableLabelProvider; 9 | import org.eclipse.swt.graphics.Image; 10 | 11 | /** 12 | * Base class for ITableLabelProvider. 13 | * 14 | * @see ITableLabelProvider 15 | * 16 | */ 17 | public abstract class AbstractTableLabelProvider implements ITableLabelProvider { 18 | 19 | @Override 20 | public Image getColumnImage(Object element, int columnIndex) { 21 | return null; 22 | } 23 | 24 | @Override 25 | public void addListener(ILabelProviderListener listener) { 26 | // ignored 27 | } 28 | 29 | @Override 30 | public void dispose() { 31 | // to be overridden 32 | } 33 | 34 | @Override 35 | public boolean isLabelProperty(Object element, String property) { 36 | return true; 37 | } 38 | 39 | @Override 40 | public void removeListener(ILabelProviderListener listener) { 41 | // ignored 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/RuleDupeChecker.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences; 6 | 7 | import net.sourceforge.pmd.lang.rule.Rule; 8 | 9 | public interface RuleDupeChecker { 10 | 11 | boolean isDuplicate(Rule otherRule); 12 | } 13 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/RuleSetContentProvider.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences; 6 | 7 | import net.sourceforge.pmd.eclipse.util.Util; 8 | import net.sourceforge.pmd.lang.rule.RuleSet; 9 | 10 | /** 11 | * This class implements a content provider for the rule table of 12 | * the PMD Preference page 13 | * 14 | * @author Philippe Herlin 15 | * 16 | */ 17 | public class RuleSetContentProvider extends AbstractStructuredContentProvider { 18 | 19 | @Override 20 | public Object[] getElements(Object inputElement) { 21 | 22 | if (inputElement instanceof RuleSet) { 23 | RuleSet ruleSet = (RuleSet) inputElement; 24 | return ruleSet.getRules().toArray(); 25 | } 26 | 27 | return Util.EMPTY_ARRAY; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/RuleSetExcludeIncludePatternLabelProvider.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences; 6 | 7 | /** 8 | * Implements a label provider for the item of the ruleset exclude/include 9 | * pattern tables of the PMD Preference page. 10 | * 11 | */ 12 | public class RuleSetExcludeIncludePatternLabelProvider extends AbstractTableLabelProvider { 13 | 14 | @Override 15 | public String getColumnText(Object element, int columnIndex) { 16 | String result = ""; 17 | if (element instanceof RuleSetExcludeIncludePattern) { 18 | RuleSetExcludeIncludePattern pattern = (RuleSetExcludeIncludePattern) element; 19 | if (columnIndex == 0) { 20 | return pattern.getPattern(); 21 | } 22 | } 23 | return result; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/BUGs.txt: -------------------------------------------------------------------------------- 1 | Changes to the rule values or properties on the preferences scrn are made immediately, 2 | they should only be applied after the user hits the OK or Apply button. Need a set 3 | of rule references... 4 | 5 | ## NewPropertyDialog 6 | 7 | * Need to add support for multi-value types 8 | 9 | 10 | ## XPath Rule creation wizard 11 | 12 | * Should auto-capitalize 1st letter in rule name 13 | * Can't add properties at the moment, the Add button doesn't show up 14 | * 'validate' new XPath code in window 15 | * Select new rule in list after creation 16 | 17 | ## Rule tab 18 | 19 | * Min/max version combos don't fill when they should 20 | 21 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/BasicValueFormatter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | /** 8 | * 9 | * @author Brian Remedios 10 | */ 11 | public class BasicValueFormatter implements ValueFormatter { 12 | 13 | public final String label; 14 | 15 | public BasicValueFormatter(String theLabel) { 16 | label = theLabel; 17 | } 18 | 19 | /** 20 | * Override in subclasses. 21 | */ 22 | @Override 23 | public String format(Object value) { 24 | StringBuilder sb = new StringBuilder(); 25 | format(value, sb); 26 | return sb.toString(); 27 | } 28 | 29 | /** 30 | * Override in subclasses. 31 | */ 32 | @Override 33 | public void format(Object value, StringBuilder target) { 34 | target.append(value); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/CellPainterBuilder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | import org.eclipse.swt.widgets.Listener; 11 | import org.eclipse.swt.widgets.Tree; 12 | 13 | /** 14 | * 15 | * @author Brian Remedios 16 | */ 17 | public interface CellPainterBuilder { 18 | 19 | void addPainterFor(Tree tree, int columnIndex, RuleFieldAccessor getter, 20 | Map> listenersByEventCode); 21 | } 22 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/ImplementationType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | /** 8 | * 9 | * @author Brian Remedios 10 | */ 11 | public enum ImplementationType { 12 | 13 | XPath, Java, Mixed 14 | } 15 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/PropertyChangeListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | import net.sourceforge.pmd.properties.PropertyDescriptor; 8 | 9 | /** 10 | * 11 | * @author Brian Remedios 12 | */ 13 | public interface PropertyChangeListener { 14 | 15 | void changed(PropertyDescriptor descriptor, Object newValue); 16 | } 17 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/RuleCollection.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | import net.sourceforge.pmd.lang.rule.Rule; 8 | 9 | /** 10 | * 11 | * @author Brian Remedios 12 | */ 13 | public interface RuleCollection { 14 | 15 | boolean isEmpty(); 16 | 17 | /** 18 | * Return the only rule in the receiver or null if empty or more than one is 19 | * found. 20 | * 21 | * @return 22 | */ 23 | Rule soleRule(); 24 | 25 | /** 26 | * Iterate through all the rules while the visitor returns true. Returns the 27 | * result of the last rule visited. 28 | * 29 | * @param visitor 30 | * @return 31 | */ 32 | boolean rulesDo(RuleVisitor visitor); 33 | } 34 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/RuleColumnDescriptor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | import org.eclipse.swt.graphics.Image; 11 | import org.eclipse.swt.widgets.Listener; 12 | import org.eclipse.swt.widgets.Table; 13 | import org.eclipse.swt.widgets.TableColumn; 14 | import org.eclipse.swt.widgets.Tree; 15 | import org.eclipse.swt.widgets.TreeColumn; 16 | 17 | import net.sourceforge.pmd.eclipse.ui.ColumnDescriptor; 18 | import net.sourceforge.pmd.lang.rule.Rule; 19 | 20 | /** 21 | * 22 | * @author Brian Remedios 23 | */ 24 | public interface RuleColumnDescriptor extends ColumnDescriptor { 25 | 26 | RuleFieldAccessor accessor(); 27 | 28 | Image imageFor(Rule rule); 29 | 30 | Image imageFor(RuleCollection collection); 31 | 32 | String stringValueFor(Rule rule); 33 | 34 | String stringValueFor(RuleCollection collection); 35 | 36 | String detailStringFor(Rule rule); 37 | 38 | String detailStringFor(RuleGroup group); 39 | 40 | TableColumn newTableColumnFor(Table parent, int columnIndex, SortListener sortListener, 41 | Map> paintListeners); 42 | 43 | TreeColumn newTreeColumnFor(Tree parent, int columnIndex, SortListener sortListener, 44 | Map> paintListeners); 45 | } 46 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/RuleSelectionListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | /** 8 | * 9 | * @author Brian Remedios 10 | */ 11 | public interface RuleSelectionListener { 12 | 13 | void selection(RuleSelection selection); 14 | } 15 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/RuleVisitor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | import net.sourceforge.pmd.lang.rule.Rule; 8 | 9 | /** 10 | * 11 | * @author Brian Remedios 12 | */ 13 | public interface RuleVisitor { 14 | 15 | /** 16 | * Process the rule provided and return whether to continue processing other 17 | * rules. 18 | * 19 | * @param rule 20 | * @return boolean 21 | */ 22 | boolean accept(Rule rule); 23 | } 24 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/SizeChangeListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | /** 8 | * A callback f'n that informs a parent panel to adjust its layout or reset its minimum 9 | * size and thus its scrollable limits. 10 | * 11 | * @author Brian Remedios 12 | */ 13 | public interface SizeChangeListener { 14 | 15 | void addedRows(int newRowCount); 16 | } 17 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/SortListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | /** 8 | * 9 | * @author Brian Remedios 10 | */ 11 | public interface SortListener { 12 | 13 | void sortBy(Object accessor, Object context); 14 | } 15 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/ValueChangeListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | import net.sourceforge.pmd.properties.PropertyDescriptor; 8 | import net.sourceforge.pmd.properties.PropertySource; 9 | 10 | /** 11 | * Accepts notifications for changes to a single rule or a number of them. 12 | * 13 | * @author BrianRemedios 14 | */ 15 | public interface ValueChangeListener { 16 | 17 | /** 18 | * Method changed. 19 | * 20 | * @param rule 21 | * RuleSelection 22 | * @param desc 23 | * PropertyDescriptor 24 | * @param newValue 25 | * Object 26 | */ 27 | void changed(RuleSelection rule, PropertyDescriptor desc, Object newValue); 28 | 29 | /** 30 | * Method changed. 31 | * 32 | * @param rule 33 | * Rule 34 | * @param desc 35 | * PropertyDescriptor 36 | * @param newValue 37 | * Object 38 | */ 39 | void changed(PropertySource source, PropertyDescriptor desc, Object newValue); 40 | } 41 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/ValueResetHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.br; 6 | 7 | /** 8 | * 9 | * @author Brian Remedios 10 | */ 11 | public interface ValueResetHandler { 12 | 13 | void resetValuesIn(RuleSelection rules); 14 | } 15 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/panelmanagers/EditorUsageMode.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.panelmanagers; 6 | 7 | public enum EditorUsageMode { 8 | 9 | CreateNew, Editing 10 | } 11 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/panelmanagers/RulePropertyManager.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.panelmanagers; 6 | 7 | import org.eclipse.swt.widgets.TabItem; 8 | 9 | import net.sourceforge.pmd.eclipse.ui.preferences.br.RuleSelection; 10 | 11 | public interface RulePropertyManager { 12 | 13 | void tab(TabItem tab); 14 | 15 | boolean isActive(); 16 | 17 | void manage(RuleSelection rules); 18 | 19 | boolean validate(); 20 | 21 | void loadValues(); 22 | } 23 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/panelmanagers/RuleTarget.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.preferences.panelmanagers; 6 | 7 | import net.sourceforge.pmd.lang.rule.Rule; 8 | 9 | /** 10 | * Specifies an intended rule recipient. 11 | * 12 | * @author Brian Remedios 13 | */ 14 | public interface RuleTarget { 15 | 16 | void rule(Rule theRule); 17 | } 18 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/properties/MarkerPropertyTester.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.properties; 6 | 7 | import org.eclipse.core.expressions.PropertyTester; 8 | import org.eclipse.core.resources.IMarker; 9 | import org.eclipse.core.runtime.CoreException; 10 | 11 | import net.sourceforge.pmd.eclipse.plugin.PMDPlugin; 12 | 13 | public class MarkerPropertyTester extends PropertyTester { 14 | @Override 15 | public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { 16 | if (!(receiver instanceof IMarker)) { 17 | return false; 18 | } 19 | 20 | IMarker marker = (IMarker) receiver; 21 | 22 | try { 23 | return marker.getType().startsWith(PMDPlugin.PLUGIN_ID); 24 | } catch (CoreException e) { 25 | PMDPlugin.getDefault().logError(e.getMessage(), e); 26 | } 27 | return false; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/quickfix/AbstractFix.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.quickfix; 6 | 7 | public abstract class AbstractFix implements Fix { 8 | 9 | private final String label; 10 | 11 | protected AbstractFix(String theLabel) { 12 | label = theLabel; 13 | } 14 | 15 | @Override 16 | public String getLabel() { 17 | return label; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/quickfix/CommentOutLineFix.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.quickfix; 6 | 7 | import org.eclipse.jface.text.Document; 8 | 9 | /** 10 | * 11 | * @author Brian Remedios 12 | * 13 | */ 14 | public class CommentOutLineFix extends AbstractFix { 15 | 16 | public CommentOutLineFix() { 17 | super("Comment out the line"); 18 | } 19 | 20 | @Override 21 | public String fix(String sourceCode, int lineNumber) { 22 | final Document document = new Document(sourceCode); 23 | 24 | // TODO 25 | 26 | return document.get(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/quickfix/DeleteLineFix.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.quickfix; 6 | 7 | import org.eclipse.jface.text.BadLocationException; 8 | import org.eclipse.jface.text.Document; 9 | 10 | /** 11 | * Sample implementation of a fix that delete the line where the violation occurs. 12 | * 13 | * @author Philippe Herlin 14 | * 15 | */ 16 | public class DeleteLineFix extends AbstractFix { 17 | 18 | public DeleteLineFix() { 19 | super("Delete the line"); 20 | } 21 | 22 | @Override 23 | public String fix(String sourceCode, int lineNumber) { 24 | final Document document = new Document(sourceCode); 25 | try { 26 | final int offset = document.getLineOffset(lineNumber - 1); 27 | final int length = document.getLineLength(lineNumber - 1); 28 | document.replace(offset, length, ""); 29 | } catch (BadLocationException e) { // NOPMD by Herlin on 11/10/06 00:20 30 | // ignoring that exception 31 | } 32 | 33 | return document.get(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/quickfix/Fix.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.quickfix; 6 | 7 | public interface Fix { 8 | // FIXME PMD 5.0 9 | 10 | String fix(String code, int lineNumber); 11 | 12 | String getLabel(); 13 | } 14 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/quickfix/SearchAndReplace.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.quickfix; 6 | 7 | import java.util.regex.Matcher; 8 | import java.util.regex.Pattern; 9 | 10 | public class SearchAndReplace extends AbstractFix { 11 | 12 | private final String replaceStr; 13 | private final Pattern pattern; 14 | 15 | public SearchAndReplace(String searchString, String replacement) { 16 | super("Search & replace"); 17 | 18 | replaceStr = replacement; 19 | pattern = Pattern.compile(searchString); 20 | } 21 | 22 | @Override 23 | public String fix(String sourceCode, int lineNumber) { 24 | Matcher matcher = pattern.matcher(sourceCode); 25 | return matcher.replaceAll(replaceStr); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/views/DataflowResizeAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.views; 6 | 7 | import net.sourceforge.pmd.eclipse.ui.PMDUiConstants; 8 | import net.sourceforge.pmd.eclipse.ui.nls.StringKeys; 9 | import net.sourceforge.pmd.eclipse.ui.views.actions.AbstractPMDAction; 10 | 11 | public class DataflowResizeAction extends AbstractPMDAction { 12 | 13 | @Override 14 | protected String imageId() { 15 | return PMDUiConstants.ICON_BUTTON_CALCULATE; 16 | } 17 | 18 | @Override 19 | protected String tooltipMsgId() { 20 | return StringKeys.VIEW_TOOLTIP_CALCULATE_STATS; 21 | } 22 | 23 | /** 24 | * @return the Style, in which the Button is displayed 25 | */ 26 | @Override 27 | public int getStyle() { 28 | return AS_CHECK_BOX; 29 | } 30 | 31 | /** 32 | * Performs the Action. 33 | */ 34 | @Override 35 | public void run() { 36 | // TODO 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/views/PMDPerspective.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.views; 6 | 7 | import org.eclipse.ui.IPageLayout; 8 | import org.eclipse.ui.IPerspectiveFactory; 9 | 10 | import net.sourceforge.pmd.eclipse.ui.PMDUiConstants; 11 | 12 | /** 13 | * Creates the PMD Perspective. 14 | * 15 | * @author SebastianRaffel ( 08.05.2005 ) 16 | */ 17 | public class PMDPerspective implements IPerspectiveFactory { 18 | 19 | @Override 20 | public void createInitialLayout(IPageLayout layout) { 21 | String editorAreaId = layout.getEditorArea(); 22 | String explorerAreaId = "org.eclipse.jdt.ui.PackageExplorer"; 23 | String outlineAreaId = PMDUiConstants.ID_OUTLINE; 24 | String overviewAreaId = PMDUiConstants.ID_OVERVIEW; 25 | 26 | layout.addView(explorerAreaId, IPageLayout.LEFT, 0.25f, editorAreaId); 27 | layout.addView(outlineAreaId, IPageLayout.BOTTOM, 0.6f, explorerAreaId); 28 | layout.addView(overviewAreaId, IPageLayout.BOTTOM, 0.65f, editorAreaId); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/views/RefreshableTablePage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.views; 6 | 7 | import org.eclipse.jface.viewers.TableViewer; 8 | 9 | public interface RefreshableTablePage { 10 | 11 | TableViewer tableViewer(); 12 | 13 | void refresh(); 14 | } 15 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/views/TableColumnSorter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.views; 6 | 7 | import org.eclipse.jface.viewers.ViewerSorter; 8 | import org.eclipse.swt.widgets.TableColumn; 9 | import org.eclipse.swt.widgets.TreeColumn; 10 | 11 | /** 12 | * Displays an Arrow-Image in a TableColumn, that shows in which Direction the Column is sorted. 13 | * 14 | * @author SebastianRaffel ( 22.05.2005 ), Philippe Herlin, Brian Remedios 15 | */ 16 | public class TableColumnSorter extends ViewerSorter { 17 | 18 | /** 19 | * @param column, 20 | * the column to sort 21 | * @param order, 22 | * the Direction to sort by, -1 (desc) or 1 (asc) 23 | */ 24 | public TableColumnSorter(TreeColumn column, int order) { // NOPMD: TODO unused formal parameters... 25 | super(); 26 | 27 | // column.getParent().setSortColumn(column); 28 | // column.getParent().setSortDirection(order == 1 ? SWT.UP : SWT.DOWN); 29 | } 30 | 31 | /** 32 | * @param column, 33 | * the column to sort 34 | * @param order, 35 | * the Direction to sort by, -1 (desc) or 1 (asc) 36 | */ 37 | public TableColumnSorter(TableColumn column, int order) { // NOPMD: TODO unused formal parameters... 38 | super(); 39 | 40 | // column.getParent().setSortColumn(column); 41 | // column.getParent().setSortDirection(order == 1 ? SWT.UP : SWT.DOWN); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/views/actions/CollapseAllAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.views.actions; 6 | 7 | import org.eclipse.jface.viewers.TreeViewer; 8 | 9 | import net.sourceforge.pmd.eclipse.ui.PMDUiConstants; 10 | import net.sourceforge.pmd.eclipse.ui.nls.StringKeys; 11 | 12 | /** 13 | * Collapses the Violation Overview Tree. 14 | * 15 | * @author SebastianRaffel ( 22.05.2005 ), Philippe Herlin, Sven Jacob 16 | * 17 | */ 18 | public class CollapseAllAction extends AbstractPMDAction { 19 | 20 | private final TreeViewer treeViewer; 21 | 22 | public CollapseAllAction(TreeViewer theViewer) { 23 | super(); 24 | treeViewer = theViewer; 25 | } 26 | 27 | @Override 28 | protected String imageId() { 29 | return PMDUiConstants.ICON_BUTTON_COLLAPSE; 30 | } 31 | 32 | @Override 33 | protected String tooltipMsgId() { 34 | return StringKeys.VIEW_TOOLTIP_COLLAPSE_ALL; 35 | } 36 | 37 | @Override 38 | public void run() { 39 | treeViewer.collapseAll(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/views/actions/ExpandAllAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.views.actions; 6 | 7 | import org.eclipse.jface.viewers.TreeViewer; 8 | 9 | import net.sourceforge.pmd.eclipse.ui.PMDUiConstants; 10 | import net.sourceforge.pmd.eclipse.ui.nls.StringKeys; 11 | 12 | /** 13 | * Collapses the Violation Overview Tree. 14 | * 15 | * @author SebastianRaffel ( 22.05.2005 ), Philippe Herlin, Sven Jacob 16 | * 17 | */ 18 | public class ExpandAllAction extends AbstractPMDAction { 19 | 20 | private final TreeViewer treeViewer; 21 | 22 | public ExpandAllAction(TreeViewer theViewer) { 23 | super(); 24 | treeViewer = theViewer; 25 | } 26 | 27 | @Override 28 | protected String imageId() { 29 | return PMDUiConstants.ICON_BUTTON_EXPAND; 30 | } 31 | 32 | @Override 33 | protected String tooltipMsgId() { 34 | return StringKeys.VIEW_TOOLTIP_EXPAND_ALL; 35 | } 36 | 37 | @Override 38 | public void run() { 39 | treeViewer.expandAll(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/views/actions/MarkerContributionFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.views.actions; 6 | 7 | import org.eclipse.ui.IWorkbenchPage; 8 | import org.eclipse.ui.PlatformUI; 9 | import org.eclipse.ui.menus.ExtensionContributionFactory; 10 | import org.eclipse.ui.menus.IContributionRoot; 11 | import org.eclipse.ui.services.IServiceLocator; 12 | import org.eclipse.ui.texteditor.ITextEditor; 13 | 14 | public class MarkerContributionFactory extends ExtensionContributionFactory { 15 | 16 | @Override 17 | public void createContributionItems(IServiceLocator serviceLocator, IContributionRoot additions) { 18 | 19 | IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); 20 | ITextEditor editor = (ITextEditor) page.getActivePart(); 21 | 22 | additions.addContributionItem(new MarkerMenuFiller(editor), null); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/views/actions/ShowViolationDetailsHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | 6 | package net.sourceforge.pmd.eclipse.ui.views.actions; 7 | 8 | import org.eclipse.core.commands.AbstractHandler; 9 | import org.eclipse.core.commands.ExecutionEvent; 10 | import org.eclipse.core.commands.ExecutionException; 11 | import org.eclipse.core.resources.IMarker; 12 | import org.eclipse.core.runtime.IAdaptable; 13 | import org.eclipse.jface.viewers.IStructuredSelection; 14 | import org.eclipse.swt.widgets.Shell; 15 | import org.eclipse.ui.handlers.HandlerUtil; 16 | 17 | import net.sourceforge.pmd.eclipse.ui.dialogs.ViolationDetailsDialog; 18 | 19 | public class ShowViolationDetailsHandler extends AbstractHandler { 20 | 21 | @Override 22 | public Object execute(ExecutionEvent event) throws ExecutionException { 23 | Shell shell = HandlerUtil.getActiveShell(event); 24 | IStructuredSelection currentSelection = HandlerUtil.getCurrentStructuredSelection(event); 25 | if (currentSelection.size() == 1) { 26 | Object first = currentSelection.getFirstElement(); 27 | if (first instanceof IAdaptable) { 28 | IMarker marker = ((IAdaptable) first).getAdapter(IMarker.class); 29 | if (marker != null) { 30 | ViolationDetailsDialog dialog = new ViolationDetailsDialog(shell, marker); 31 | dialog.open(); 32 | } 33 | } 34 | } 35 | return null; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/views/ast/ASTLabelProvider.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.ui.views.ast; 6 | 7 | import org.eclipse.jface.viewers.ILabelProvider; 8 | import org.eclipse.jface.viewers.ILabelProviderListener; 9 | import org.eclipse.swt.graphics.Image; 10 | 11 | /** 12 | * 13 | * @author Brian Remedios 14 | */ 15 | public class ASTLabelProvider implements ILabelProvider { 16 | 17 | @Override 18 | public void addListener(ILabelProviderListener listener) { 19 | // TODO 20 | } 21 | 22 | @Override 23 | public void dispose() { 24 | // TODO 25 | } 26 | 27 | @Override 28 | public boolean isLabelProperty(Object element, String property) { 29 | return false; 30 | } 31 | 32 | @Override 33 | public void removeListener(ILabelProviderListener listener) { 34 | // TODO 35 | } 36 | 37 | @Override 38 | public Image getImage(Object element) { 39 | return null; 40 | } 41 | 42 | @Override 43 | public String getText(Object element) { 44 | // TODO 45 | return null; 46 | // AbstractNode node = (AbstractNode)element; 47 | // String extra = node.getImage(); 48 | // 49 | // return extra == null ? 50 | // node.toString() : 51 | // node.toString() + ": " + extra; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/util/FontBuilder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.util; 6 | 7 | import org.eclipse.swt.graphics.Font; 8 | import org.eclipse.swt.graphics.TextStyle; 9 | import org.eclipse.swt.widgets.Display; 10 | 11 | /** 12 | * 13 | * @author Brian Remedios 14 | */ 15 | public class FontBuilder { 16 | 17 | public final String name; 18 | public final int size; 19 | public final int style; 20 | public final int colorIdx; 21 | 22 | public FontBuilder(String theName, int theSize, int theStyle, int theColorIndex) { 23 | name = theName; 24 | size = theSize; 25 | style = theStyle; 26 | colorIdx = theColorIndex; 27 | } 28 | 29 | public FontBuilder(String theName, int theSize, int theStyle) { 30 | this(theName, theSize, theStyle, -1); 31 | } 32 | 33 | public Font build(Display display) { 34 | return new Font(display, name, size, style); 35 | } 36 | 37 | public TextStyle style(Display display) { 38 | return new TextStyle(build(display), colorIdx < 0 ? null : display.getSystemColor(colorIdx), null); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/util/ResourceManager.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.util; 6 | 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | import org.eclipse.jface.resource.ImageDescriptor; 11 | import org.eclipse.swt.graphics.Image; 12 | 13 | import net.sourceforge.pmd.eclipse.plugin.PMDPlugin; 14 | 15 | /** 16 | * 17 | * @author Brian Remedios 18 | */ 19 | public final class ResourceManager { 20 | 21 | private Map imagesByCode = new HashMap<>(); 22 | 23 | private static ResourceManager instance = new ResourceManager(); 24 | 25 | private ResourceManager() { 26 | } 27 | 28 | public static Image imageFor(String codePath) { 29 | 30 | if (instance.imagesByCode.containsKey(codePath)) { 31 | return instance.imagesByCode.get(codePath); 32 | } 33 | 34 | ImageDescriptor desc = PMDPlugin.getImageDescriptor(codePath); 35 | if (desc == null) { 36 | System.out.println("no image for: " + codePath); // TODO handle better 37 | return null; 38 | } 39 | Image image = desc.createImage(); 40 | instance.imagesByCode.put(codePath, image); 41 | return image; 42 | } 43 | 44 | public static void dispose() { 45 | 46 | for (Image image : instance.imagesByCode.values()) { 47 | image.dispose(); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/util/internal/IOUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | 6 | package net.sourceforge.pmd.eclipse.util.internal; 7 | 8 | import java.io.IOException; 9 | import java.io.Reader; 10 | 11 | public final class IOUtil { 12 | 13 | private IOUtil() {} 14 | 15 | public static String toString(Reader reader) throws IOException { 16 | StringBuilder sb = new StringBuilder(); 17 | char[] buffer = new char[8192]; 18 | int count = reader.read(buffer); 19 | while (count > -1) { 20 | sb.append(buffer, 0, count); 21 | count = reader.read(buffer); 22 | } 23 | return sb.toString(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/util/internal/SpyingRule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | 6 | package net.sourceforge.pmd.eclipse.util.internal; 7 | 8 | import net.sourceforge.pmd.lang.ast.Node; 9 | import net.sourceforge.pmd.lang.rule.AbstractRule; 10 | import net.sourceforge.pmd.reporting.RuleContext; 11 | 12 | public class SpyingRule extends AbstractRule { 13 | 14 | private static Node rootNode; 15 | 16 | @Override 17 | public void apply(Node node, RuleContext ctx) { 18 | rootNode = node; 19 | } 20 | 21 | public Node getRootNode() { 22 | return rootNode; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/util/internal/StringUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | */ 4 | 5 | package net.sourceforge.pmd.eclipse.util.internal; 6 | 7 | public final class StringUtil { 8 | 9 | private StringUtil() { 10 | // utility 11 | } 12 | 13 | public static int maxCommonLeadingWhitespaceForAll(String[] lines) { 14 | int max = Integer.MAX_VALUE; 15 | 16 | for (String line : lines) { 17 | int current = 0; 18 | for (int i = 0; i < line.length() && Character.isWhitespace(line.charAt(i)); i++) { 19 | current++; 20 | } 21 | if (current < max) { 22 | max = current; 23 | } 24 | } 25 | 26 | return max; 27 | } 28 | 29 | public static String[] trimStartOn(String[] lines, int count) { 30 | if (count == 0) { 31 | return lines; 32 | } 33 | 34 | String[] result = new String[lines.length]; 35 | for (int i = 0; i < lines.length; i++) { 36 | result[i] = lines[i].substring(count); 37 | } 38 | return result; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/resources/net/sourceforge/pmd/eclipse/ui/editors/c.properties: -------------------------------------------------------------------------------- 1 | # 2 | # BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | # 4 | 5 | # This file contains the syntax data for .c files 6 | comment=// 7 | stringstart=" 8 | stringend=" 9 | multilinecommentstart=/* 10 | multilinecommentend=*/ 11 | punctuation=(){};:?<>=+-*/&|~!%.[] 12 | keywords=auto const double float int short struct unsigned break continue else for long signed switch void case default enum goto register sizeof typedef volatile char do extern if return static union while 13 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/resources/net/sourceforge/pmd/eclipse/ui/editors/cpp.properties: -------------------------------------------------------------------------------- 1 | # 2 | # BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | # 4 | 5 | # This file contains the syntax data for .cpp files 6 | comment=// 7 | stringstart=" 8 | stringend=" 9 | multilinecommentstart=/* 10 | multilinecommentend=*/ 11 | punctuation=(){};:?<>=+-*/&|~!%.[] 12 | keywords=asm bool catch class const_cast delete dynamic_cast explicit false friend inline mutable namespace new operator private public protected reinterpret_cast static_cast template this throw true try typeid typename using virtual wchar_t 13 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/resources/net/sourceforge/pmd/eclipse/ui/editors/ecmascript.properties: -------------------------------------------------------------------------------- 1 | # 2 | # BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | # 4 | 5 | # This file contains the syntax data for .xpath files 6 | comment=// 7 | stringstart=' 8 | stringend=' 9 | varnamedelimiter=$ 10 | multilinecommentstart=/* 11 | multilinecommentend=*/ 12 | punctuation=(){};:?<>=+-*/&|~!%.[] 13 | keywords=break case catch continue default delete do else finally for function if in instanceof new return switch this throw try typeof var void undefined while with this 14 | 15 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/resources/net/sourceforge/pmd/eclipse/ui/editors/fortran77.properties: -------------------------------------------------------------------------------- 1 | # 2 | # BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | # 4 | 5 | # This file contains the syntax data for .for files 6 | comment=// 7 | stringstart=" 8 | stringend=" 9 | multilinecommentstart=/* 10 | multilinecommentend=*/ 11 | punctuation=(){};:?<>=+-*/&|~!%.[] 12 | keywords=access assign backspace blank block call close common continue data dimension direct do else endif enddo end entry eof equivalence err exist external file fmt form format formatted function goto if implicit include inquire intrinsic iostat logical named namelist nextrec number open opened parameter pause print program read rec recl return rewind sequential status stop subroutine then type unformatted unit write save 13 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/resources/net/sourceforge/pmd/eclipse/ui/editors/java.properties: -------------------------------------------------------------------------------- 1 | # 2 | # BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | # 4 | 5 | # This file contains the syntax data for .java files 6 | comment=// 7 | stringstart=" 8 | stringend=" 9 | multilinecommentstart=/* 10 | multilinecommentend=*/ 11 | punctuation=(){};:?<>=+-*/&|~!%.[] 12 | keywords=abstract assert boolean break byte case catch char class const continue do double else enum extends false final finally for if implements import int interface native new null package protected public private return static strictfp super switch synchronized this throws true try void volatile while 13 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/resources/net/sourceforge/pmd/eclipse/ui/editors/ruby.properties: -------------------------------------------------------------------------------- 1 | # 2 | # BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | # 4 | 5 | # This file contains the syntax data for .ruby files 6 | comment=// 7 | stringstart=" 8 | stringend=" 9 | multilinecommentstart=/* 10 | multilinecommentend=*/ 11 | punctuation=(){};:?<>=+-*/&|~!%.[] 12 | keywords=alias and BEGIN begin break case class def defined? do else elsif END end ensure false for if in module next nil not or redo rescue retry return self super then true undef unless until when while yield 13 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/resources/net/sourceforge/pmd/eclipse/ui/editors/scala.properties: -------------------------------------------------------------------------------- 1 | # 2 | # BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | # 4 | 5 | # This file contains the syntax data for .scala files 6 | comment=// 7 | stringstart=" 8 | stringend=" 9 | multilinecommentstart=/* 10 | multilinecommentend=*/ 11 | punctuation=(){};:?<>=+-*/&|~!%.[] 12 | keywords=abstract case catch class def do else extends false final finally for forSome if implicit import lazy match new null object override package private protected requires return sealed super this throw trait try true type val var while with yield 13 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/resources/properties/CommandProcessorStrategy.properties: -------------------------------------------------------------------------------- 1 | # 2 | # BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | # 4 | 5 | # use the default strategy 6 | strategy.class = DefaultCommandProcessorStrategy 7 | 8 | # long running commands 9 | RenderReport = net.sourceforge.pmd.eclipse.runtime.cmd.JobCommandProcessor 10 | DetectCutAndPaste = net.sourceforge.pmd.eclipse.runtime.cmd.JobCommandProcessor 11 | ReviewCode = net.sourceforge.pmd.eclipse.runtime.cmd.JobCommandProcessor 12 | BuildProject = net.sourceforge.pmd.eclipse.runtime.cmd.JobCommandProcessor 13 | DeleteMarkersCommand = net.sourceforge.pmd.eclipse.runtime.cmd.JobCommandProcessor 14 | 15 | # short running commands 16 | # these commands are not declared and therefore uses the default command processor 17 | ReviewResourceForRuleCommand = name.herlin.command.DefaultCommandProcessor 18 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/src/main/resources/properties/QuickFix.properties: -------------------------------------------------------------------------------- 1 | # 2 | # BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 | # 4 | 5 | # rule name -> name of class implementing Fix interface 6 | 7 | DuplicateImports = net.sourceforge.pmd.eclipse.ui.quickfix.DeleteLineFix, net.sourceforge.pmd.eclipse.ui.quickfix.CommentOutLineFix 8 | DontImportJavaLang = net.sourceforge.pmd.eclipse.ui.quickfix.DeleteLineFix, net.sourceforge.pmd.eclipse.ui.quickfix.CommentOutLineFix 9 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse.plugin/toc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = feature.xml,\ 2 | feature.properties,\ 3 | pmd_logo_small.jpg 4 | src.includes = build.properties,\ 5 | feature.properties,\ 6 | feature.xml,\ 7 | pmd_logo_small.jpg 8 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse/feature.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | PMD For Eclipse 12 | 13 | 14 | 15 | %copyright.text 16 | 17 | 18 | 19 | %license.text 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse/pmd_logo_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmd/pmd-eclipse-plugin/77376bb4a41663122f44938b9342132afa2edc98/net.sourceforge.pmd.eclipse/pmd_logo_small.jpg -------------------------------------------------------------------------------- /net.sourceforge.pmd.eclipse/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | net.sourceforge.pmd 8 | net.sourceforge.pmd.eclipse.parent 9 | 7.15.0-SNAPSHOT 10 | ../pom.xml 11 | 12 | 13 | net.sourceforge.pmd.eclipse 14 | eclipse-feature 15 | 16 | 17 | ${basedir}/../${keystorePath} 18 | 19 | 20 | -------------------------------------------------------------------------------- /target-platforms/2024-06.target: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /target-platforms/2024-06.tpd: -------------------------------------------------------------------------------- 1 | target "2024-06 (4.32)" 2 | with source requirements environment JavaSE-21 3 | location "https://download.eclipse.org/releases/2024-06/" { 4 | org.eclipse.platform.feature.group 5 | org.eclipse.jdt.feature.group 6 | org.eclipse.wst.xml_core.feature.feature.group 7 | org.eclipse.pde.feature.group 8 | org.eclipse.swtbot.eclipse.feature.group 9 | org.eclipse.swtbot.feature.group 10 | org.eclipse.swtbot.ide.feature.group 11 | org.eclipse.swtbot.generator.feature.feature.group 12 | org.junit 13 | org.junit.source 14 | } 15 | -------------------------------------------------------------------------------- /target-platforms/2024-09.target: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /target-platforms/2024-09.tpd: -------------------------------------------------------------------------------- 1 | target "2024-09 (4.33)" 2 | with source requirements environment JavaSE-21 3 | location "https://download.eclipse.org/releases/2024-09/" { 4 | org.eclipse.platform.feature.group 5 | org.eclipse.jdt.feature.group 6 | org.eclipse.wst.xml_core.feature.feature.group 7 | org.eclipse.pde.feature.group 8 | org.eclipse.swtbot.eclipse.feature.group 9 | org.eclipse.swtbot.feature.group 10 | org.eclipse.swtbot.ide.feature.group 11 | org.eclipse.swtbot.generator.feature.feature.group 12 | org.junit 13 | org.junit.source 14 | } 15 | -------------------------------------------------------------------------------- /target-platforms/2024-12.target: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /target-platforms/2024-12.tpd: -------------------------------------------------------------------------------- 1 | target "2024-12 (4.34)" 2 | with source requirements environment JavaSE-21 3 | location "https://download.eclipse.org/releases/2024-12/" { 4 | org.eclipse.platform.feature.group 5 | org.eclipse.jdt.feature.group 6 | org.eclipse.wst.xml_core.feature.feature.group 7 | org.eclipse.pde.feature.group 8 | org.eclipse.swtbot.eclipse.feature.group 9 | org.eclipse.swtbot.feature.group 10 | org.eclipse.swtbot.ide.feature.group 11 | org.eclipse.swtbot.generator.feature.feature.group 12 | org.junit 13 | org.junit.source 14 | } 15 | -------------------------------------------------------------------------------- /target-platforms/2025-03.target: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /target-platforms/2025-03.tpd: -------------------------------------------------------------------------------- 1 | target "2025-03 (4.35)" 2 | with source requirements environment JavaSE-21 3 | location "https://download.eclipse.org/releases/2025-03/" { 4 | org.eclipse.platform.feature.group 5 | org.eclipse.jdt.feature.group 6 | org.eclipse.wst.xml_core.feature.feature.group 7 | org.eclipse.pde.feature.group 8 | org.eclipse.swtbot.eclipse.feature.group 9 | org.eclipse.swtbot.feature.group 10 | org.eclipse.swtbot.ide.feature.group 11 | org.eclipse.swtbot.generator.feature.feature.group 12 | org.junit 13 | org.junit.source 14 | } 15 | -------------------------------------------------------------------------------- /test-projects/.gitignore: -------------------------------------------------------------------------------- 1 | eclipse*/ 2 | ws/ 3 | !project**/.project 4 | !project**/.pmd 5 | !project**/.classpath 6 | !project**/.ruleset 7 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/project6/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/project6/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | lib/sample-lib4.jar 3 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/project6/.pmd: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | .ruleset 5 | false 6 | true 7 | true 8 | 9 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/project6/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | project6 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | net.sourceforge.pmd.eclipse.plugin.pmdBuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | net.sourceforge.pmd.eclipse.plugin.pmdNature 22 | 23 | 24 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/project6/.ruleset: -------------------------------------------------------------------------------- 1 | 2 | 6 | PMD Plugin preferences rule set 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/project6/src/project6/Sample1.java: -------------------------------------------------------------------------------- 1 | package project6; 2 | 3 | import sample.lib1.MyInterface; 4 | 5 | // MyInterface comes in through a jar dependency. The jar file can be created in project sample-lib1 6 | public class Sample1 implements MyInterface { 7 | 8 | // missing override should be detected here. This only works, if sample-lib1-v1.jar is resolved correctly. 9 | public void bar(int i) { 10 | System.out.println("test"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/project6/src/project6/Sample2.java: -------------------------------------------------------------------------------- 1 | package project6; 2 | 3 | import sample.lib2.MyInterface; 4 | 5 | // MyInterface comes in through a project dependency to project "sample-lib2" 6 | public class Sample2 implements MyInterface { 7 | 8 | // missing override 9 | public void bar() { 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/project6/src/project6/Sample3.java: -------------------------------------------------------------------------------- 1 | package project6; 2 | 3 | import sample.lib3.MyInterface; 4 | 5 | // MyInterface comes in through a jar dependency in absolute path /tmp/sample-lib3-v1.jar. 6 | // The jar file can be created in project sample-lib3 7 | public class Sample3 implements MyInterface { 8 | 9 | // missing override 10 | public void bar() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/project6/src/project6/Sample4.java: -------------------------------------------------------------------------------- 1 | package project6; 2 | 3 | import sample.lib4.MyInterface; 4 | 5 | // MyInterface comes in through a jar dependency in project relativ path /lib/sample-lib4.jar. 6 | // The jar file can be created in project sample-lib4 7 | // The jar file is stored in this project. 8 | public class Sample4 implements MyInterface { 9 | 10 | // missing override 11 | public void bar() { 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib1/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib1/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | sample-lib1-v1.jar 3 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib1/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | sample-lib1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib1/create-jar.jardesc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib1/src/sample/lib1/MyInterface.java: -------------------------------------------------------------------------------- 1 | package sample.lib1; 2 | 3 | public interface MyInterface { 4 | 5 | public void bar(int i); 6 | } 7 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib2/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib2/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | sample-lib2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib2/src/sample/lib2/MyInterface.java: -------------------------------------------------------------------------------- 1 | package sample.lib2; 2 | 3 | public interface MyInterface { 4 | 5 | void bar(); 6 | } 7 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib3/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib3/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib3/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | sample-lib3 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib3/create-jar.jardesc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib3/src/sample/lib3/MyInterface.java: -------------------------------------------------------------------------------- 1 | package sample.lib3; 2 | 3 | public interface MyInterface { 4 | void bar(); 5 | } 6 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib4/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib4/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib4/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | sample-lib4 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib4/create-jar.jardesc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /test-projects/project-with-libs/sample-lib4/src/sample/lib4/MyInterface.java: -------------------------------------------------------------------------------- 1 | package sample.lib4; 2 | 3 | public interface MyInterface { 4 | void bar(); 5 | } 6 | -------------------------------------------------------------------------------- /test-projects/project1/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-projects/project1/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | -------------------------------------------------------------------------------- /test-projects/project1/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | project1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | net.sourceforge.pmd.eclipse.plugin.pmdBuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | net.sourceforge.pmd.eclipse.plugin.pmdNature 22 | 23 | 24 | -------------------------------------------------------------------------------- /test-projects/project1/src/project1/TestViolation.java: -------------------------------------------------------------------------------- 1 | package project1; 2 | 3 | import java.math.BigDecimal; 4 | 5 | /* Expected 2 PMD Violations at line 10: 6 | * 1. Header comments are required (documentation/CommentRequired) 7 | * 2. Each class should declare at least one constructor 8 | * (codestyle/AtLeastOneConstructor) 9 | */ 10 | public class TestViolation { 11 | 12 | // Expected 4 PMD Violations at line 15: 13 | // 1. Missing commented default access modifier 14 | // (codestyle/CommentDefaultAccessModifier) 15 | // 2. Field comments are required 16 | // (documentation/CommentRequired) 17 | // 3. Use explicit scoping instead of the default package private level 18 | // (codestyle/DefaultPackage) 19 | // 4. Avoid creating BigDecimal with a decimal (float/double) literal. Use 20 | // a String literal. 21 | // (errorprone/AvoidDecimalLiteralsInBigDecimalConstructor) 22 | BigDecimal big = new BigDecimal(0.1); 23 | 24 | BigDecimal big2 = new BigDecimal(0.2); // NOPMD: all violations suppressed! 25 | 26 | // Only the violation for AvoidDecimalLiteralsInBigDecimalConstructor 27 | // is suppressed. We have 3 violations left. 28 | @SuppressWarnings("PMD.AvoidDecimalLiteralsInBigDecimalConstructor") 29 | BigDecimal big3 = new BigDecimal(0.3); 30 | } 31 | -------------------------------------------------------------------------------- /test-projects/project2/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-projects/project2/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /test-projects/project2/.pmd: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | ruleset.xml 5 | false 6 | true 7 | true 8 | 9 | -------------------------------------------------------------------------------- /test-projects/project2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | project2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | net.sourceforge.pmd.eclipse.plugin.pmdBuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | net.sourceforge.pmd.eclipse.plugin.pmdNature 22 | 23 | 24 | -------------------------------------------------------------------------------- /test-projects/project2/ruleset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | My custom rules 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test-projects/project2/src/project2/TestViolation.java: -------------------------------------------------------------------------------- 1 | package project2; 2 | 3 | import java.math.BigDecimal; 4 | 5 | /* Expected PMD Violations at line 10: 6 | * 1. Header comments are required (documentation/CommentRequired) 7 | * 2. Each class should declare at least one constructor 8 | * (codestyle/AtLeastOneConstructor) 9 | */ 10 | public class TestViolation { 11 | 12 | // Expected PMD Violations at line 15: 13 | // 1. Missing commented default access modifier 14 | // (codestyle/CommentDefaultAccessModifier) 15 | // 2. Field comments are required 16 | // (documentation/CommentRequired) 17 | // 3. Use explicit scoping instead of the default package private level 18 | // (codestyle/DefaultPackage) 19 | // 4. Avoid creating BigDecimal with a decimal (float/double) literal. Use 20 | // a String literal. 21 | // (errorprone/AvoidDecimalLiteralsInBigDecimalConstructor) 22 | BigDecimal big = new BigDecimal(0.1); 23 | 24 | BigDecimal big2 = new BigDecimal(0.2); // NOPMD: all violations suppressed! 25 | 26 | // Only the violation for AvoidDecimalLiteralsInBigDecimalConstructor 27 | // is suppressed 28 | @SuppressWarnings("PMD.AvoidDecimalLiteralsInBigDecimalConstructor") 29 | BigDecimal big3 = new BigDecimal(0.3); 30 | } 31 | -------------------------------------------------------------------------------- /test-projects/project3/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | .settings/ 3 | .classpath 4 | .pmd 5 | .pmdruleset.xml 6 | .project 7 | -------------------------------------------------------------------------------- /test-projects/project3/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | net.sourceforge.pmd.testprojects 5 | project3 6 | 1.0.0-SNAPSHOT 7 | 8 | 9 | 10 | 11 | org.apache.maven.plugins 12 | maven-pmd-plugin 13 | 3.11.0 14 | 15 | 16 | 17 | check 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test-projects/project3/src/main/java/project3/TestViolation.java: -------------------------------------------------------------------------------- 1 | package project3; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class TestViolation { 6 | 7 | // Expected PMD Violations at line 11: 8 | // 1. Avoid creating BigDecimal with a decimal (float/double) literal. Use 9 | // a String literal. 10 | // (errorprone/AvoidDecimalLiteralsInBigDecimalConstructor) 11 | BigDecimal big = new BigDecimal(0.1); 12 | 13 | BigDecimal big2 = new BigDecimal(0.2); // NOPMD: all violations suppressed! 14 | 15 | @SuppressWarnings("PMD.AvoidDecimalLiteralsInBigDecimalConstructor") 16 | BigDecimal big3 = new BigDecimal(0.3); 17 | } 18 | -------------------------------------------------------------------------------- /test-projects/project4/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | .settings/ 3 | .classpath 4 | .pmd 5 | .pmdruleset.xml 6 | .project 7 | -------------------------------------------------------------------------------- /test-projects/project4/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | net.sourceforge.pmd.testprojects 5 | project4 6 | 1.0.0-SNAPSHOT 7 | 8 | 9 | 10 | 11 | org.apache.maven.plugins 12 | maven-pmd-plugin 13 | 3.11.0 14 | 15 | 16 | ruleset1.xml 17 | ruleset2.xml 18 | 19 | true 20 | 21 | 22 | 23 | 24 | check 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /test-projects/project4/ruleset1.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Rules 10 | 11 | .*/src/main/java/project4/third/.* 12 | 13 | 14 | 1 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test-projects/project4/ruleset2.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Custom rule 10 | 11 | .*/src/main/java/project4/second/.* 12 | 13 | 14 | 1 15 | 16 | -------------------------------------------------------------------------------- /test-projects/project4/src/main/java/project4/first/First.java: -------------------------------------------------------------------------------- 1 | package project4.first; 2 | 3 | public class First { 4 | 5 | public static boolean isBoolean() { 6 | return true; 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /test-projects/project4/src/main/java/project4/second/Second.java: -------------------------------------------------------------------------------- 1 | package project4.second; 2 | 3 | public class Second { 4 | 5 | public static boolean isBoolean() { 6 | return true; 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /test-projects/project4/src/main/java/project4/third/Third.java: -------------------------------------------------------------------------------- 1 | package project4.third; 2 | 3 | public class Third { 4 | 5 | public static boolean isBoolean() { 6 | return true; 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /test-projects/project5/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | project5 4 | 5 | 6 | 7 | 8 | 9 | net.sourceforge.pmd.eclipse.plugin.pmdBuilder 10 | 11 | 12 | 13 | 14 | 15 | net.sourceforge.pmd.eclipse.plugin.pmdNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /test-projects/project5/pack/GlobalClassSample.cls: -------------------------------------------------------------------------------- 1 | // Expected PMD Violation: 2 | // Avoid using global modifier 3 | global class Foo { 4 | 5 | } 6 | --------------------------------------------------------------------------------