Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5857

Empty rename dialog shows error on hitting preview or refactor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 12.4
    • None
    • editor - Refactoring, lsp
    • None

    Description

      When I hit the rename dialog in a typescript file when the file is empty or in a context where I can't open this dialog, the dialog which comes up is empty and I can click on preview or refactor. First it shows me this error

      Module LSP Client threw java.lang.NullPointerException. Please report a bug against LSP Client module and attach your var/log/messages.log.

      and second an Unexpected Exception was thrown:

      java.lang.NullPointerException
      	at org.netbeans.modules.lsp.client.bindings.refactoring.Refactoring$RenameRefactoringPlugin.prepare(Refactoring.java:222)
      [catch] at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(AbstractRefactoring.java:417)
      	at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:401)
      	at org.netbeans.modules.refactoring.api.AbstractRefactoring.prepare(AbstractRefactoring.java:212)
      	at org.netbeans.modules.refactoring.spi.impl.ParametersPanel$Prepare.run(ParametersPanel.java:1063)
      	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
      	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
      	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
      	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
      

      Steps to reproduce

      • Open a clean instance of NetBeans 12.4
      • Create an HTML5 project and let everything to default
      • Right click and choose New -> Other -> Other -> empty file and name it foo.ts
      • Open the file and hit ctrl + r for rename
      • An empty rename popup opens
      • Click on preview or refactor and see exception.

      Was was expected
      That I can't open the rename dialog due to a missing context and I need to see the info, that I can't rename here due to the missing context as in other parts of the IDE.

      Attachments

        Activity

          People

            jlahoda Jan Lahoda
            chrizzly Christian Lenz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: