Parsing Java classes that extends classes with Generics

Lee Hinman <[email protected]> Thu, 15 Oct 2015 15:56:14 -0600
Newsgroups gmane.emacs.cedet
Message-ID <[email protected]>
Hi Cedet,

I've noticed that Semantic parser doesn't seem to be able to handle
classes that extend other classes with generic parameters, for example,
take this class:

package org.writequit.java;
import java.io.File;

public class Foo extends Thing {

    private String name;

    public Foo(String name) {
        this.name = name;
    }

    public void name(String newName) {
        this.name = newName;
    }
    
    public String name() {
        return name;
    }
}

Everything parses great from this (class name, variables, functions,
etc), however, if I change the file to be:

package org.writequit.java;

import java.io.File;

public class Foo extends Thing<Bar> {

    private String name;

    public Foo(String name) {
        this.name = name;
    }

    public void name(String newName) {
        this.name = newName;
    }
    
    public String name() {
        return name;
    }
}

Semantic is suddenly unable to parse anything except for the package and
import (it chokes at the `Thing<Bar>`).

I'm using the latest CEDET from the master branch loading it with:

(load-file "~/src/elisp/cedet/cedet-devel-load.el")

At the very top of my Emacs init.

Is there something I can do to get Semantic to parse this correctly? I
really rely on Semantic parsing useful information for my day-to-day
Java development.

-- 
;; Lee Hinman

------------------------------------------------------------------------------