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

extend inline hints to reader support, use case fluent api ussage such as streams

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      When you build up a stream with several mapping operations
      it would be nice to see what the intermediate types are, not only when completing,
      but also when reading the code.
      It will be very helpful when exploring an API any when studying th concept.

      example (the addition shown as trailing comment.)
      {{
      return Files.lines( filePath ) // Stream<String>
      .filter( this.lineFilter ) // Stream<String> coan be ommited becasue no type change
      .map( s -> s.split( this.splitString ) ) // Stream<String[]>
      .filter( rowFilter ) // omitted, stream type same
      .map( creator ) // Stream<T>
      ;
      }}

      Other use cases are frameworks with fluent APIs such as AssertJ to name one.
      After having some experience with it, it will be a tremendous boon for code review.

      Attachments

        Activity

          People

            Unassigned Unassigned
            homberghp Pieter van den Hombergh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: