You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2023/01/17 19:39:40 UTC

[GitHub] [netbeans] Chris2011 opened a new issue, #5307: LSP Context based refactoring

Chris2011 opened a new issue, #5307:
URL: https://github.com/apache/netbeans/issues/5307

   ### Description
   
   The rename refactoring inside a TS file shows up evertime and that makes no sense.
   You can select the following code, everything and hit the rename/refactoring action. It will just add the last selected char which is }
   
   ```typescript
   import {
     trim
   } from 'lodash';
   
   export default class Test {
     public fun(sql: string): string {
       let formattedSql: string;
   
       formattedSql = sql
         .replace(/\n/g, ' ')
         .replace(/\t/g, ' ')
         .replace(/ +/g, ' ');
   
       formattedSql = trim(formattedSql);
   
       return formattedSql;
     };
   }
   ```
   
   ### Use case/motivation
   
   The code completion should show up when it is correct context, class name renaming, other stuff, etc. For everything else, it should do nothing or like in Java, it should show a dialog (better a notification, less disturbing) to not having the right context to rename/refactoring anything. I think this is a problem of the generic lsp client renaming, so it can happen for any language  that I add a rename functionality to the DataObject.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists