[Bug 443192] "Lookup File..." in TCFCSourceNotFoundEditor for launch configurations associated with CDT project?
Bugzilla Link | 443192 |
Status | ASSIGNED |
Importance | P3 normal |
Reported | Sep 03, 2014 06:58 EDT |
Modified | Sep 05, 2014 04:19 EDT |
Version | 1.2 |
Reporter | Mattias Bertilsson |
Description
In TCF C/C++ debug sessions (using org.eclipse.tcf.debug.LaunchConfigurationType), if a source file can't be found in the location indicated in the binary, I get TCFCSourceNotFoundEditor in its place with a few options, one of which is "Locate File...". Selecting this and indicating the actual location of the file (not in the workspace), generates a path mapping in the launch configuration and the TCFCSourceNotFoundEditor is replaced with a CEditor showing the file contents.
However, if the launch configuration also contains an association to a CDT project, using the CDT key "org.eclipse.cdt.launch.PROJECT_ATTR", the path mapping will be generated just fine, but the CEditor will not open.
I debugged this a bit and it seems the reason is that MapEntrySourceContainer.findSourceElements() (in org.eclipse.cdt.debug.core), which is used with or without the CDT project association, will then return the actual file to use as an ITranslationUnit, rather than a plain IFile or IStorage. This makes TCFModelPresentation.getEditorInput() (in org.eclipse.tcf.debug.ui) just fall through and return null.
Is this expected behaviour? Shouldn't all the forms in which the SourceContainers used may return the results be handled?
The reason I am asking is that I am working with product which combines TCF C/C++ debug sessions with the launch of other things, and those things are associated with a CDT project, which means that the CDT key will be found in the launch configurations. While I check if there is a way I can avoid that, it would be nice to know if this can be fixed in the TCF code.