trace/traceviewer/com.nokia.traceviewer/src/com/nokia/traceviewer/action/OpenDecodeFileInStartupHandler.java
changeset 11 5b9d4d8641ce
equal deleted inserted replaced
10:ed1c9f64298a 11:5b9d4d8641ce
       
     1 /*
       
     2  * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:
       
    15  *
       
    16  * Handles opening previous decode files in startup of TraceViewer
       
    17  *
       
    18  */
       
    19 package com.nokia.traceviewer.action;
       
    20 
       
    21 import com.nokia.traceviewer.engine.TraceViewerGlobals;
       
    22 
       
    23 /**
       
    24  * Handles opening previous decode files in startup of TraceViewer
       
    25  * 
       
    26  */
       
    27 public class OpenDecodeFileInStartupHandler extends Thread {
       
    28 
       
    29 	/**
       
    30 	 * Run already
       
    31 	 */
       
    32 	private static boolean runAlready;
       
    33 
       
    34 	/*
       
    35 	 * (non-Javadoc)
       
    36 	 * 
       
    37 	 * @see java.lang.Thread#run()
       
    38 	 */
       
    39 	@Override
       
    40 	public void run() {
       
    41 		if (!runAlready) {
       
    42 			runAlready = true;
       
    43 
       
    44 			OpenDecodeFileAction openDecodeFileAction = (OpenDecodeFileAction) TraceViewerGlobals
       
    45 					.getTraceViewer().getView().getActionFactory()
       
    46 					.getOpenDecodeFileAction();
       
    47 
       
    48 			openDecodeFileAction.openPreviousDecodeFiles();
       
    49 		}
       
    50 	}
       
    51 }