Skip to content
Snippets Groups Projects
Commit f0e0b960 authored by Simon Barner's avatar Simon Barner
Browse files

GREEN (with minor changes)

Issue-Ref: 4182
Issue-Url: af3#4182



Signed-off-by: default avatarSimon Barner <barner@fortiss.org>
parent 2065ce00
No related branches found
No related tags found
1 merge request!164Improve update performance of DynamicTreeTableViewer
Pipeline #32229 passed
Pipeline: maven-releng

#32230

    ......@@ -3,10 +3,10 @@ DynamicListContentProvider.java 817cba44f246a361207a88ef9a4e1869215803f7 GREEN
    DynamicStreamContentProvider.java f46e91400609cba54793dd240be0fe2aa0d5cced GREEN
    DynamicTextFieldTreeTableCell.java de24117e6f785b328f1ff62383626a0b4b54e8ff GREEN
    DynamicTreeContentProviderBase.java 91896b1fb5104d126544c44c1ff8c30f2a13a8d6 GREEN
    DynamicTreeItem.java 2c4364e68d00f4ebd15cfbbdda7f991440ecc728 YELLOW
    DynamicTreeItem.java 7e81ea98038b5eca90df583e0268d4e8f37aaf25 GREEN
    DynamicTreeItemBase.java d883066ecc181120302ca32f328538de7a45b093 GREEN
    DynamicTreeTableUIProviderBase.java d150a4c379cc41aab2a44a5f1643f4956332c8e3 GREEN
    DynamicTreeTableViewer.java 7ee2471bd403e4be19a3c12460f3af622b526357 YELLOW
    DynamicTreeTableViewer.java 62712ba0f72b57c55256648204566ac2448b8d56 GREEN
    DynamicTreeUIProviderBase.java 82d3c051213f0147f4c67ad247a08696cee73110 GREEN
    DynamicTreeViewer.java 545f1ca10b7b3cad171b294a4b447875da45c9ed GREEN
    DynamicTreeViewerBase.java a2013538b62d86f6a09efdf2cd78babac2072484 GREEN
    ......
    ......@@ -39,12 +39,10 @@ public class DynamicTreeItem<T> extends DynamicTreeItemBase<T> {
    /** {@inheritDoc} */
    @Override
    public void update() {
    /*
    * This method is written so that in the common cases of deleting a child, inserting a child
    * and swapping two children, it only updates the affected children. Especially in these
    * common
    * cases, this is much faster than clearing and re-populating the list of children.
    */
    // This method is written so that in the common cases of deleting a child, inserting a child
    // and swapping two children, it only updates the affected children. Especially in these
    // common cases, this is much faster than clearing and re-populating the list of children.
    List<TreeItem<T>> children = getChildren();
    HashMap<T, Boolean> expanded = new HashMap<>();
    ......
    ......@@ -16,6 +16,7 @@
    package org.fortiss.tooling.common.ui.javafx.control.treetableview;
    import static java.lang.Integer.MAX_VALUE;
    import static java.util.stream.Collectors.toList;
    import static javafx.scene.control.cell.CheckBoxTreeTableCell.forTreeTableColumn;
    import java.util.Collection;
    ......@@ -23,10 +24,10 @@ import java.util.List;
    import java.util.Map;
    import java.util.function.Function;
    import java.util.function.Supplier;
    import java.util.stream.Collectors;
    import java.util.stream.Stream;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.collections.ObservableList;
    import javafx.scene.control.Label;
    import javafx.scene.control.SelectionMode;
    import javafx.scene.control.TreeItem;
    ......@@ -152,8 +153,8 @@ public final class DynamicTreeTableViewer<T> extends DynamicTreeViewerBase<T> {
    /** Returns a list of all selected values */
    private List<T> getSelectedValues() {
    return view.getSelectionModel().getSelectedItems().stream().map(c -> c.getValue())
    .collect(Collectors.toList());
    ObservableList<TreeItem<T>> selectedItems = view.getSelectionModel().getSelectedItems();
    return selectedItems.stream().map(c -> c.getValue()).collect(toList());
    }
    /** Selects the given values in item's subtree */
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment