-
Notifications
You must be signed in to change notification settings - Fork 146
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Initially reported at tm4e: eclipse-tm4e/tm4e#437
- Get 4.25 SDK
- Create simple project and empty hello.hpp file
- Install CDT SDK into it, restart
- Double click on hello.hpp - it is opened in default C++ editor from CDT.
- Right click in explorer -> "Open with" shows C++ editor in the proposed editors list
- Close C++ editor.
- Install org.eclipse.tm4e (TextMate support in Eclipse IDE, 0.5.1.202207061559) and org.eclipse.tm4e.language_pack (TextMate Language Pack, 0.1.0.202206131926)
- Restart Eclipse
- Double click on hello.hpp - it is opened in generic text editor, NOT with CDT C++ editor.
- Right click in explorer -> "Open with" does NOT show C++ editor in the proposed editors list
Both CDT and tm4e define content types for hpp files, CDT with high prio, tm4e with low:
https://github.com/eclipse/tm4e/blob/972061af2add6231c5667e31f83d393c102bdf9b/org.eclipse.tm4e.language_pack/plugin.xml#L69
Commenting line above in tm4e plugin.xml fixes the issue.
This seem to be a bug in the platform. CDT contribution priority is high, tm4e is low. tm4e generic editor shouldn't ever be opened by default if CDT is installed.
However, interesting fact is that cpp files can still be opened with CDT C++ editor (even if tm4e also defines the content type for them, in the same line with hpp files).
May be related code:
Line 47 in c198507
| private final Comparator<IContentType> policyConstantGeneralIsBetter = (IContentType o1, IContentType o2) -> { |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working