if (resource.getLocation().toFile().getPath().indexOf(String.format("%s%s%starget%s", File.separatorChar, projectName, File.separatorChar, File.separatorChar)) != -1) {
// seems to be a running context - replace the resource with the correct one
Iterator<ILaunchConfiguration> launchConfigIterator = CamelDebugRegistry.getInstance().getEntries().keySet().iterator();
while (launchConfigIterator.hasNext()) {
ILaunchConfiguration lc = launchConfigIterator.next();
CamelDebugRegistryEntry entry = CamelDebugRegistry.getInstance().getEntry(lc);
if (((IFile)entry.getEditorInput().getAdapter(IFile.class)).getFullPath().toFile().getPath().equals(resource.getFullPath().toFile().getPath())) {
this.resource = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(Path.fromOSString(CamelDebugUtils.getRawCamelContextFilePathFromLaunchConfig(lc)));
}
}
} else {
this.resource = resource;