<commit_before>package org.lamport.tla.toolbox.ui.view;

import java.io.IOException;
import java.net.URL;

import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
import org.lamport.tla.toolbox.Activator;
import org.lamport.tla.toolbox.util.UIHelper;
import org.osgi.framework.Bundle;

/**
 * The toolbox view that is shown when no spec is loaded.
 * @author <NAME>
 * @version $Id$
 */
public class ToolboxWelcomeView extends ViewPart
{

    private Composite parentComposite;

    public static final String ID = "toolbox.view.ToolboxWelcomeView";

    public ToolboxWelcomeView()
    {
    }

    public void createPartControl(Composite parent)
    {
        parentComposite = parent;
        Browser browser = null;
        try
        {
            browser = new Browser(parent, SWT.NONE);
        } catch (SWTError e)
        {
            Activator.logError("Error instantiating browser widget.", e);
        }
        // this code is necessary for opening a local file in the plugin
        Bundle plugin = Activator.getDefault().getBundle();
        IPath relativePagePath = new Path("welcome\\welcomeView.html");
        URL fileInPlugin = FileLocator.find(plugin, relativePagePath, null);
        URL pageUrl;
        try
        {
            pageUrl = FileLocator.toFileURL(fileInPlugin);
            browser.setUrl(pageUrl.toString());
        } catch (IOException e)
        {
            Activator.logError("Error opening toolbox welcome view file.", e);
        }

        UIHelper.setHelp(parent, "WelcomeView");<commit_msg>Fixed path bug.<commit_after>package org.lamport.tla.toolbox.ui.view;

import java.io.IOException;
import java.net.URL;

import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
import org.lamport.tla.toolbox.Activator;
import org.lamport.tla.toolbox.util.UIHelper;
import org.osgi.framework.Bundle;

/**
 * The toolbox view that is shown when no spec is loaded.
 * @author <NAME>
 * @version $Id$
 */
public class ToolboxWelcomeView extends ViewPart
{

    private Composite parentComposite;

    public static final String ID = "toolbox.view.ToolboxWelcomeView";

    public ToolboxWelcomeView()
    {
    }

    public void createPartControl(Composite parent)
    {
        parentComposite = parent;
        Browser browser = null;
        try
        {
            browser = new Browser(parent, SWT.NONE);
        } catch (SWTError e)
        {
            Activator.logError("Error instantiating browser widget.", e);
        }
        // this code is necessary for opening a local file in the plugin
        Bundle plugin = Activator.getDefault().getBundle();
        IPath relativePagePath = new Path("welcome/welcomeView.html");
        URL fileInPlugin = FileLocator.find(plugin, relativePagePath, null);
        URL pageUrl;
        try
        {
            pageUrl = FileLocator.toFileURL(fileInPlugin);
            browser.setUrl(pageUrl.toString());
        } catch (IOException e)
        {
            Activator.logError("Error opening toolbox welcome view file.", e);
        }

        UIHelper.setHelp(parent, "WelcomeView");
{'fraction_non_alphanumeric': 0.10176125244618395, 'fraction_numerical': 0.0, 'mean_word_length': 2.834941050375134, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5329202', 'n_tokens_mistral': 1065, 'n_tokens_neox': 1038, 'n_words': 247}