Skip to content

Commit 84fd92c

Browse files
committed
[#224] remove obsolete tm4e Cpp content type binding
Since this eclipse-tm4e/tm4e#500 lsp4e issue has been closed by this platform fix: eclipse-platform/eclipse.platform#151 we can now remove the contentTypeBinding to the lsp4e C++ content type definition. fixes #224
1 parent ad8247d commit 84fd92c

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

bundles/org.eclipse.cdt.lsp.test/src/org/eclipse/cdt/lsp/test/LspUtilsTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ void testIsCContentType_EmptyId() {
2626
assertTrue(!LspUtils.isCContentType(""));
2727
}
2828

29-
@Test
30-
void testIsCContentType_CppContentTypeFromTM4E() {
31-
assertTrue(LspUtils.isCContentType("lng.cpp"));
32-
}
33-
3429
@Test
3530
void testIsCContentType_CONTENT_TYPE_CSOURCE() {
3631
assertTrue(LspUtils.isCContentType(CCorePlugin.CONTENT_TYPE_CSOURCE));

bundles/org.eclipse.cdt.lsp/plugin.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,7 @@
3333
<contentTypeBinding
3434
contentTypeId="org.eclipse.cdt.core.cxxSource">
3535
</contentTypeBinding>
36-
<contentTypeBinding
37-
contentTypeId="lng.cpp"> <!-- // TODO: The content type definition from TM4E "lng.cpp" can be omitted here if either https://github.com/eclipse-cdt/cdt/pull/310 or
38-
// https://github.com/eclipse/tm4e/pull/500 has been merged. -->
39-
</contentTypeBinding>
4036
</editor>
41-
<editorContentTypeBinding
42-
contentTypeId="lng.cpp"
43-
editorId="org.eclipse.cdt.ui.editor.CEditor"> <!-- // TODO: The content type definition from TM4E "lng.cpp" can be omitted here if either https://github.com/eclipse-cdt/cdt/pull/310 or
44-
// https://github.com/eclipse/tm4e/pull/500 has been merged. -->
45-
</editorContentTypeBinding>
4637
</extension>
4738
<extension
4839
point="org.eclipse.lsp4e.languageServer">

bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/LspUtils.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ public class LspUtils {
4747
* @return {@code true} if C/C++ content type
4848
*/
4949
public static boolean isCContentType(String id) {
50-
// TODO: The content type definition from TM4E "lng.cpp" can be omitted if either https://github.com/eclipse-cdt/cdt/pull/310 or
51-
// https://github.com/eclipse/tm4e/pull/500 has been merged.
52-
return (id.startsWith("org.eclipse.cdt.core.c") && (id.endsWith("Source") || id.endsWith("Header"))) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
53-
|| "lng.cpp".equals(id); //$NON-NLS-1$
50+
return (id.startsWith("org.eclipse.cdt.core.c") && (id.endsWith("Source") || id.endsWith("Header"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
5451
}
5552

5653
/**

0 commit comments

Comments
 (0)