- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.1k
 
Navigation bar items in methods #7178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
            DanielRosenwasser
  merged 9 commits into
  microsoft:master
from
tinganho:navigationBarItemTopLevel
  
      
      
   
  Mar 26, 2016 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            9 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      d6485c9
              
                Adds navigation bar items on methods and constructors
              
              
                tinganho 1a9dadb
              
                Fixes typo
              
              
                tinganho 1b5b146
              
                Fixes if statement
              
              
                tinganho 4d933f8
              
                Fixes method and constructor top-level
              
              
                tinganho fd2d28d
              
                Fixes new implementation
              
              
                tinganho 99edce0
              
                Fixes CR feedback
              
              
                tinganho 194927e
              
                Update with master
              
              
                tinganho 86b6b6c
              
                Addresses CR feedback
              
              
                tinganho b7c3547
              
                Merged with master
              
              
                tinganho File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
          
            42 changes: 42 additions & 0 deletions
          
          42 
        
  tests/cases/fourslash/navigationBarItemsInsideMethodsAndConstructors.ts
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /// <reference path="fourslash.ts"/> | ||
| 
     | 
||
| ////class Class { | ||
| //// constructor() { | ||
| //// {| "itemName": "LocalFunctionInConstructor", "kind": "function", "parentName": "Class"|}function LocalFunctionInConstructor() { | ||
| //// | ||
| //// } | ||
| //// | ||
| //// {| "itemName": "LocalInterfaceInConstrcutor", "kind": "interface", "parentName": "foo"|}interface LocalInterfaceInConstrcutor { | ||
| //// } | ||
| //// | ||
| //// enum LocalEnumInConstructor { | ||
| //// {| "itemName": "LocalEnumMemberInConstructor", "kind": "property", "parentName": "LocalEnumInConstructor"|}LocalEnumMemberInConstructor, | ||
| //// } | ||
| //// } | ||
| //// | ||
| //// method() { | ||
| //// {| "itemName": "LocalFunctionInMethod", "kind": "function", "parentName": "foo"|}function LocalFunctionInMethod() { | ||
| //// {| "itemName": "LocalFunctionInLocalFunctionInMethod", "kind": "function", "parentName": "bar"|}function LocalFunctionInLocalFunctionInMethod() { | ||
| //// | ||
| //// } | ||
| //// } | ||
| //// | ||
| //// {| "itemName": "LocalInterfaceInMethod", "kind": "interface", "parentName": "foo"|}interface LocalInterfaceInMethod { | ||
| //// } | ||
| //// | ||
| //// enum LocalEnumInMethod { | ||
| //// {| "itemName": "LocalEnumMemberInMethod", "kind": "property", "parentName": "foo"|}LocalEnumMemberInMethod, | ||
| //// } | ||
| //// } | ||
| //// | ||
| //// emptyMethod() { // Non child functions method should not be duplicated | ||
| //// | ||
| //// } | ||
| ////} | ||
| 
     | 
||
| test.markers().forEach((marker) => { | ||
| verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName); | ||
| }); | ||
| 
     | 
||
| // no other items | ||
| verify.getScriptLexicalStructureListCount(17); | 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicitly return false