<commit_before>/*
 *    Debrief - the Open Source Maritime Analysis Application
 *    http://debrief.info
 *
 *    (C) 2000-2014, PlanetMayo Ltd
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the Eclipse Public License v1.0
 *    (http://www.eclipse.org/legal/epl-v10.html)
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 */
package org.mwc.debrief.core;

import org.eclipse.jface.dialogs.PopupDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;

public class ResetPerspective
{
	private static final String RESET_PERSPECTIVE = "";
	private static final long resetPerspective = 6;

	public void resetPerspective()
	{
		try
		{
			final long resetPerspectivePreference = DebriefPlugin.getDefault()
					.getResetPerspectivePreference();
			if (resetPerspective > resetPerspectivePreference)
			{
				Display.getDefault().asyncExec(new Runnable()
				{

					@Override
					public void run()
					{
						IWorkbenchWindow window = PlatformUI.getWorkbench()
								.getActiveWorkbenchWindow();
						if (window == null)
						{
							return;
						}
						final IWorkbenchPage page = window.getActivePage();
						// first start
						if (!(resetPerspectivePreference == 0 && page.findView(DebriefPlugin.INTROVIEW) != null))
						{
							page.resetPerspective();
							String info;<commit_msg>Increment perspective, to get new views (including unit-centric)<commit_after>/*
 *    Debrief - the Open Source Maritime Analysis Application
 *    http://debrief.info
 *
 *    (C) 2000-2014, PlanetMayo Ltd
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the Eclipse Public License v1.0
 *    (http://www.eclipse.org/legal/epl-v10.html)
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 */
package org.mwc.debrief.core;

import org.eclipse.jface.dialogs.PopupDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;

public class ResetPerspective
{
	private static final String RESET_PERSPECTIVE = "";
	private static final long resetPerspective = 7;

	public void resetPerspective()
	{
		try
		{
			final long resetPerspectivePreference = DebriefPlugin.getDefault()
					.getResetPerspectivePreference();
			if (resetPerspective > resetPerspectivePreference)
			{
				Display.getDefault().asyncExec(new Runnable()
				{

					@Override
					public void run()
					{
						IWorkbenchWindow window = PlatformUI.getWorkbench()
								.getActiveWorkbenchWindow();
						if (window == null)
						{
							return;
						}
						final IWorkbenchPage page = window.getActivePage();
						// first start
						if (!(resetPerspectivePreference == 0 && page.findView(DebriefPlugin.INTROVIEW) != null))
						{
							page.resetPerspective();
							String info;
{'fraction_non_alphanumeric': 0.09612817089452604, 'fraction_numerical': 0.007476635514018692, 'mean_word_length': 3.4542211652794292, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3956753', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1099, 'n_words': 290}