I think maintainability is worth making some sacrifices for, as at the moment it isn't possible to release new versions of the CND plugin, and there are some substantial issues with the plugin as it stands (primarily debugger reliability).
If we can leverage as much of clang as possible, that would seem to be a good way to lessen the amount of work required. Tristan Get Outlook for Android<https://aka.ms/ghei36> ________________________________ From: antonio <[email protected]> Sent: Wednesday, September 22, 2021 6:32:01 AM To: [email protected] <[email protected]> Subject: [CND] - Makefile projects + cpplite editors? Hi all, I've isolated a small subset of the "cnd" branch that restores support for C/C++ projects [1], this is, you can open/create/compile/run C/C++ projects the same way as in NetBeans 8.X. This subset does not contain the C/C++ editor (nor debugger, completion, etc.), which would require recreating the quite-old ANTLR grammars (and build/maintain a C preprocessor). When one opens a C/C++ file there's syntax highlighting, but the IDE complains because there's no language registered for "text/x-c++". I was thinking we could: a) CPPLITE: Use the editors/completion/etc. from the cpplite branch (note these editors are registered for "text/X-c++", not "text/x-c++"), that is backed by a C/C++ LSP Server (clangd, for instance). b) Trimmed-CND: Try to use the C/C++ projects from this small subset of "cnd" to generate a compilation database for cpplite (C/C++ projects in cnd should have all information required to generate these compilation databases). As far as I understand, with this we could recover the C/C++ support for Apache NetBeans but with a more powerful/mainteinable LSP backed completion, right? Cheers, Antonio [1] https://github.com/vieiro/netbeans/tree/cnd-projects The list of modules in the cnd subset is at https://github.com/vieiro/netbeans/blob/20f732f9af3a8fc0871c7042a5253571268b3c0f/nbbuild/cluster.properties#L1081 (not sure cnd.kit should be there? Maybe cpplite.kit is good enough?) [2] file=org.netbeans.modules.cnd.source.CCDataObject@5f3c2943[C:\Users\XXX\AppData\Local\Temp\CppApplication_2\main.cpp@4e7a192d:6bb83680] [exec] java.lang.Exception: no language for org.netbeans.modules.editor.NbEditorDocument@56cadb2b, mimeType='text/x-c++', kitClass=null, length=404, version=1, file=org.netbeans.modules.cnd.source.CCDataObject@5f3c2943[C:\Users\antvie\AppData\Local\Temp\CppApplication_2\main.cpp@4e7a192d:6bb83680] [exec] @[slowDocumentPropertiesSetup] [exec] at org.netbeans.modules.cnd.utils.CndUtils.severe(CndUtils.java:188) [exec] at org.netbeans.modules.cnd.utils.CndUtils.assertUnconditional(CndUtils.java:123) [exec] at org.netbeans.modules.cnd.source.CppEditorSupport.setupSlowDocumentProperties(CppEditorSupport.java:253) [exec] at org.netbeans.modules.cnd.source.CppEditorSupport.access$200(CppEditorSupport.java:84) [exec] at org.netbeans.modules.cnd.source.CppEditorSupport$3.run(CppEditorSupport.java:368) [exec] at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) [exec] at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) [exec] at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) [exec] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
