<commit_before>package ee.ut.cs.rum.workspace.internal.ui.task.details.sidebar;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;

import ee.ut.cs.rum.controller.RumController;
import ee.ut.cs.rum.workspace.internal.ui.task.details.TaskDetailsComposite;

public class DetailsSidebar extends Composite {
	private static final long serialVersionUID = -4976100121238756769L;
	
	private TaskDetailsComposite taskDetailsComposite;
	private SubTaskTableViewer subTaskTableViewer;

	public DetailsSidebar(TaskDetailsComposite taskDetailsComposite, RumController rumController) {
		super(taskDetailsComposite, SWT.NONE);
		
		this.taskDetailsComposite=taskDetailsComposite;
		
		this.setLayout(new GridLayout(1, false));
		this.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
		
		Button generalInfoButton = new Button(this, SWT.PUSH);
		generalInfoButton.setText("General info");
		generalInfoButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
		generalInfoButton.addListener(SWT.Selection, new Listener() {
			private static final long serialVersionUID = -9188529455494099314L;

			@Override
			public void handleEvent(Event arg0) {
				//TODO: Switch to general info
			}
		});
		
		Label label = new Label(this, SWT.NONE);
		label.setText("Sub-tasks:");
		label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false));
		
		this.subTaskTableViewer = new SubTaskTableViewer(this);
		subTaskTableViewer.addSelectionChangedListener(new SubTaskSelectionChangedListener(taskDetailsComposite));
	}<commit_msg>Show general info in task details view when generalInfoButton is pressed<commit_after>package ee.ut.cs.rum.workspace.internal.ui.task.details.sidebar;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;

import ee.ut.cs.rum.controller.RumController;
import ee.ut.cs.rum.workspace.internal.ui.task.details.TaskDetailsComposite;

public class DetailsSidebar extends Composite {
	private static final long serialVersionUID = -4976100121238756769L;
	
	private TaskDetailsComposite taskDetailsComposite;
	private SubTaskTableViewer subTaskTableViewer;

	public DetailsSidebar(TaskDetailsComposite taskDetailsComposite, RumController rumController) {
		super(taskDetailsComposite, SWT.NONE);
		
		this.taskDetailsComposite=taskDetailsComposite;
		
		this.setLayout(new GridLayout(1, false));
		this.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
		
		Button generalInfoButton = new Button(this, SWT.PUSH);
		generalInfoButton.setText("General info");
		generalInfoButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
		generalInfoButton.addListener(SWT.Selection, new Listener() {
			private static final long serialVersionUID = -9188529455494099314L;

			@Override
			public void handleEvent(Event arg0) {
				taskDetailsComposite.getTaskDetailsContainer().showGeneralInfo();
			}
		});
		
		Label label = new Label(this, SWT.NONE);
		label.setText("Sub-tasks:");
		label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false));
		
		this.subTaskTableViewer = new SubTaskTableViewer(this);
		subTaskTableViewer.addSelectionChangedListener(new SubTaskSelectionChangedListener(taskDetailsComposite));
	}
{'fraction_non_alphanumeric': 0.10130010834236186, 'fraction_numerical': 0.021668472372697724, 'mean_word_length': 5.928705440900563, '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': '3233453', 'n_tokens_mistral': 1291, 'n_tokens_neox': 1151, 'n_words': 210}