Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-770

Parameterize ListView, TableView and TreeView getters and setters for ListData

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.0
    • 2.5
    • None
    • None

    Description

      Firstly, please forgive me if I use incorrect terms, I'm no generics expert

      I'll use TableView#getTableData() as an example. This method is today anonymously typed, so that if you want to mutate the list, you need to cast it to a spesific type first. This can easily be fixed by parameterizing the method. The same goes for ListView and TreeView as well. I'll supply a patch to change this behavior. This removes an annoyance and enables better looking code.

      This is how one need to do it today:

      List<MyObject> myList = (List<MyObject>) tableView.getTableData();
      myList.add(myObject);

      By parameterizing the methods, this changes to:

      tableView.getTableData().add(myObject);

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rwhitcomb Roger Lee Whitcomb
            edvin Edvin Syse

            Dates

              Created:
              Updated:

              Slack

                Issue deployment