Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

restart (or reload the config of) Eclipse-CS programmatically

I am trying to reconfigure the CheckStyle plugin for Eclipse (Eclipse-CS) from code (while Eclipse is running). So far the only way I have found to do this is by replacing the XML file with the config and reloading the config manually.

Replacing the XML file is not the elegant solution I was hoping for but it works; however I still need a way to make Eclipse-CS actually load the config file.

I have been searching for a way to achieve this but I am out of ideas.

like image 608
martijnve Avatar asked Jun 21 '12 14:06

martijnve


2 Answers

The Checkstyle Preferences page contains in the top right corner a small refresh button. Hit the button after you modified your checkstyle.xml or suppressions.xml and the new configuration will be used.

The Checkstyle Preferences Refresh button
(source: rolf-engelhard.de)

Reference: http://rolf-engelhard.de/2012/11/clearing-checkstyles-cache-in-eclipse

like image 168
Christian Semrau Avatar answered Sep 30 '22 21:09

Christian Semrau


I've been struggling with this eclipse-cs shortcoming for years, and so far I am convinced that it truly isn't possible. You'd have to add this feature to the eclipse-cs code yourself, so it seems.

Sorry for the bleak outlook. "Cannot do" isn't really what you want for an answer, but it may still save some people who google for a solution some time.

like image 32
barfuin Avatar answered Sep 30 '22 22:09

barfuin