tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentFactory.java
changeset 56 aa2539c91954
parent 41 838cdffd57ce
equal deleted inserted replaced
54:a151135b0cf9 56:aa2539c91954
       
     1 /*
       
     2 * Copyright (c) 2007 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 * Factory class to create document interfaces
       
    17 *
       
    18 */
       
    19 package com.nokia.tracecompiler.utils;
       
    20 
       
    21 import com.nokia.tracecompiler.source.SourceDocumentFactory;
       
    22 import com.nokia.tracecompiler.source.SourceDocumentMonitor;
       
    23 
       
    24 /**
       
    25  * Factory class to create document interfaces
       
    26  * 
       
    27  */
       
    28 public final class DocumentFactory {
       
    29 
       
    30 	/**
       
    31 	 * Document monitor
       
    32 	 */
       
    33 	private static SourceDocumentMonitor monitor;
       
    34 
       
    35 
       
    36 	/**
       
    37 	 * Registers a document framework to be used by the engine
       
    38 	 * 
       
    39 	 * @param monitor
       
    40 	 *            the document monitor
       
    41 	 * @param factoryClass
       
    42 	 *            the document factory class
       
    43 	 */
       
    44 	public static void registerDocumentFramework(SourceDocumentMonitor monitor,
       
    45 			Class<? extends SourceDocumentFactory> factoryClass) {
       
    46 		DocumentFactory.monitor = monitor;
       
    47 	}
       
    48 
       
    49 	/**
       
    50 	 * Gets the document monitor
       
    51 	 * 
       
    52 	 * @return the monitor
       
    53 	 */
       
    54 	public static final SourceDocumentMonitor getDocumentMonitor() {
       
    55 		return monitor;
       
    56 	}
       
    57 }