eclipse-cs icon indicating copy to clipboard operation
eclipse-cs copied to clipboard

Cannot export CheckStyle preferences

Open antoinetran opened this issue 5 years ago • 2 comments

Same as https://sourceforge.net/p/eclipse-cs/feature-requests/121/, which is supposed to be fixed in 5.7.1. However, we use CheckStyle 8.26 and eclipse checkstyle plugin 8.26.

Symptom: When exporting Eclipse Preferences to EPF, whether only CheckStyle or all, we do not have the chosen profile. We have the XML configuration in an external directory, and we have to recreate a configuration setting and reference the file. Expected behavior: When exporting CheckStyle preference to EPF, the created external configuration stays, keeping the name of the setting and the path.

Workaround: I will see if I can implement as a Eclipse plugin (https://checkstyle.org/eclipse-cs/#!/builtin-config), but this is a bit more complex.

antoinetran avatar Dec 06 '19 12:12 antoinetran

FYI, here is the content of an EPF export:

#Fri Dec 06 09:45:19 UTC 2019
\!/=
/instance/net.sf.eclipsecs.core/background.full.build=false
/instance/net.sf.eclipsecs.core/include.module.ids=false
/instance/net.sf.eclipsecs.core/include.rule.names=false
/instance/net.sf.eclipsecs.core/limit.markers.per.resource=false
/instance/net.sf.eclipsecs.core/marker.amount.limit=100
/instance/net.sf.eclipsecs.ui/ask.before.rebuild=prompt
/instance/net.sf.eclipsecs.ui/warn.before.losing.filesets=true
@net.sf.eclipsecs.core=8.26.0.201911121319
@net.sf.eclipsecs.ui=8.26.0.201911121319
file_export_version=3.0

antoinetran avatar Dec 06 '19 12:12 antoinetran

Root cause is that the list of configurations is not stored via normal preferences to the Eclipse preference store, but to some file via net.sf.eclipsecs.core.config.GlobalCheckConfigurationWorkingSet.storeToPersistence(). Not sure about the background of that design decision.

Bananeweizen avatar Jan 08 '20 08:01 Bananeweizen

The description of the exported preferences had been reworked a while ago. Current versions show this description to indicate what is exported, what is not, and how to export the config itself: grafik

Bananeweizen avatar Sep 19 '23 17:09 Bananeweizen