To elaborate on the C/C++ support in NetBeans a little more: I think we
have two main directions which we can take: 1) take more or less the full
CND as donated, adjust to Apache standards and maintain; 2) attempt to do
something simpler (taking from CND what we need).

Using the full CND has some advantages, like a much more fully-featured
support, having a model of the source code inside the IDE, which can be
used to implement any feature, etc. The disadvantages are that a) we need
to bring it up to Apache standards; b) we need to maintain it (I may be
wrong, but my understanding is that there are two C/C++ parsers there: an
ANTLR based one, and clank, which is clang converted to Java). This would
include, for example, adding support for new C++ versions.

There is a very crude start of this in branch cnd-building in my NetBeans
repo:
https://github.com/jlahoda/netbeans/tree/cnd-building

There is a simple README available for it:
https://github.com/jlahoda/netbeans/blob/cnd-building/README.cnd

I guess that for this to work, we need some serious effort. At very least,
the readme lists a number of files that need to be added, to make code
buildable, and for each, we need to find out if we can use it, provide a
replacement, or drop it. Some might be reasonably simple, but I am worried
about things like CPPParserEx.java, CPPSymbol.java and cppparser.g - these
feel like difficult to replace; and possibly difficult to use the original
versions (as, presumably, these need to be updated when a new language
feature is added).


Using something simpler could be to use a C/C++ Language Protocol Server,
like ccls (https://github.com/MaskRay/ccls). This would provide features
like code completion, without the need to maintain the code to compute the
proposals, etc. inside NetBeans. Then there is a need for (simple?)
projects and (simple?) debugger. I tried to prototype it here:
https://github.com/jlahoda/netbeans/tree/cpplite

To use it, checkout the branch, and then build using:
ant -Dcluster.config=cpplite

Then do "ant tryme" to get the IDE. In New Project, there is
C/C++/Lightweight C/C++ Project - it is primarily intended to open existing
projects in NetBeans. It allows to specify compile_commands.json (for ccls)
and build commands. Path to "ccls" needs to be specified in Tools/Options
(otherwise most editor features don't work).

The advantage of this is that it should be fairly reasonable to write; and
hopefully easy to maintain for the long term. The disadvantage is that some
(many?) features from CND may be missing.


I guess I'd like hear:
a)  who is willing to help with either of these projects? Which you prefer?
b) any other ideas?
c) if someone would be willing to try cpplite and say how much is missing
to make it useful, I'd be grateful. My primary personal reason to look at
C/C++ support is to allow developer of native sources from OpenJDK - and I
think/hope cpplite could evolve fairly easily into something useful for
this usecase.

What do you think?

Thanks,
     Jan

On Wed, Apr 29, 2020 at 1:20 AM Ernie Rael <err...@raelity.com> wrote:

> On 4/28/2020 3:58 PM, Brad Walker wrote:
> > I'm starting to wade into helping get the C/C++ module up and running on
> > Apache Netbeans. As a result, I have quick project question for the more
> > "senior" folks on this group. Or anyone else who cares to comment. 8-)
> >
> > I would like to propose that we drop support for the SunStudio tools
> (i.e.
> > compiler and debugger, etc.). The reason is because it makes porting more
> > difficult. In addition, it doesn't really make sense for a project like
> > Apache Netbeans to carry all this technical debt that it incurs for which
> > no one really is going to support.
> >
> > So what are the collective thoughts and opinions about dropping SunStudio
> > support in Apache Netbeans?
> >
> > The assumption here is that GDB and friends would continue to work and be
> > supported.
> >
> > -brad w.
> >
> There's this tantalizing message from Jan
>
>
> http://mail-archives.apache.org/mod_mbox/netbeans-dev/202004.mbox/%3CCALd%3D3dH2vqLx8rrP2yDh76%3DDVKsok-g0Qeaf9zpeaVG2aeALhA%40mail.gmail.com%3E
>
> which suggests
>
>     alternative idea is to use a Language Server Protocol (LSP) server
>
> You might find that thread interesting...
>
> -ernie
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: dev-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Reply via email to