-
Notifications
You must be signed in to change notification settings - Fork 13
The C/C++ Editor OR C/C++ Editor (LSP) won't be used for opening a *.hpp file #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The org.eclipse.tm4e.language_pack plug-in adds content types for C/C++ files. These content types needs to be considered during filtering
The org.eclipse.tm4e.language_pack plug-in adds content types for C/C++ files. These content types needs to be considered during filtering
The reason for this was not obvious to me until I got right into the code. I has understood that CDT:
TM4E:
For C headers, C source and C++ source the depth is the same as TM4E, so the priority wins out to resolve the conflict.
So this is kind of true, for the places that use the first result of content type they get it wrong. For those that consider all content types the file could be things go a bit better. I wonder if the best solution is to make CDT's .hpp less deep. Not sure of the effect of that, and it would be affected negatively if TM4E removed the Therefore I propose one of these two solutions to get a better result overall in the case of hpp files:
|
The org.eclipse.tm4e.language_pack plug-in adds content types for C/C++ files. These content types needs to be considered during filtering This is a fix for eclipse-tm4e/tm4e#499
The org.eclipse.tm4e.language_pack plug-in adds content types for C/C++ files. These content types needs to be considered during filtering This is a fix for eclipse-tm4e/tm4e#499
The org.eclipse.tm4e.language_pack plug-in adds content types for C/C++ files. These content types needs to be considered during filtering This is a fix for eclipse-tm4e/tm4e#4998000
The org.eclipse.tm4e.language_pack plug-in adds content types for C/C++ files. These content types needs to be considered during filtering This is a fix for eclipse-tm4e/tm4e#499
I'll close this issue when either eclipse-cdt/cdt#310 or eclipse-tm4e/tm4e#500 has been merged. |
Uh oh!
There was an error while loading. Please reload this page.
When opening a *.hpp file, the C/C++ Editor (LSP) won't be used, because content types are missing in the org.eclipse.ui.editors extension point. The
org.eclipse.tm4e.language_pack
plug-in defines content types for C/C++ files as well ("lng.cpp" and "lng.c")The content types "lng.cpp" and "lng.c" are associated to the
ExtensionBasedTextEditor
only.Unfortunately is the extension type returned for a *.hpp file by
org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(File, ResourceInfo, boolean)
"lng.cpp" and NOT "org.eclipse.cdt.core.cxxHeader".Because the "lng.cpp" extension type is only associated to the
ExtensionBasedTextEditor
, the editor registry only returns this editor for the "lng.cpp" content type.This results in the need to associate the "lng.cpp" and "lng.c" to the C/C++ Editor and C/C++ Editor (LSP). By doing this, we are able to override the default editor in
CEditorAssociationOverride
for a *.hpp file with either the C/C++ Editor or C/C++ Editor (LSP)The text was updated successfully, but these errors were encountered: