Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project properties: The currently displayed page contains invalid values #117

Open
numeralnathan opened this issue Feb 14, 2020 · 3 comments
Labels

Comments

@numeralnathan
Copy link

numeralnathan commented Feb 14, 2020

I clicked on Project > Properties and then selected the PMD tab. I get the following error message:

Title: Could Not Accept Changes
Message: The currently displayed page contains invalid values.

The content section of the window is blank.

I tried uninstalling and re-installing the plugin and I get the same error.

Are there some property files I can remove to workaround this problem.

I am running Eclipse 2019-12 (4.14.0) build id 20191212-1212 with PMD Plug-in version 4.10.1.v20200207-1909 on Windows 10 version 1903. I am running Eclipse on HotSpot 11.0.4.

In Eclipse's Error Log, I see 2 errors: Error instantiating a rule and Problems occurred when invoking code from plug-in: "org.eclipse.jface". The latter has an exception ClassNotFoundException. The message complains about a class for a custom Java rule I wrote. I removed the custom rule from my PMD ruleset XML file and I can now see the property page.

How do I add my custom class so that the PMD plugin can use it? I tried "Select a working set..." on the property page but that did not seem to work.

@numeralnathan
Copy link
Author

numeralnathan commented Feb 14, 2020

The following steps did not help...

  1. Close Eclipse IDE
  2. Open the folder ...<workspace>.metadata.plugins
  3. Delete the PMD related folders
  4. Run eclipse.exe -clean

@adangel
Copy link
Member

adangel commented Feb 15, 2020

PMD's project properties are stored in the file .pmd in the project folder. Can you provide the content of this file? If you delete it, the project properties page should be shown again (of course, all the settings are lost).
The plugin should definitively handle this situation more gracefully...

@adangel adangel added the bug label Feb 15, 2020
@adangel adangel changed the title The currently displayed page contains invalid values Project properties: The currently displayed page contains invalid values Feb 15, 2020
@numeralnathan
Copy link
Author

There is no .pmd file in the project folder. I fixed the error message problem but hit another.

To fix the error message, I went into my PMD ruleset XML file and removed a custom rule. The custom rule is based on a Java class I wrote.

If I include the custom rule, then the PMD plugin throws a ClassNotFoundException. The PMD plugin does not have the class in the classpath. How do I add my custom class so that the PMD plugin can use it? I tried "Select a working set..." on the property page but that did not seem to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants