eclipse-cdt / cdt-lsp

Eclipse CDT™ LSP Extensions for CDT
Eclipse Public License 2.0
26 stars 11 forks source link

[#314] fix broken API #316

Closed ghentschke closed 4 months ago

ghentschke commented 4 months ago

MyClangdOptionsDefaults has to implement ClangdOptionsDefaults instead of extending the now non-API class BuiltinClangdOptionsDefaults

fixes #314

merks commented 4 months ago

@ghentschke

FYI, hopefully these changes fix the target platform problems:

https://github.com/eclipse-cdt/cdt-lsp/pull/315

But someone needs to start the verification build....


Note that I put a comment here about the specific changes to the example:

https://github.com/ghentschke/eclipse-cdt-lsp/commit/5787464bd7360b0191c07cc430699723d67f86fc#commitcomment-141943807

ruspl-afed commented 4 months ago

@ghentschke for some reason I do not see an option to rebase this PR, most probably it will be green after rebasing

merks commented 4 months ago

@ghentschke @ruspl-afed

FYI, I expect if this is rebased on master that the build will start working again...

ruspl-afed commented 4 months ago

FYI, I expect if this is rebased on master that the build will start working again...

So do I, but I do not see "Rebase" control in UI for this PR

merks commented 4 months ago

I think copying and pasting this would be better:

    @Override
    public String clangdPath() {
        return Optional.ofNullable(PathUtil.findProgramLocation("clangd", null)) //$NON-NLS-1$
                .map(IPath::toOSString)//
                .orElse("clangd"); //  //$NON-NLS-1$
    }

    @Override
    public boolean useTidy() {
        return true;
    }

    @Override
    public boolean useBackgroundIndex() {
        return true;
    }

    @Override
    public String completionStyle() {
        return "detailed"; //$NON-NLS-1$
    }

    @Override
    public boolean prettyPrint() {
        return true;
    }

    @Override
    public String queryDriver() {
        return Optional.ofNullable(PathUtil.findProgramLocation("gcc", null)) //$NON-NLS-1$
                .map(p -> p.removeLastSegments(1).append(IPath.SEPARATOR + "*"))// //$NON-NLS-1$
                .map(IPath::toString)//
                .orElse(""); //  //$NON-NLS-1$
    }
ruspl-afed commented 4 months ago

Thanks a lot @ghentschke ! Merging this one.