GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - pmd/pmd-designer: The Rule Designer is a graphical tool that helps PMD users develop their custom rules

BranchesTags
Open more actions menu

Latest commit

 

History

1,681 Commits
1,681 Commits

Folders and files

NameName
Last commit message
Last commit date
.ci/tools
.ci/tools
 
 
.github
.github
 
 
.idea
.idea
 
 
.mvn/wrapper
.mvn/wrapper
 
 
config
config
 
 
src
src
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Home.md
Home.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
mvnw
mvnw
 
 
mvnw.cmd
mvnw.cmd
 
 
pom.xml
pom.xml
 
 
releasing.md
releasing.md
 
 

Repository files navigation

PMD Rule Designer

Build Status Maven Central Join the chat

The Rule Designer is a graphical tool that helps PMD users develop their custom rules. Main features:

  • AST inspection: inspect AST structure for any language, including XPath attributes
  • XPath rule design: integrated XPath editor, and rule metadata editor
  • Rule test edition: create or edit rule test files for the PMD testing framework

testing-designer

Installation

The designer is part of PMD's binary distributions. To install a distribution, see the documentation page about installing PMD.

The app needs either Oracle Java 8 (which includes JavaFX) or OpenJDK 11+ and a separately installed OpenJFX distribution. Visit JavaFX - Gluon to download an SDK distribution, extract it, and set the JAVAFX_HOME environment variable.

If the bin directory of your PMD distribution is on your shell's path, then you can launch the app with

  • pmd designer on Linux/ OSX
  • pmd.bat designer on Windows

Alternatively, you can launch the program "from source" with Maven. There are two different ways

  1. If you are running an OpenJDK build without JavaFX bundled:
    $ ./mvnw -Prunning will launch the Designer with the JavaFX dependencies on the classpath.
    Note: JavaFX will be on the classpath and not module path, which might behave a bit differently.
    You can change the version of those dependencies with e.g. -Dopenjfx.version=21.0.9 for OpenJFX 21. See the list of available versions here.

  2. If you are running an OpenJDK build with JavaFX bundled (e.g. Azul Zulu, Bellsoft Liberica):
    $ ./mvnw -Prunning -Dopenjfx.scope=provided will launch the Designer without putting the JavaFX dependencies on the classpath.
    Note: JavaFX will be on the module path and several packages need to be opened for reflection. This has been taken care in the exec plugin configuration in the maven profile running. Depending on the Java version, you might need additionally MAVEN_OPTS="--enable-native-access=javafx.graphics --sun-misc-unsafe-memory-access=allow".

In both cases, ControlsFX 11.x is put on the classpath by the maven profile running.

Updating

The latest version of the designer currently works with PMD 7.0.0 and above (pmd-core API).

However, since version 7.30.0, the designer doesn't bundle ControlsFX anymore. ControlsFX is a separate library, which is provided by the start scripts of PMD's binary distribution 7.30.0 and later (ControlsFX 8.x for Java 8, ControlsFX 11.x for Java 11+).

You can replace pmd-designer-7.X.Y.jar with the latest build in the installation folder of your PMD distribution, as long as that distribution is 7.30.0 or later. For older PMD distributions, either upgrade PMD or keep using pmd-designer 7.19.x.

If you embed the designer in your own application, add org.controlsfx:controlsfx to the classpath. It is declared as a regular Maven dependency (11.x); when running on Java 8, select version 8.40.18 instead.

Usage

Usage documentation is on the website

Building from source/ contributing

See CONTRIBUTING.md for instructions to build the project from source and setup your IDE.

Building a runnable JAR

You can package a runnable jar containing the PMD dependencies with maven. By default, it contains a couple of languages and openjfx:

./mvnw clean package -Pfat-jar -Dpmd.core.version=7.0.0-SNAPSHOT

The pmd.core.version property selects the version of pmd-core and the version of all the pmd languages that will be included. The built jar can then be found in your target directory.

You can then run this jar with:

java -jar target/pmd-designer-*-SNAPSHOT-jar-with-dependencies.jar

Such a jar cannot be used in a PMD distribution and must be used in a standalone fashion, otherwise classpath conflicts may arise. You can additionally add -Dopenjfx.scope=provided to exclude openjfx.

About

The Rule Designer is a graphical tool that helps PMD users develop their custom rules

Topics

javafx-applicationpmdxpath

Resources

Readme
BSD-2-Clause license

Contributing

Contributing
Activity
Custom properties

Stars

95 stars

Watchers

6 watching

Forks

21 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.