cats icon indicating copy to clipboard operation
cats copied to clipboard

Outline view has duplicated entries for functions

Open duanyao opened this issue 11 years ago • 3 comments

Version: dev-1-3-a(893831165edd433c12f90417cebe2d89fa5ead01). Code sample:

module m1 {
    function bb() {
        function aa() {

        }
    }
    function cc() { 
    }
    var yy = 1;
}

The outline view has duplicated entries for those functions below module m1, see the snapshot cats-outline

duanyao avatar Nov 18 '14 05:11 duanyao

Confirmed, will have to look if this is something I should/can fix or if this is a bug in the Language Service.

jbaron avatar Nov 18 '14 06:11 jbaron

Did some debugging, and turns out an "error" in the language service. Sometimes:

  1. Shows only up as child of module (properties)
  2. Shows only up NOT as child of module (classes)
  3. Shows up both as child of module and separate (functions)

To be honest this method in the language service doesn't seems like the final API for outline function, since it also has all kind of UI properties in there (like bold). So for now have to live with this until MS fixes it. If this won't happen, will have to make some more complicated workarounds.

jbaron avatar Dec 29 '14 09:12 jbaron

Seems latests Langauge Service API has a new interface for this outline functionality. Hopefully this bug is also addressed in this new API.

jbaron avatar May 06 '15 09:05 jbaron