<commit_before>package org.opennms.features.topology.app.internal;

import java.util.Collection;

import org.opennms.features.topology.api.GraphContainer;
import org.opennms.features.topology.api.SelectionContext;
import org.opennms.features.topology.api.SelectionListener;
import org.opennms.features.topology.api.topo.VertexRef;

import com.vaadin.ui.Tree;

@SuppressWarnings({"serial"})
public class VertexSelectionTree extends Tree implements SelectionListener {

	private final String m_title;
    private final GraphContainer m_graphContainer;

    public VertexSelectionTree(String title, GraphContainer graphContainer) {
        super(null, new GCFilterableContainer(graphContainer));
        m_title = title;
        
        m_graphContainer = graphContainer;
        
        this.addListener(new ValueChangeListener() {
            
            @Override
            public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) {

            	@SuppressWarnings("unchecked")
				Collection<VertexRef> refs = (Collection<VertexRef>)event.getProperty().getValue();
            	
            	Collection<VertexRef> vertices = m_graphContainer.getVertexRefForest(refs);
            	m_graphContainer.getSelectionManager().setSelectedVertexRefs(vertices);
            	
            	getContainerDataSource().fireItemSetChange();
            }
        });

    }

    /**
     * When a user clicks on a vertex or edge in the UI, update the selection in the tree view.
     */
    @Override
    public void selectionChanged(SelectionContext selectionContext) {
        setValue(selectionContext.getSelectedVertexRefs());
    }

    @Override
    public GCFilterableContainer getContainerDataSource() {
        return (GCFilterableContainer)super.getContainerDataSource();
    }

    public String getTitle() { return m_title; }

}<commit_msg>SPC-536, remove unneeded itemSetChanged event. Caused shift click not to work<commit_after>package org.opennms.features.topology.app.internal;

import java.util.Collection;

import org.opennms.features.topology.api.GraphContainer;
import org.opennms.features.topology.api.SelectionContext;
import org.opennms.features.topology.api.SelectionListener;
import org.opennms.features.topology.api.topo.VertexRef;

import com.vaadin.ui.Tree;

@SuppressWarnings({"serial"})
public class VertexSelectionTree extends Tree implements SelectionListener {

	private final String m_title;
    private final GraphContainer m_graphContainer;

    public VertexSelectionTree(String title, GraphContainer graphContainer) {
        super(null, new GCFilterableContainer(graphContainer));
        m_title = title;
        
        m_graphContainer = graphContainer;
        
        this.addListener(new ValueChangeListener() {
            
            @Override
            public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) {

            	@SuppressWarnings("unchecked")
				Collection<VertexRef> refs = (Collection<VertexRef>)event.getProperty().getValue();
            	
            	Collection<VertexRef> vertices = m_graphContainer.getVertexRefForest(refs);
            	m_graphContainer.getSelectionManager().setSelectedVertexRefs(vertices);
            	
            }
        });

    }

    /**
     * When a user clicks on a vertex or edge in the UI, update the selection in the tree view.
     */
    @Override
    public void selectionChanged(SelectionContext selectionContext) {
        setValue(selectionContext.getSelectedVertexRefs());
    }

    @Override
    public GCFilterableContainer getContainerDataSource() {
        return (GCFilterableContainer)super.getContainerDataSource();
    }

    public String getTitle() { return m_title; }

}
{'fraction_non_alphanumeric': 0.0840719849583669, 'fraction_numerical': 0.0008058017727639, 'mean_word_length': 3.2903225806451615, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5717073', 'n_tokens_mistral': 994, 'n_tokens_neox': 968, 'n_words': 197}