diff -r ca8a1b6995f6 -r 52e343bb8f80 tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/FileElementParser.java --- a/tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/propertyfile/FileElementParser.java Tue Aug 31 16:45:49 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -* FIle element parser -* -*/ -package com.nokia.tracecompiler.engine.propertyfile; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; - -import org.w3c.dom.Element; - -import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals; -import com.nokia.tracecompiler.engine.project.ProjectEngine; -import com.nokia.tracecompiler.engine.source.SourceEngine; -import com.nokia.tracecompiler.model.TraceCompilerException; - -/** - * File element parser - * - */ -final class FileElementParser implements PropertyFileElementParser { - - /* - * (non-Javadoc) - * - * @see com.nokia.tracecompiler.engine.propertyfile.PropertyFileElementParser# - * parse(java.lang.Object, org.w3c.dom.Element) - */ - public void parse(Object owner, Element element) - throws TraceCompilerException { - String filePath = element.getTextContent(); - SourceEngine sourceEngine = TraceCompilerEngineGlobals.getSourceEngine(); - ArrayList list = sourceEngine.getNonSourceFiles(); - - String projectPath = TraceCompilerEngineGlobals.getProjectPath(); - - File file = new File(projectPath + File.separatorChar - + ProjectEngine.traceFolderName + File.separatorChar + filePath); - - try { - filePath = file.getCanonicalPath(); - } catch (IOException e) { - e.printStackTrace(); - } - - if (!list.contains(filePath)) { - sourceEngine.addNonSourceFile(filePath); - } - } -} \ No newline at end of file