Skip to content

Commit

Permalink
[#224] remove obsolete lsp4e Cpp content type binding
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ghentschke committed Jan 7, 2024
1 parent a41e165 commit 42f449c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
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

0 comments on commit 42f449c

Please sign in to comment.