<commit_before>// -----BEGIN DISCLAIMER-----
/*******************************************************************************
 * Copyright (c) 2019 JCrypTool Team and Contributors
 *
 * All rights reserved. This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
// -----END DISCLAIMER-----
package org.jcryptool.visual.crtverification.views;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.CommandManager;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.jface.action.IContributionManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Scale;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
import org.eclipse.ui.menus.CommandContributionItem;
import org.eclipse.ui.menus.CommandContributionItemParameter;
import org.jcryptool.core.logging.utils.LogUtil;
import org.jcryptool.core.util.colors.ColorService;
import org.jcryptool.core.util.fonts.FontService;
import org.jcryptool.visual.crtverification.Activator;

public class CrtVerViewComposite extends Composite implements PaintListener {
    // Object Controller
    CrtVerViewController controller;
    CrtVerViewComposite crtComposite;
    
	// Variables
	Text textRootCaFromDay;
	Text textCaFromDay;
	Text textCertFromDay;
	Text textRootCaThruDay;
	Text textCaThruDay;
	Text textCertThruDay;
	Text textSignatureDateDay;
	Text textVerificationDateDay;

	Label thruRootCa;
	Label fromRootCa;
	Label thruCa;
	Label fromCa;
	Label thruCert;
	Label fromCert;
	Label signatureDate;
	Label labelValiditySymbol;
	Label verificationDate;

	Scale scaleCertBegin;
	Scale scaleCertEnd;
	Scale scaleCaBegin;
	Scale scaleCaEnd;
	Scale scaleRootCaBegin;
	Scale scaleRootCaEnd;
	Scale scaleVerificationDate;
	Scale scaleSignatureDate;

	Button btnLoadRootCa;
	Button btnLoadCa;
	Button btnLoadUserCert;
	Button btnValidate;
	Button btnShellModel;
	Button btnShellModelModified;
	Button btnChainModel;
//	Button btnReset;
	Canvas canvas1;
	Canvas canvas2;
	int arrowSigDiff = 0;
	int arrowVerDiff = 0;

	Text txtLogWindow;
	
	private Color light_blue = new Color(Display.getCurrent(), 30, 144, 255);
	private Color violet = new Color(Display.getCurrent(), 72, 61, 139);
	private Color orange = new Color(Display.getCurrent(), 255, 140, 0);

	/**
	 * counter for number of performed validations
	 */
	int validationCounter = 0;

    private void addContributionItem(IContributionManager manager, final String commandId,
           	final ImageDescriptor icon, final String tooltip)
        {
           	CommandContributionItemParameter param
           		= new CommandContributionItemParameter(PlatformUI.getWorkbench(), null, commandId, SWT.PUSH);
           	if(icon != null)
           		param.icon = icon;
           	if(tooltip != null && !tooltip.equals(""))
           		param.tooltip = tooltip;<commit_msg>Removed unused variable<commit_after>// -----BEGIN DISCLAIMER-----
/*******************************************************************************
 * Copyright (c) 2019 JCrypTool Team and Contributors
 *
 * All rights reserved. This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
// -----END DISCLAIMER-----
package org.jcryptool.visual.crtverification.views;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.CommandManager;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.jface.action.IContributionManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Scale;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
import org.eclipse.ui.menus.CommandContributionItem;
import org.eclipse.ui.menus.CommandContributionItemParameter;
import org.jcryptool.core.logging.utils.LogUtil;
import org.jcryptool.core.util.colors.ColorService;
import org.jcryptool.core.util.fonts.FontService;
import org.jcryptool.visual.crtverification.Activator;

public class CrtVerViewComposite extends Composite implements PaintListener {
    // Object Controller
    CrtVerViewController controller;
    CrtVerViewComposite crtComposite;
    
	// Variables
	Text textRootCaFromDay;
	Text textCaFromDay;
	Text textCertFromDay;
	Text textRootCaThruDay;
	Text textCaThruDay;
	Text textCertThruDay;
	Text textSignatureDateDay;
	Text textVerificationDateDay;

	Label thruRootCa;
	Label fromRootCa;
	Label thruCa;
	Label fromCa;
	Label thruCert;
	Label fromCert;
	Label signatureDate;
	Label labelValiditySymbol;
	Label verificationDate;

	Scale scaleCertBegin;
	Scale scaleCertEnd;
	Scale scaleCaBegin;
	Scale scaleCaEnd;
	Scale scaleRootCaBegin;
	Scale scaleRootCaEnd;
	Scale scaleVerificationDate;
	Scale scaleSignatureDate;

	Button btnLoadRootCa;
	Button btnLoadCa;
	Button btnLoadUserCert;
	Button btnValidate;
	Button btnShellModel;
	Button btnShellModelModified;
	Button btnChainModel;
//	Button btnReset;
	Canvas canvas1;
	Canvas canvas2;
	int arrowSigDiff = 0;
	int arrowVerDiff = 0;

	Text txtLogWindow;
	
//	private Color light_blue = new Color(Display.getCurrent(), 30, 144, 255);
	private Color violet = new Color(Display.getCurrent(), 72, 61, 139);
	private Color orange = new Color(Display.getCurrent(), 255, 140, 0);

	/**
	 * counter for number of performed validations
	 */
	int validationCounter = 0;

    private void addContributionItem(IContributionManager manager, final String commandId,
           	final ImageDescriptor icon, final String tooltip)
        {
           	CommandContributionItemParameter param
           		= new CommandContributionItemParameter(PlatformUI.getWorkbench(), null, commandId, SWT.PUSH);
           	if(icon != null)
           		param.icon = icon;
           	if(tooltip != null && !tooltip.equals(""))
           		param.tooltip = tooltip;
{'fraction_non_alphanumeric': 0.12827163404857345, 'fraction_numerical': 0.00825277057297807, 'mean_word_length': 4.97815362931642, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3878854', 'n_tokens_mistral': 2671, 'n_tokens_neox': 2478, 'n_words': 561}