- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.1k
IDE: Support jump to definition in imports #4199
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
      
      
            Duhemm
  merged 21 commits into
  scala:master
from
dotty-staging:topic/go-to-definition-imports
  
      
      
   
  Nov 16, 2018 
      
    
                
     Merged
            
            IDE: Support jump to definition in imports #4199
                    Duhemm
  merged 21 commits into
  scala:master
from
dotty-staging:topic/go-to-definition-imports
  
      
      
   
  Nov 16, 2018 
              
            Conversation
  
    
      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
    
  
  
    
            
          
                language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala
              
                Outdated
          
            Show resolved
            Hide resolved
        
      5ff0200    to
    0182e4c      
    Compare
  
    | This PR should probably wait for the IDE tests (#3766) to be merged. | 
0182e4c    to
    4aa799e      
    Compare
  
    4aa799e    to
    421b6ce      
    Compare
  
    421b6ce    to
    eab4b3b      
    Compare
  
    eab4b3b    to
    9663752      
    Compare
  
    | Rebased on latest master | 
e3d69c9    to
    52e76f6      
    Compare
  
    
              
                    smarter
  
              
              reviewed
              
                  
                    Oct 10, 2018 
                  
              
              
            
            
        
          
                language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala
              
                Outdated
          
            Show resolved
            Hide resolved
        
      52e76f6    to
    fb2ac33      
    Compare
  
    
              
                    smarter
  
              
              reviewed
              
                  
                    Oct 18, 2018 
                  
              
              
            
            
        
          
                language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala
              
                Outdated
          
            Show resolved
            Hide resolved
        
      bee2d3f    to
    b44e3b2      
    Compare
  
    | @smarter I've added support for renaming renamed symbols.  | 
              
                    smarter
  
              
              reviewed
              
                  
                    Oct 30, 2018 
                  
              
              
            
            
              
                    smarter
  
              
              reviewed
              
                  
                    Oct 30, 2018 
                  
              
              
            
            
              
                    smarter
  
              
              reviewed
              
                  
                    Oct 30, 2018 
                  
              
              
            
            
              
                    smarter
  
              
              reviewed
              
                  
                    Oct 30, 2018 
                  
              
              
            
            
8aa5176    to
    a74b52a      
    Compare
  
    This commit makes the renaming less precise for the (probably rare) case of an imports being imported multiple times with the same renaming. When doing a renaming of a symbol that is import-renamed, we would exclude subscope where the same symbol was imported again with the same name. This commit changes the logic so that we no longer exclude those subscope, and keep renaming. See RenameTest#renameRenamingImportNested for an example where the langauge server will now behave differently.
Renaming a symbol that has been import-renamed will now rename all occurrences of that symbol with the new name in the whole file, regardless of scope.
We keep only `SourceTree`, that we had before, but it now accepts any `tpd.Tree`. After we bootstrap, this should become `tpd.Import | tpd.NameTree`.
When renaming a symbol that overrides other symbols, the overridden symbols and all their overrides will be renamed too.
When renaming a symbol that is overriding another symbol, we now ask the user whether we should rename the base symbol or only this member.
a74b52a    to
    ec6882c      
    Compare
  
    When doing hover on an imported node, the window now shows the documentation for all the imported symbols.
              
                    smarter
  
              
              approved these changes
              
                  
                    Nov 15, 2018 
                  
              
              
            
            
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.
✨ 🌟 💞
        
          
                language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | Thanks a lot for the numerous reviews @smarter ! | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  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.
  
    
  
    
No description provided.