<p>Most of our Eclipse projects have multiple source folders, for example:</p>

<ul>
<li>src/main/java</li>
<li>src/test/java</li>
</ul>

<p>When you right-click on a class and choose New JUnit Test, the default source folder for the new test is "src/main/java" (presumably the first source folder listed in the project properties).</p>

<p>Is there any way to change the default source folder for new JUnit tests, so that when I do the above action, the new test will be created in say the "src/test/java" folder by default?</p>

[{'answer_id': 69167, 'author': 'Dave L.', 'author_id': 3093, 'author_profile': 'https://Stackoverflow.com/users/3093', 'pm_score': 3, 'selected': False, 'text': '<p>No.</p>\n\n<p>Unless you change the plugin code, the default source folder is always the same as that containing the class you right clicked on (not necessarily the first source folder listed).  I agree, it would be nice to be able to change it!</p>\n'}, {'answer_id': 74731, 'author': 'pauxu', 'author_id': 13014, 'author_profile': 'https://Stackoverflow.com/users/13014', 'pm_score': 7, 'selected': True, 'text': '<p>I use <a href="http://moreunit.sourceforge.net/" rel="noreferrer">moreUnit</a>, an Eclipse plugin to assist writing unit tests. Among other features, it lets you configure the default source folder of tests.</p>\n'}, {'answer_id': 5400024, 'author': 'fastcodejava', 'author_id': 184730, 'author_profile': 'https://Stackoverflow.com/users/184730', 'pm_score': 0, 'selected': False, 'text': '<p>Now you can use my fast code eclipse plug-in. With this plug-in you can configure the test path to be <code>src/test/java</code> only once. It also has a jump to the unit test feature. It is available at : <a href="http://fast-code.sourceforge.net/" rel="nofollow">http://fast-code.sourceforge.net/</a>.</p>\n'}]
['https://Stackoverflow.com/questions/69063', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/10433/']