IProject project = getJavaProject(configuration).getProject();
project.build(IncrementalProjectBuilder.FULL_BUILD, monitor);
Map<String, IFolder> sourceFolders = new HashMap<String, IFolder>();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IJavaProject javaProject = getJavaProject(configuration);
IPath munitOutputFolder = null;
IClasspathEntry[] entries = javaProject.getResolvedClasspath(true);
for (int i = 0; i < entries.length; i++)
{
IClasspathEntry entry = entries[i];
if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE)
{
IPath path = entry.getPath();
IFolder sourceFolder = root.getFolder(path);
if (sourceFolder.getLocation().toString().contains("test/munit"))
{
munitOutputFolder = entry.getOutputLocation();
}
}
}
MunitEclipseUpdater.launch();
String mainTypeName = verifyMainTypeName(configuration);
IVMRunner runner = getVMRunner(configuration, mode);
File workingDir = verifyWorkingDirectory(configuration);
String workingDirName = null;
if (workingDir != null)
{
workingDirName = workingDir.getAbsolutePath();
}
String[] envp = getEnvironment(configuration);
ArrayList vmArguments = new ArrayList();
ArrayList programArguments = new ArrayList();
programArguments.add("-resource");
programArguments.add(configuration.getAttribute("resource", ""));
programArguments.add("-path");
programArguments.add(configuration.getAttribute("Mpath", ""));
programArguments.add("-port");
programArguments.add(String.valueOf(MunitEclipseUpdater.getInstance().getPort()));
// VM-specific attributes
Map vmAttributesMap = getVMSpecificAttributesMap(configuration);
for (int i = 0; i < entries.length; i++)
{
IClasspathEntry entry = entries[i];
if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE)
{
IPath path = entry.getPath();
IFolder sourceFolder = root.getFolder(path);
if (!sourceFolder.getLocation().toString().contains("test/munit"))
{
try
{
IFolder folder = root.getFolder(entry.getOutputLocation());
for (IResource resource : folder.members())
{
try
{
resource.copy(munitOutputFolder, IFolder.SHALLOW, monitor);