<commit_before>package org.eclipse.dawnsci.plotting.api;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.dawnsci.plotting.api.tool.IToolPageSystem;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;

/**
 * A view with a plotting system on it and connected to python.
 * 
 * You may use this class to replace plot view because it has fewer dependencies
 * as the whole of analysis.rcp is not required.
 * 
 * @author fcp94556
 *
 */
public class VanillaPlottingSystemView extends ViewPart implements IAdaptable {
	
	protected IPlottingSystem     system;

	@Override
	public void createPartControl(Composite parent) {
		
		try {
		    system = PlottingFactory.createPlottingSystem();
		    system.createPlotPart(parent, getPartName(), getViewSite().getActionBars(), PlotType.IMAGE, this);
		    		    
		} catch (Exception ne) {
			throw new RuntimeException(ne); // Lazy
		}
		
	}<commit_msg>Added comment to use service.<commit_after>package org.eclipse.dawnsci.plotting.api;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.dawnsci.plotting.api.tool.IToolPageSystem;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;

/**
 * A view with a plotting system on it and connected to python.
 * 
 * You may use this class to replace plot view because it has fewer dependencies
 * as the whole of analysis.rcp is not required.
 * 
 * @author fcp94556
 *
 */
public class VanillaPlottingSystemView extends ViewPart implements IAdaptable {
	
	protected IPlottingSystem     system;

	@Override
	public void createPartControl(Composite parent) {
		
		try {
		    system = PlottingFactory.createPlottingSystem(); // TODO Change to service
		    system.createPlotPart(parent, getPartName(), getViewSite().getActionBars(), PlotType.IMAGE, this);
		    		    
		} catch (Exception ne) {
			throw new RuntimeException(ne); // Lazy
		}
		
	}
{'fraction_non_alphanumeric': 0.0903866248693835, 'fraction_numerical': 0.00522466039707419, 'mean_word_length': 3.89769820971867, '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': '2149641', 'n_tokens_mistral': 626, 'n_tokens_neox': 560, 'n_words': 160}