I have a few questions about SmartType completion for Interfaces. I'm not sure to what extent these issues are bugs as opposed to user education. Here is an example with questions centering around the distinction between invoking SmartType without and with the "new" keyword.

    public Map methodA() {
        return new HashMap();
    }
    public void methodB() {
        Map m = (now do ctrl-shift-space)
              +-----------------------------------+
              | TreeMap   new java.util.TreeMap() |
              | HashMap   new java.util.HashMap() |
              | methodA()                     Map |
              +-----------------------------------+
Why doesn't this completion list include all classes that implement Map such as WeakHashMap, Hashtable, and so on?
        Map m = new (now do ctrl-shift-space)
              +---------------+
              | Map() { ... } |
              +---------------+
Why doesn't this single item list include all the "new class" options that are in the first completion list? It does make sense that it omits methodA().
Why isn't this interface constructor (that converts to an anonymous inner class) included in the first completion list? I guess I can understand the current behavior if it is intentional that we learn a special distinction that only a typed keyword new preceding the SmartType will invoke this special case and only this special case.
Should this anonymous inner class interface list include any interface that extends the type interface? It doesn't when I tried it for Collection.

Thanks,
Jon

Reply via email to