<p>I've set an external tool (sablecc) in eclipse (3.4) that generates a bunch of classes in the current project. I need to run this tool and regenerate these classes fairly frequently. This means that every time I want to run sablecc, I have to manually delete the packages/classes that sablecc creates in order to ensure that I don't have conflicts between the old and new generated classes. Is there some easy way to automate this from within eclipse or otherwise? </p>

[{'answer_id': 75469, 'author': 'JesperE', 'author_id': 13051, 'author_profile': 'https://Stackoverflow.com/users/13051', 'pm_score': 0, 'selected': False, 'text': '<p>You can tell Eclipse to refresh the workspace (or parts of it) after an external tool has been run. This should force Eclipse to detect any new/deleted classes.</p>\n'}, {'answer_id': 76240, 'author': 'flicken', 'author_id': 12880, 'author_profile': 'https://Stackoverflow.com/users/12880', 'pm_score': 0, 'selected': False, 'text': '<p>JesperE is referring to the option <em>Refresh->Refresh resources on completion</em> in your external tools configuration for running sablecc.</p>\n'}, {'answer_id': 76245, 'author': 'Lukáš Rampa', 'author_id': 10560, 'author_profile': 'https://Stackoverflow.com/users/10560', 'pm_score': 1, 'selected': False, 'text': '<p>Not sure if I understand your point right, I suppose you need to delete old classes before running sablecc because some of them would not be eventually created in new run.</p>\n\n<p>It is probably best to write short <a href="http://ant.apache.org/" rel="nofollow noreferrer">Ant</a> build.xml with the target, which first removes the classes (Ant delete task) and then runs sablecc (Ant exec task). It is also possible to preset eclipse so that it refreshes workspace after Ant finishes.</p>\n\n<p>Put the build.xml anywhere to project, right click, Run As/Ant Build.</p>\n\n<p>Just for the sake of the clean style, you could then call sablecc with its Ant task (implemented by org.sablecc.ant.taskdef), instead of running it externally in new process.</p>\n'}]
['https://Stackoverflow.com/questions/75411', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/85/']