<commit_before>package eu.scape_project.pw.ui.graph;

import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;

import eu.scape_project.pw.ui.graph.components.MeasureContentProvider;
import eu.scape_project.pw.ui.graph.components.MeasureLabelProvider;
import eu.scape_project.pw.ui.graph.components.MeasureTreeGenerator;

public class GraphComposite extends Composite {

	private Combo dropDown;

	private Label label;
	
	private ChartCanvas chartCanvas;
	
	private ChartLoader cLoader ;

	private TreeViewer viewer;
	
	private MeasureTreeGenerator generator;
	
	public GraphComposite(Composite parent, int style) {
		super(parent, style);
		this.setLayout(new GridLayout());
		cLoader = new ChartLoader();
		generator = new MeasureTreeGenerator();
		//dropDown = new Combo(this, SWT.DROP_DOWN);
		//fillDropDown();
		//label = new Label(this, 0);
		//label.setText("Hello World");
		viewer = new TreeViewer(this, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
		viewer.setContentProvider(new MeasureContentProvider());
		viewer.setLabelProvider(new MeasureLabelProvider());
		viewer.setInput(generator.getMeasureTree());
		viewer.getTree().setLayoutData(new GridData(400,200));
		chartCanvas = new ChartCanvas(this,SWT.NONE);
		chartCanvas.setLayoutData(new GridData(600,400));
		//chartCanvas.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_CYAN));
//		dropDown.addSelectionListener(new SelectionListener() {
//
//			public void widgetSelected(SelectionEvent e) {
//				label.setText(dropDown.getItem(dropDown.getSelectionIndex()));
//				cLoader.load(dropDown.getItem(dropDown.getSelectionIndex()));
//				chartCanvas.setChart(cLoader.getChart());
//				chartCanvas.redraw();
//				layout();
//			}
//
//			
//			public void widgetDefaultSelected(SelectionEvent e) {
//				// TODO Auto-generated method stub
//				
//			}
//			
//		});
	}

	private void fillDropDown() {
		IProject project = ResourcesPlugin.getWorkspace().getRoot()
				.getProject("Simulation");
		IFolder output = project.getFolder("output");
		try {
			for (IResource s : output.members()) {
				dropDown.add(s.getName());
			}
		} catch (CoreException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
<commit_msg>small update in GraphComposite<commit_after>package eu.scape_project.pw.ui.graph;

import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;

import eu.scape_project.pw.ui.graph.components.MeasureContentProvider;
import eu.scape_project.pw.ui.graph.components.MeasureLabelProvider;
import eu.scape_project.pw.ui.graph.components.MeasureTreeGenerator;
import eu.scape_project.pw.ui.graph.model.INode;

public class GraphComposite extends Composite {

	private Combo dropDown;

	private Label label;

	private ChartCanvas chartCanvas;

	private ChartLoader cLoader;

	private TreeViewer viewer;

	private MeasureTreeGenerator generator;

	public GraphComposite(Composite parent, int style) {
		super(parent, style);
		this.setLayout(new GridLayout());
		cLoader = new ChartLoader();
		generator = new MeasureTreeGenerator();
		// dropDown = new Combo(this, SWT.DROP_DOWN);
		// fillDropDown();
		label = new Label(this, 0);
		label.setText("Hello World");
		viewer = new TreeViewer(this, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
		viewer.setContentProvider(new MeasureContentProvider());
		viewer.setLabelProvider(new MeasureLabelProvider());
		viewer.setInput(generator.getMeasureTree());
		viewer.getTree().setLayoutData(new GridData(400, 200));
		chartCanvas = new ChartCanvas(this, SWT.NONE);
		chartCanvas.setLayoutData(new GridData(600, 400));
		viewer.getTree().addSelectionListener(new SelectionListener() {

			public void widgetSelected(SelectionEvent e) {
				IStructuredSelection s = (IStructuredSelection) viewer
						.getSelection();
				INode node = (INode) s.getFirstElement();
				label.setText(node.getName());
				// cLoader.load(dropDown.getItem(dropDown.getSelectionIndex()));
				// chartCanvas.setChart(cLoader.getChart());
				// chartCanvas.redraw();
				// layout();
			}

			public void widgetDefaultSelected(SelectionEvent e) {
				// TODO Auto-generated method stub

			}

		});
	}

	private void fillDropDown() {
		IProject project = ResourcesPlugin.getWorkspace().getRoot()
				.getProject("Simulation");
		IFolder output = project.getFolder("output");
		try {
			for (IResource s : output.members()) {
				dropDown.add(s.getName());
			}
		} catch (CoreException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}

{'fraction_non_alphanumeric': 0.12522202486678508, 'fraction_numerical': 0.004618117229129663, 'mean_word_length': 4.811145510835913, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2502623', 'n_tokens_mistral': 1925, 'n_tokens_neox': 1737, 'n_words': 312}