Skip to content
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

[#224] remove obsolete tm4e Cpp content type binding #226

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ void testIsCContentType_EmptyId() {
assertTrue(!LspUtils.isCContentType(""));
}

@Test
void testIsCContentType_CppContentTypeFromTM4E() {
assertTrue(LspUtils.isCContentType("lng.cpp"));
}

@Test
void testIsCContentType_CONTENT_TYPE_CSOURCE() {
assertTrue(LspUtils.isCContentType(CCorePlugin.CONTENT_TYPE_CSOURCE));
Expand Down
9 changes: 0 additions & 9 deletions bundles/org.eclipse.cdt.lsp/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,7 @@
<contentTypeBinding
contentTypeId="org.eclipse.cdt.core.cxxSource">
</contentTypeBinding>
<contentTypeBinding
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
// https://github.com/eclipse/tm4e/pull/500 has been merged. -->
</contentTypeBinding>
</editor>
<editorContentTypeBinding
contentTypeId="lng.cpp"
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
// https://github.com/eclipse/tm4e/pull/500 has been merged. -->
</editorContentTypeBinding>
</extension>
<extension
point="org.eclipse.lsp4e.languageServer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ public class LspUtils {
* @return {@code true} if C/C++ content type
*/
public static boolean isCContentType(String id) {
// TODO: The content type definition from TM4E "lng.cpp" can be omitted if either https://github.com/eclipse-cdt/cdt/pull/310 or
// https://github.com/eclipse/tm4e/pull/500 has been merged.
return (id.startsWith("org.eclipse.cdt.core.c") && (id.endsWith("Source") || id.endsWith("Header"))) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|| "lng.cpp".equals(id); //$NON-NLS-1$
return (id.startsWith("org.eclipse.cdt.core.c") && (id.endsWith("Source") || id.endsWith("Header"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}

/**
Expand Down