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

show var hint for variable declaration containing diamond operator

    XMLWordPrintableJSON

Details

    Description

      HashMap<String, String> map = new HashMap<String, String>();
      shows below hints in Alt+Enter dropdown:

      -Use diamond inference
      -Replace explicit type with var

      Selecting Hint 'Use diamond inference' converts code to

      HashMap<String, String> map = new HashMap<>();

      Earlier displayed hint 'Replace explicit type with var' isn't displayed anymore in alt+enter.

      We should display the earlier displayed hint, and upon selection, replace type and convert statement to replace diamond operator with generic param types.

      Attachments

        Issue Links

          Activity

            People

              rtaneja Reema Taneja
              rtaneja Reema Taneja
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m