Commits

Anonymous committed c872143

CWS-TOOLING: integrate CWS unoapi04
2009-06-26 14:00:27 +0200 lla r273410 : #i102248# cleanups
2009-06-26 13:36:44 +0200 lla r273407 : #i102248# fix problem with too long sleeps and waits
2009-06-26 08:34:17 +0200 lla r273393 : #i102248# cleanups
2009-06-26 08:28:43 +0200 lla r273392 : #i102248# cleanups
2009-06-25 13:17:19 +0200 lla r273379 : #i102248# add prototypes
2009-06-25 11:31:02 +0200 lla r273371 : #i102248# cleanups
2009-06-25 11:15:18 +0200 lla r273370 : #i102248# add a selftest for demonstration.
2009-06-25 10:53:35 +0200 lla r273369 : #i102248# add a selftest for demonstration.
2009-06-25 10:38:10 +0200 lla r273368 : #i102248# add a selftest for demonstration.
2009-06-23 11:09:35 +0200 lla r273266 : #i102248# cleanup
2009-06-23 11:00:15 +0200 lla r273265 : #i10i108248# add cwstestresult to cwscheckapi
2009-06-23 10:59:50 +0200 lla r273264 : #i10i108248# add cwstestresult to cwscheckapi
2009-06-23 10:58:47 +0200 lla r273263 : #i102248# add selftest

  • Participants
  • Parent commits 3ba7520

Comments (0)

Files changed (23)

File qadevOOo/objdsc/qadevOOo/bogus.SelfTest.csv

+# "Name";
+#          "com::sun::star::" will overread
+#                                               method name which is called
+"SelfTest";"com::sun::star::qadevooo::SelfTest";"testmethod()"
+"SelfTest";"com::sun::star::qadevooo::SelfTest";"testmethod2()"
+"SelfTest";"com::sun::star::qadevooo::SelfTest";"testmethod3()"
+# "SelfTest";"com::sun::star::qadevooo::SelfTest#optional";"testmethod4_bogus()"

File qadevOOo/qa/unoapi/knownissues.xcl

+# This file contains all Errors

File qadevOOo/qa/unoapi/makefile.mk

+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.8 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org 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.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=qadevOOo
+TARGET=qa_unoapi
+
+.INCLUDE: settings.mk
+
+.INCLUDE: target.mk
+
+ALLTAR : UNOAPI_TEST
+
+UNOAPI_TEST:
+	+$(SOLARENV)$/bin$/checkapi -sce qadevOOo.sce -xcl knownissues.xcl -tdoc $(PWD)$/testdocuments 

File qadevOOo/qa/unoapi/qadevOOo.sce

+-o qadevOOo.SelfTest

File qadevOOo/runner/base/java_fat.java

  *
  * this class handles tests written in java and running on a fat Office
  */
-public class java_fat implements TestBase {
+public class java_fat implements TestBase
+{
 
-    public static boolean debug = false;
-    public static boolean keepdocument = false;
-    public static boolean logging = true;
-    public static boolean newOffice = false;
+    private static boolean debug = false;
+    private static boolean keepdocument = false;
+    private static boolean logging = true;
+    private static boolean newOffice = false;
     private DynamicClassLoader dcl = null;
 
-    public boolean executeTest(lib.TestParameters param) {
-        dcl = new DynamicClassLoader();
+    private lib.TestParameters m_aParams;
+    private AppProvider m_aOffice;
 
-        DescGetter dg = new APIDescGetter();
-        String job = (String) param.get("TestJob");
-        String ExclusionFile = (String) param.get("ExclusionList");
-        Vector exclusions = null;
-        boolean retValue = true;
-        debug = param.getBool("DebugIsActive");
-        logging = param.getBool("LoggingIsActive");
-        keepdocument = param.getBool("KeepDocument");
-        newOffice = param.getBool(util.PropertyName.NEW_OFFICE_INSTANCE);
-        if (keepdocument) {
-            System.setProperty("KeepDocument", "true");
-        }
-        if (ExclusionFile != null) {
-            exclusions = getExclusionList(ExclusionFile, debug);
-        }
-        //get Job-Descriptions
-        System.out.println("Getting Descriptions for Job: " + job);
+    public boolean executeTest(lib.TestParameters param)
+        {
+            m_aParams = param;
 
-        DescEntry[] entries = dg.getDescriptionFor(job,
-            (String) param.get(
-            "DescriptionPath"),
-            debug);
+            dcl = new DynamicClassLoader();
 
-        System.out.println();
+            DescGetter dg = new APIDescGetter();
+            String job = (String) param.get("TestJob");
+            String ExclusionFile = (String) param.get("ExclusionList");
+            Vector exclusions = null;
+            boolean retValue = true;
+            debug = param.getBool("DebugIsActive");
+            logging = param.getBool("LoggingIsActive");
+            keepdocument = param.getBool("KeepDocument");
+            newOffice = param.getBool(util.PropertyName.NEW_OFFICE_INSTANCE);
+            if (keepdocument)
+            {
+                System.setProperty("KeepDocument", "true");
+            }
+            if (ExclusionFile != null)
+            {
+                exclusions = getExclusionList(ExclusionFile, debug);
+            }
+            //get Job-Descriptions
+            System.out.println("Getting Descriptions for Job: " + job);
 
-        if (entries == null) {
-            System.out.println("Couldn't get Description for Job: " + job);
+            String sDescriptionPath = (String) param.get("DescriptionPath");
+            DescEntry[] entries = dg.getDescriptionFor(job, sDescriptionPath, debug);
 
-            return false;
-        }
+            // System.out.println();
+
+            if (entries == null)
+            {
+                System.out.println("Couldn't get Description for Job: " + job);
+
+                return false;
+            }
 
 //        String officeProviderName = (String) param.get("OfficeProvider");
 //        AppProvider office = (AppProvider) dcl.getInstance(officeProviderName);
 //            System.exit(-1);
 //        }
 
-        AppProvider office = startOffice(param);
+            m_aOffice = startOffice(param);
 
-        boolean firstRun = true;
+            boolean firstRun = true;
 
-        for (int l = 0; l < entries.length; l++) {
-            if (entries[l] == null) {
-                continue;
-            }
+            for (int l = 0; l < entries.length; l++)
+            {
+                if (entries[l] == null)
+                {
+                    continue;
+                }
 
-            if (entries[l].hasErrorMsg) {
-                System.out.println(entries[l].ErrorMsg);
+                if (entries[l].hasErrorMsg)
+                {
+                    System.out.println(entries[l].ErrorMsg);
+                    retValue = false;
+                    continue;
+                }
 
-                continue;
-            }
-
-            if (!firstRun && newOffice) {
-                if (!office.closeExistingOffice(param, true)) {
-                    office.disposeManager(param);
+                if (!firstRun && newOffice)
+                {
+                    if (!m_aOffice.closeExistingOffice(param, true))
+                    {
+                        m_aOffice.disposeManager(param);
+                    }
+                    startOffice(param);
                 }
-                startOffice(param);
-            }
-            firstRun = false;
+                firstRun = false;
 
 //            XMultiServiceFactory msf = (XMultiServiceFactory) office.getManager(
 //                                               param);
 
-            XMultiServiceFactory msf = (XMultiServiceFactory) param.getMSF();
+                XMultiServiceFactory msf = (XMultiServiceFactory) param.getMSF();
 
-            if (msf == null) {
-                retValue = false;
-
-                continue;
-            }
-
-//            param.put("ServiceFactory", msf);
-
-            DescEntry entry = entries[l];
-
-            //get some helper classes
-            Summarizer sumIt = new Summarizer();
-
-            TestCase tCase = null;
-
-            try {
-                tCase = (TestCase) dcl.getInstance("mod._" +
-                    entry.entryName);
-            } catch (java.lang.IllegalArgumentException ie) {
-                entry.ErrorMsg = ie.getMessage();
-                entry.hasErrorMsg = true;
-            } catch (java.lang.NoClassDefFoundError ie) {
-                entry.ErrorMsg = ie.getMessage();
-                entry.hasErrorMsg = true;
-            }
-
-            if (tCase == null) {
-                Summarizer.summarizeDown(entry, entry.ErrorMsg);
-
-                LogWriter sumObj = OutProducerFactory.createOutProducer(param);
-                entry.UserDefinedParams = param;
-                sumObj.initialize(entry, logging);
-                sumObj.summary(entry);
-
-                continue;
-            }
-
-            if (debug) {
-                System.out.println("sleeping 5 seconds..");
-            }
-            util.utils.shortWait(5000);
-
-            System.out.println("Creating: " + entry.entryName);
-
-            LogWriter log = (LogWriter) dcl.getInstance(
-                (String) param.get("LogWriter"));
-            log.initialize(entry, logging);
-            entry.UserDefinedParams = param;
-
-            TestEnvironment tEnv = null;
-
-            try {
-                tCase.setLogWriter((PrintWriter) log);
-                tCase.initializeTestCase(param);
-                tEnv = tCase.getTestEnvironment(param);
-            } catch (Exception e) {
-                System.out.println("Exception while creating " +
-                    tCase.getObjectName());
-                System.out.println("Message " + e.getMessage());
-                e.printStackTrace();
-                tEnv = null;
-            } catch (java.lang.UnsatisfiedLinkError e) {
-                System.out.println("Exception while creating " +
-                    tCase.getObjectName());
-                System.out.println("Message " + e.getMessage());
-                tEnv = null;
-            } catch (java.lang.NoClassDefFoundError e) {
-                System.out.println("Exception while creating " +
-                    tCase.getObjectName());
-                System.out.println("Message " + e.getMessage());
-                tEnv = null;
-            }
-
-            if (tEnv == null) {
-                Summarizer.summarizeDown(entry,
-                    "Couldn't create " +
-                    tCase.getObjectName());
-
-                LogWriter sumObj = OutProducerFactory.createOutProducer(param);
-                entry.UserDefinedParams = param;
-                sumObj.initialize(entry, logging);
-                sumObj.summary(entry);
-
-                continue;
-            }
-
-            System.out.println(tCase.getObjectName() + " recreated ");
-
-            for (int j = 0; j < entry.SubEntryCount; j++) {
-                if (!entry.SubEntries[j].isToTest) {
-                    Summarizer.summarizeDown(entry.SubEntries[j],
-                        "not part of the job");
+                if (msf == null)
+                {
+                    retValue = false;
 
                     continue;
                 }
 
-                if ((exclusions != null) && (exclusions.contains(entry.SubEntries[j].longName))) {
-                    Summarizer.summarizeDown(entry.SubEntries[j],
-                        "known issue");
+//            param.put("ServiceFactory", msf);
+
+                DescEntry entry = entries[l];
+
+                //get some helper classes
+                Summarizer sumIt = new Summarizer();
+
+                TestCase tCase = null;
+
+                try
+                {
+                    tCase = (TestCase) dcl.getInstance("mod._" + entry.entryName);
+                }
+                catch (java.lang.IllegalArgumentException ie)
+                {
+                    entry.ErrorMsg = ie.getMessage();
+                    entry.hasErrorMsg = true;
+                }
+                catch (java.lang.NoClassDefFoundError ie)
+                {
+                    entry.ErrorMsg = ie.getMessage();
+                    entry.hasErrorMsg = true;
+                }
+
+                if (tCase == null)
+                {
+                    Summarizer.summarizeDown(entry, entry.ErrorMsg);
+
+                    LogWriter sumObj = OutProducerFactory.createOutProducer(param);
+                    entry.UserDefinedParams = param;
+                    sumObj.initialize(entry, logging);
+                    sumObj.summary(entry);
 
                     continue;
                 }
 
-                System.out.println("running: '" + entry.SubEntries[j].entryName + "'");
+                if (debug)
+                {
+                    System.out.println("sleeping 5 seconds..");
+                }
+                util.utils.shortWait(5000);
 
-                LogWriter ifclog = (LogWriter) dcl.getInstance(
-                    (String) param.get("LogWriter"));
+                System.out.println("Creating: " + entry.entryName);
 
-                ifclog.initialize(entry.SubEntries[j], logging);
-                entry.SubEntries[j].UserDefinedParams = param;
-                entry.SubEntries[j].Logger = ifclog;
+                LogWriter log = (LogWriter) dcl.getInstance((String) param.get("LogWriter"));
+                log.initialize(entry, logging);
+                entry.UserDefinedParams = param;
 
-                if ((tEnv == null) || tEnv.isDisposed()) {
-                    helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
-                        "AppProvider");
+                TestEnvironment tEnv = null;
 
-                    if (ph != null) {
-                        office.closeExistingOffice(param, true);
-                        shortWait(5000);
+                try
+                {
+                    tCase.setLogWriter((PrintWriter) log);
+                    tCase.initializeTestCase(param);
+                    tEnv = tCase.getTestEnvironment(param);
+                }
+                catch (Exception e)
+                {
+                    System.out.println("Exception while creating " + tCase.getObjectName());
+                    System.out.println("Message " + e.getMessage());
+                    e.printStackTrace();
+                    tEnv = null;
+                }
+                catch (java.lang.UnsatisfiedLinkError e)
+                {
+                    System.out.println("Exception while creating " + tCase.getObjectName());
+                    System.out.println("Message " + e.getMessage());
+                    tEnv = null;
+                }
+                catch (java.lang.NoClassDefFoundError e)
+                {
+                    System.out.println("Exception while creating " + tCase.getObjectName());
+                    System.out.println("Message " + e.getMessage());
+                    tEnv = null;
+                }
+
+                if (tEnv == null)
+                {
+                    Summarizer.summarizeDown(entry, "Couldn't create " + tCase.getObjectName());
+
+                    LogWriter sumObj = OutProducerFactory.createOutProducer(param);
+                    entry.UserDefinedParams = param;
+                    sumObj.initialize(entry, logging);
+                    sumObj.summary(entry);
+
+                    continue;
+                }
+
+                System.out.println(tCase.getObjectName() + " recreated ");
+
+                for (int j = 0; j < entry.SubEntryCount; j++)
+                {
+                    DescEntry aSubEntry = entry.SubEntries[j];
+                    if (!aSubEntry.isToTest)
+                    {
+                        Summarizer.summarizeDown(aSubEntry, "not part of the job");
+
+                        continue;
                     }
 
-                    tEnv = getEnv(entry, param);
+                    if ((exclusions != null) && (exclusions.contains(aSubEntry.longName)))
+                    {
+                        Summarizer.summarizeDown(aSubEntry, "known issue");
+
+                        continue;
+                    }
+
+                    System.out.println("running: '" + aSubEntry.entryName + "'");
+
+                    LogWriter ifclog = (LogWriter) dcl.getInstance( (String) param.get("LogWriter"));
+
+                    ifclog.initialize(aSubEntry, logging);
+                    aSubEntry.UserDefinedParams = param;
+                    aSubEntry.Logger = ifclog;
+
+                    if ((tEnv == null) || tEnv.isDisposed())
+                    {
+                        closeExistingOffice();
+                        tEnv = getEnv(entry, param);
+                    }
+
+                    MultiMethodTest ifc = null;
+                    lib.TestResult res = null;
+
+                    // run the interface test twice if it failed.
+                    int countInterfaceTestRun = 0;
+                    boolean finished = false;
+                    while (!finished)
+                    {
+                        try
+                        {
+                            countInterfaceTestRun++;
+                            finished = true;
+                            res = executeInterfaceTest(aSubEntry, tEnv, param);
+                        }
+                        catch (IllegalArgumentException iae)
+                        {
+                            System.out.println("Couldn't load class " + aSubEntry.entryName);
+                            System.out.println("**** " + iae.getMessage() + " ****");
+                            Summarizer.summarizeDown(aSubEntry, iae.getMessage());
+                        }
+                        catch (java.lang.NoClassDefFoundError iae)
+                        {
+                            System.out.println("Couldn't load class " + aSubEntry.entryName);
+                            System.out.println("**** " + iae.getMessage() + " ****");
+                            Summarizer.summarizeDown(aSubEntry, iae.getMessage());
+                        }
+                        catch (java.lang.RuntimeException e)
+                        {
+                            closeExistingOffice();
+                            tEnv = getEnv(entry, param);
+                            if (countInterfaceTestRun < 2)
+                            {
+                                finished = false;
+                            }
+                            else
+                            {
+                                Summarizer.summarizeDown(aSubEntry, e.toString() + ".FAILED");
+                            }
+                        }
+                    }
+                    if (res != null)
+                    {
+                        for (int k = 0; k < aSubEntry.SubEntryCount; k++)
+                        {
+                            DescEntry aSubSubEntry = aSubEntry.SubEntries[k];
+                            if (res.hasMethod( aSubSubEntry.entryName))
+                            {
+                                aSubSubEntry.State = res.getStatusFor(aSubSubEntry.entryName).toString();
+                            }
+                        }
+                    }
+
+                    sumIt.summarizeUp(aSubEntry);
+
+                    LogWriter sumIfc = OutProducerFactory.createOutProducer(param);
+                    aSubEntry.UserDefinedParams = param;
+                    sumIfc.initialize(aSubEntry, logging);
+                    sumIfc.summary(aSubEntry);
                 }
 
-                MultiMethodTest ifc = null;
-                lib.TestResult res = null;
-
-                // run the interface test twice if it failed.
-                int countInterfaceTestRun = 0;
-                boolean finished = false;
-                while (!finished) {
-                    try {
-                        countInterfaceTestRun++;
-                        finished = true;
-                        res = executeInterfaceTest(entry.SubEntries[j], tEnv, param);
-                    } catch (IllegalArgumentException iae) {
-                        System.out.println("Couldn't load class " +
-                            entry.SubEntries[j].entryName);
-                        System.out.println("**** " + iae.getMessage() + " ****");
-                        Summarizer.summarizeDown(entry.SubEntries[j],
-                            iae.getMessage());
-                    } catch (java.lang.NoClassDefFoundError iae) {
-                        System.out.println("Couldn't load class " +
-                            entry.SubEntries[j].entryName);
-                        System.out.println("**** " + iae.getMessage() + " ****");
-                        Summarizer.summarizeDown(entry.SubEntries[j],
-                            iae.getMessage());
-                    } catch (java.lang.RuntimeException e) {
-                        helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
-                            "AppProvider");
-
-                        if (ph != null) {
-                            office.closeExistingOffice(param, true);
-                            shortWait(5000);
-                        }
-
-                        tEnv = getEnv(entry, param);
-                        if (countInterfaceTestRun < 2) {
-                            finished = false;
-                        } else {
-                            Summarizer.summarizeDown(entry.SubEntries[j],
-                                e.toString() + ".FAILED");
-                        }
+                try
+                {
+                    if (!keepdocument)
+                    {
+                        tCase.cleanupTestCase(param);
                     }
                 }
-                if (res != null) {
-                    for (int k = 0; k < entry.SubEntries[j].SubEntryCount; k++) {
-                        if (res.hasMethod(
-                            entry.SubEntries[j].SubEntries[k].entryName)) {
-                            entry.SubEntries[j].SubEntries[k].State = res.getStatusFor(
-                                entry.SubEntries[j].SubEntries[k].entryName).toString();
-                        }
+                catch (Exception e)
+                {
+                    System.out.println("couldn't cleanup");
+                }
+                catch (java.lang.NoClassDefFoundError e)
+                {
+                    System.out.println("couldn't cleanup");
+                }
+
+                sumIt.summarizeUp(entry);
+
+                LogWriter sumObj = OutProducerFactory.createOutProducer(param);
+
+                sumObj.initialize(entry, logging);
+                sumObj.summary(entry);
+            }
+
+            if (entries.length > 0)
+            {
+                System.out.println();
+
+                int counter = 0;
+                System.out.println("Failures that appeared during scenario execution:");
+
+                for (int i = 0; i < entries.length; i++)
+                {
+                    if (!entries[i].State.endsWith("OK"))
+                    {
+                        System.out.println("\t " + entries[i].longName);
+                        counter++;
                     }
                 }
 
-                sumIt.summarizeUp(entry.SubEntries[j]);
-
-                LogWriter sumIfc = OutProducerFactory.createOutProducer(param);
-                entry.SubEntries[j].UserDefinedParams = param;
-                sumIfc.initialize(entry.SubEntries[j], logging);
-                sumIfc.summary(entry.SubEntries[j]);
+                System.out.println(counter + " of " + entries.length + " tests failed");
             }
 
-            try {
-                if (!keepdocument) {
-                    tCase.cleanupTestCase(param);
-                }
-            } catch (Exception e) {
-                System.out.println("couldn't cleanup");
-            } catch (java.lang.NoClassDefFoundError e) {
-                System.out.println("couldn't cleanup");
-            }
-
-            sumIt.summarizeUp(entry);
-
-            LogWriter sumObj = OutProducerFactory.createOutProducer(param);
-
-            sumObj.initialize(entry, logging);
-            sumObj.summary(entry);
+            closeExistingOffice();
+            return retValue;
         }
 
-        if (entries.length > 1) {
-            System.out.println();
-
-            int counter = 0;
-            System.out.println(
-                "Failures that appeared during scenario execution:");
-
-            for (int i = 0; i < entries.length; i++) {
-                if (!entries[i].State.endsWith("OK")) {
-                    System.out.println("\t " + entries[i].longName);
-                    counter++;
-                }
-            }
-
-            System.out.println(counter + " of " + entries.length +
-                " tests failed");
-        }
-
-        helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
-            "AppProvider");
-
-        if (ph != null) {
-            office.closeExistingOffice(param, true);
-            shortWait(5000);
-        }
-
-        return retValue;
-    }
-
-    protected TestEnvironment getEnv(DescEntry entry, TestParameters param) {
+    private TestEnvironment getEnv(DescEntry entry, TestParameters param)
+        {
 //        if (dcl == null)
 //            dcl = new DynamicClassLoader();
 //        String officeProviderName = (String) param.get("OfficeProvider");
 //
 //        param.put("ServiceFactory", msf);
 
-        AppProvider office = startOffice(param);
+            // AppProvider office = startOffice(param);
 
-        TestCase tCase = null;
+            TestCase tCase = null;
 
-        try {
-            tCase = (TestCase) dcl.getInstance("mod._" + entry.entryName);
-        } catch (java.lang.IllegalArgumentException ie) {
-            entry.ErrorMsg = ie.getMessage();
-            entry.hasErrorMsg = true;
-        } catch (java.lang.NoClassDefFoundError ie) {
-            entry.ErrorMsg = ie.getMessage();
-            entry.hasErrorMsg = true;
+            try
+            {
+                tCase = (TestCase) dcl.getInstance("mod._" + entry.entryName);
+            }
+            catch (java.lang.IllegalArgumentException ie)
+            {
+                entry.ErrorMsg = ie.getMessage();
+                entry.hasErrorMsg = true;
+            }
+            catch (java.lang.NoClassDefFoundError ie)
+            {
+                entry.ErrorMsg = ie.getMessage();
+                entry.hasErrorMsg = true;
+            }
+
+            System.out.println("Creating: " + entry.entryName);
+
+            entry.UserDefinedParams = param;
+
+            LogWriter log = (LogWriter) dcl.getInstance((String) param.get("LogWriter"));
+            log.initialize(entry, logging);
+            tCase.setLogWriter((PrintWriter) log);
+
+            TestEnvironment tEnv = null;
+
+            try
+            {
+                tCase.initializeTestCase(param);
+                tEnv = tCase.getTestEnvironment(param);
+            }
+            catch (com.sun.star.lang.DisposedException de)
+            {
+                System.out.println("Office disposed");
+                closeExistingOffice();
+            }
+            catch (lib.StatusException e)
+            {
+                System.out.println(e.getMessage());
+
+                closeExistingOffice();
+
+                entry.ErrorMsg = e.getMessage();
+                entry.hasErrorMsg = true;
+            }
+
+            return tEnv;
         }
 
-        System.out.println("Creating: " + entry.entryName);
+    private void closeExistingOffice()
+        {
+            helper.ProcessHandler ph = (helper.ProcessHandler) m_aParams.get("AppProvider");
 
-        entry.UserDefinedParams = param;
-
-        LogWriter log = (LogWriter) dcl.getInstance(
-            (String) param.get("LogWriter"));
-        log.initialize(entry, logging);
-        tCase.setLogWriter((PrintWriter) log);
-
-        TestEnvironment tEnv = null;
-
-        try {
-            tCase.initializeTestCase(param);
-            tEnv = tCase.getTestEnvironment(param);
-        } catch (com.sun.star.lang.DisposedException de) {
-            System.out.println("Office disposed");
-
-            helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
-                "AppProvider");
-
-            if (ph != null) {
-                office.closeExistingOffice(param, true);
-                shortWait(5000);
-            }
-        } catch (lib.StatusException e) {
-            System.out.println(e.getMessage());
-
-            helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
-                "AppProvider");
-
-            if (ph != null) {
-                office.closeExistingOffice(param, true);
+            if (ph != null)
+            {
+                m_aOffice.closeExistingOffice(m_aParams, true);
                 shortWait(5000);
             }
 
-            entry.ErrorMsg = e.getMessage();
-            entry.hasErrorMsg = true;
+        }
+    
+    private void shortWait(int millis)
+        {
+            try
+            {
+                Thread.sleep(millis);
+            }
+            catch (java.lang.InterruptedException ie)
+            {
+            }
         }
 
-        return tEnv;
-    }
+    private Vector getExclusionList(String url, boolean debug)
+        {
+            Vector entryList = new Vector();
+            String line = "#";
+            BufferedReader exclusion = null;
 
-    protected void shortWait(int millis) {
-        try {
-            Thread.sleep(millis);
-        } catch (java.lang.InterruptedException ie) {
-        }
-    }
+            try
+            {
+                exclusion = new BufferedReader(new FileReader(url));
+            }
+            catch (java.io.FileNotFoundException fnfe)
+            {
+                if (debug)
+                {
+                    System.out.println("Couldn't find file " + url);
+                }
 
-    protected Vector getExclusionList(String url, boolean debug) {
-        Vector entryList = new Vector();
-        String line = "#";
-        BufferedReader exclusion = null;
+                return entryList;
+            }
 
-        try {
-            exclusion = new BufferedReader(new FileReader(url));
-        } catch (java.io.FileNotFoundException fnfe) {
-            if (debug) {
-                System.out.println("Couldn't find file " + url);
+            while (line != null)
+            {
+                try
+                {
+                    if (!line.startsWith("#") && (line.length() > 1))
+                    {
+                        entryList.add(line.trim());
+                    }
+
+                    line = exclusion.readLine();
+                }
+                catch (java.io.IOException ioe)
+                {
+                    if (debug)
+                    {
+                        System.out.println("Exception while reading exclusion list");
+                    }
+
+                    return entryList;
+                }
+            }
+
+            try
+            {
+                exclusion.close();
+            }
+            catch (java.io.IOException ioe)
+            {
+                if (debug)
+                {
+                    System.out.println("Couldn't close file " + url);
+                }
+
+                return entryList;
             }
 
             return entryList;
         }
 
-        while (line != null) {
-            try {
-                if (!line.startsWith("#") && (line.length() > 1)) {
-                    entryList.add(line.trim());
-                }
-
-                line = exclusion.readLine();
-            } catch (java.io.IOException ioe) {
-                if (debug) {
-                    System.out.println(
-                        "Exception while reading exclusion list");
-                }
-
-                return entryList;
-            }
+    private TestResult executeInterfaceTest(
+        DescEntry entry, TestEnvironment tEnv, TestParameters param)
+        throws IllegalArgumentException, java.lang.NoClassDefFoundError
+        {
+            MultiMethodTest ifc = (MultiMethodTest) dcl.getInstance(entry.entryName);
+            return ifc.run(entry, tEnv, param);
         }
 
-        try {
-            exclusion.close();
-        } catch (java.io.IOException ioe) {
-            if (debug) {
-                System.out.println("Couldn't close file " + url);
+    private AppProvider startOffice(lib.TestParameters param)
+        {
+
+            if (dcl == null)
+            {
+                dcl = new DynamicClassLoader();
             }
 
-            return entryList;
+            String officeProviderName = (String) param.get("OfficeProvider");
+            AppProvider office = (AppProvider) dcl.getInstance(officeProviderName);
+
+            if (office == null)
+            {
+                System.out.println("ERROR: Wrong parameter 'OfficeProvider', " + " it cannot be instantiated.");
+                System.exit(-1);
+            }
+
+            XMultiServiceFactory msf = (XMultiServiceFactory) office.getManager(param);
+
+            if (msf != null)
+            {
+                param.put("ServiceFactory", msf);
+            }
+
+            return office;
         }
-
-        return entryList;
-    }
-
-    private TestResult executeInterfaceTest(
-        DescEntry entry, TestEnvironment tEnv, TestParameters param)
-        throws IllegalArgumentException, java.lang.NoClassDefFoundError {
-        MultiMethodTest ifc = (MultiMethodTest) dcl.getInstance(entry.entryName);
-        return ifc.run(entry, tEnv, param);
-    }
-
-    private AppProvider startOffice(lib.TestParameters param) {
-
-        if (dcl == null) {
-            dcl = new DynamicClassLoader();
-        }
-
-        String officeProviderName = (String) param.get("OfficeProvider");
-        AppProvider office = (AppProvider) dcl.getInstance(officeProviderName);
-
-        if (office == null) {
-            System.out.println("ERROR: Wrong parameter 'OfficeProvider', " +
-                " it cannot be instantiated.");
-            System.exit(-1);
-        }
-
-        XMultiServiceFactory msf = (XMultiServiceFactory) office.getManager(
-            param);
-            
-        if (msf != null){
-            param.put("ServiceFactory", msf);
-        }
-
-        return office;
-    }
 }

File qadevOOo/runner/complexlib/ComplexTestCase.java

     {
         return this.getClass().getName();
     }
-}
+}

File qadevOOo/runner/complexlib/MethodThread.java

  * Invoke a method of a class in an own thread. Provide a method to end
  * the thread.
  */
-public class MethodThread extends Thread {
+public class MethodThread extends Thread
+{
 
     /** The method that should be executed **/
     private Method mTestMethod = null;
     private String mErrMessage = null;
     /** Did an Exception happen? **/
     private boolean mExceptionHappened = false;
-    
     private Object[] mParameter = null;
 
     /**
      * @param invokeClass The class where the method is invoked.
      * @param log The logging mechanism.
      */
-    public MethodThread(Method testMethod, Object invokeClass, PrintWriter log) {
+    public MethodThread(Method testMethod, Object invokeClass, PrintWriter log)
+    {
         mTestMethod = testMethod;
         mInvokeClass = invokeClass;
         mLog = log;
     }
 
-    public MethodThread(Method testMethod, Object invokeClass, Object[] parameter, PrintWriter log) {
+    public MethodThread(Method testMethod, Object invokeClass, Object[] parameter, PrintWriter log)
+    {
         mTestMethod = testMethod;
         mInvokeClass = invokeClass;
         mParameter = parameter;
     /**
      * Invoke the method.
      */
-    public void run() {
-        try {
+    public void run()
+    {
+        try
+        {
             mTestMethod.invoke(mInvokeClass, mParameter);
         }
-        catch(IllegalAccessException e) {
+        catch (IllegalAccessException e)
+        {
             e.printStackTrace(mLog);
             mErrMessage = e.getMessage();
             mExceptionHappened = true;
         }
-        catch(java.lang.reflect.InvocationTargetException e) {
+        catch (java.lang.reflect.InvocationTargetException e)
+        {
             Throwable t = e.getTargetException();
-            if (!(t instanceof ComplexTestCase.AssureException)) {
+            if (!(t instanceof ComplexTestCase.AssureException))
+            {
                 t.printStackTrace(mLog);
                 mErrMessage = t.getMessage();
                 if (mErrMessage == null)
+                {
                     mErrMessage = t.toString();
+                }
                 mExceptionHappened = true;
             }
-            
+
         }
     }
 
      * Get the error message
      * @return The error message.
      */
-    public String getErrorMessage() {
+    public String getErrorMessage()
+    {
         return mErrMessage;
     }
 
      * Is there an error message?
      * @return True, if an error did happen.
      */
-    public boolean hasErrorMessage() {
+    public boolean hasErrorMessage()
+    {
         return mExceptionHappened;
     }
 
     /**
      * Stop the running method.
      */
-    public void destroy() {
-        try {
+    public void destroy()
+    {
+        try
+        {
             interrupt();
         }
-        catch(SecurityException e) {
+        catch (SecurityException e)
+        {
             e.printStackTrace(mLog);
             mErrMessage = e.getMessage();
             mExceptionHappened = true;

File qadevOOo/runner/helper/APIDescGetter.java

 import share.DescEntry;
 import share.DescGetter;
 
-
 /**
  * This is the Office-API specific DescGetter<br>
  * <br>
  * -sce sw.SwXBodyText,sw.SwXBookmark<br>
  * runs the module test of <B>Sw.SwXBodyText</B> and <B>sw.SwXBookmark</B><br>
  */
+public class APIDescGetter extends DescGetter
+{
 
-public class APIDescGetter extends DescGetter {
     private static String fullJob = null;
 
-    
     /*
      * gets the needed information about a StarOffice component
      * @param descPath Path to the ComponentDescription
      * @param entry contains the entry name, e.g. sw.SwXBodyText
      * @param debug if true some debug information is displayed on standard out
      */
-    public DescEntry[] getDescriptionFor(String job, String descPath, 
-                                         boolean debug) {
+    public DescEntry[] getDescriptionFor(String job, String descPath,
+            boolean debug)
+    {
 
-        if (job.startsWith("-o")) {
+        if (job.startsWith("-o"))
+        {
             job = job.substring(3, job.length()).trim();
 
-            if (job.indexOf(".") < 0) {
+            if (job.indexOf(".") < 0)
+            {
                 return null;
             }
 
             // special in case several Interfaces are given comma separated
-            if (job.indexOf(",") < 0) {
-                DescEntry entry = getDescriptionForSingleJob(job, descPath, 
-                                                             debug);
+            if (job.indexOf(",") < 0)
+            {
+                DescEntry entry = getDescriptionForSingleJob(job, descPath,
+                        debug);
 
-                if (entry != null) {
-                    return new DescEntry[] { entry };
-                } else {
+                if (entry != null)
+                {
+                    return new DescEntry[]
+                            {
+                                entry
+                            };
+                }
+                else
+                {
                     return null;
                 }
-            } else {
+            }
+            else
+            {
                 ArrayList subs = getSubInterfaces(job);
                 String partjob = job.substring(0, job.indexOf(",")).trim();
-                DescEntry entry = getDescriptionForSingleJob(partjob, descPath, 
-                                                             debug);
+                DescEntry entry = getDescriptionForSingleJob(partjob, descPath,
+                        debug);
 
-                if (entry != null) {
-                    for (int i = 0; i < entry.SubEntryCount; i++) {
+                if (entry != null)
+                {
+                    for (int i = 0; i < entry.SubEntryCount; i++)
+                    {
                         String subEntry = entry.SubEntries[i].longName;
                         int cpLength = entry.longName.length();
-                        subEntry = subEntry.substring(cpLength + 2, 
-                                                      subEntry.length());
+                        subEntry = subEntry.substring(cpLength + 2,
+                                subEntry.length());
 
-                        if (subs.contains(subEntry)) {
+                        if (subs.contains(subEntry))
+                        {
                             entry.SubEntries[i].isToTest = true;
                         }
                     }
 
-                    return new DescEntry[] { entry };
-                } else {
+                    return new DescEntry[]
+                            {
+                                entry
+                            };
+                }
+                else
+                {
                     return null;
                 }
             }
         }
 
-        if (job.startsWith("-p")) {
+        if (job.startsWith("-p"))
+        {
             job = job.substring(3, job.length()).trim();
 
             String[] scenario = createScenario(descPath, job, debug);
-            if (scenario == null) {
+            if (scenario == null)
+            {
                 return null;
             }
             DescEntry[] entries = new DescEntry[scenario.length];
-            for (int i=0;i<scenario.length;i++) {
+            for (int i = 0; i < scenario.length; i++)
+            {
                 entries[i] = getDescriptionForSingleJob(
-                                    scenario[i].substring(3).trim(), descPath, debug);
+                        scenario[i].substring(3).trim(), descPath, debug);
             }
-            if (job.equals("listall")) {
-                util.dbg.printArray(scenario);  
+            if (job.equals("listall"))
+            {
+                util.dbg.printArray(scenario);
                 System.exit(0);
             }
             return entries;
         }
 
-        if (job.startsWith("-sce")) {
+        if (job.startsWith("-sce"))
+        {
             job = job.substring(5, job.length()).trim();
-            
+
             File sceFile = new File(job);
             if (sceFile.exists())
+            {
                 return getScenario(job, descPath, debug);
-            else {
+            }
+            else
+            {
                 //look the scenarion like this? :
                 // sw.SwXBodyText,sw.SwXTextCursor
                 ArrayList subs = getSubObjects(job);
                 DescEntry[] entries = new DescEntry[subs.size()];
-                
-                for (int i=0; i<subs.size(); i++){
+
+                for (int i = 0; i < subs.size(); i++)
+                {
                     entries[i] = getDescriptionForSingleJob(
-                                          (String)subs.get(i), descPath, debug);
+                            (String) subs.get(i), descPath, debug);
                 }
                 return entries;
             }
-        } else {
+        }
+        else
+        {
             return null;
         }
     }
 
-    protected DescEntry getDescriptionForSingleJob(String job, String descPath, 
-                                                   boolean debug) {
+    protected DescEntry getDescriptionForSingleJob(String job, String descPath,
+            boolean debug)
+    {
         boolean isSingleInterface = job.indexOf("::") > 0;
         fullJob = job;
 
-        if (isSingleInterface) {
+        if (isSingleInterface)
+        {
             job = job.substring(0, job.indexOf("::"));
         }
 
-        if (job.startsWith("bugs")) {
+        if (job.startsWith("bugs"))
+        {
             DescEntry Entry = new DescEntry();
             Entry.entryName = job;
             Entry.longName = job;
 
         DescEntry entry = null;
 
-        if (descPath != null) {
-            if (debug) {
+        if (descPath != null)
+        {
+            if (debug)
+            {
                 System.out.println("## reading from File " + descPath);
             }
 
             entry = getFromDirectory(descPath, job, debug);
-        } else {
-            if (debug) {
+        }
+        else
+        {
+            if (debug)
+            {
                 System.out.println("## reading from jar");
             }
 
 
         boolean foundInterface = false;
 
-        if (isSingleInterface && (entry != null)) {
-            for (int i = 0; i < entry.SubEntryCount; i++) {
-                if (!(entry.SubEntries[i].longName).equals(fullJob)) {
+        if (isSingleInterface && (entry != null))
+        {
+            for (int i = 0; i < entry.SubEntryCount; i++)
+            {
+                if (!(entry.SubEntries[i].longName).equals(fullJob))
+                {
                     entry.SubEntries[i].isToTest = false;
-                } else {
+                }
+                else
+                {
                     foundInterface = true;
                     entry.SubEntries[i].isToTest = true;
                 }
             }
         }
 
-        if (isSingleInterface && !foundInterface || entry == null) {
-            return setErrorDescription(entry, 
-                "couldn't find a description for test '" + fullJob+ "'");
+        if (isSingleInterface && !foundInterface || entry == null)
+        {
+            return setErrorDescription(entry,
+                    "couldn't find a description for test '" + fullJob + "'");
         }
 
         return entry;
     }
 
-    protected static DescEntry[] getSubEntries(BufferedReader cvsFile, 
-                                               DescEntry parent, boolean debug) {
+    protected static DescEntry[] getSubEntries(BufferedReader cvsFile,
+            DescEntry parent, boolean debug)
+    {
         String line = "";
         String old_ifc_name = "";
         ArrayList ifc_names = new ArrayList();
         ArrayList meth_names = new ArrayList();
         DescEntry ifcDesc = null;
-        DescEntry methDesc = null;
-        String entryType = "service";
 
-        while (line != null) {
-            try {
+        while (line != null)
+        {
+            try
+            {
                 line = cvsFile.readLine();
+                if (line == null)
+                {
+                    continue;
+                }
+                if (line.startsWith("#"))
+                {
+                    continue;
+                }
+                if (line.length() <= 0)
+                {
+                    continue;
+                }
+// TODO Probleme here
+                // int nFirstSemicolon = line.indexOf(";");
+                // int nLastSemicolon = line.lastIndexOf(";");
 
-                if ((line != null) && (line.length() > 0)) {
-                    String ifc_name = line.substring(line.indexOf(";") + 2, 
-                                                     line.lastIndexOf(";") - 1);
-                    String meth_name = line.substring(line.lastIndexOf(";") + 2, 
-                                                      line.length() - 1);
+                String unknown;
+                String ifc_name = ""; //  = line.substring(line.indexOf(";") + 2, line.lastIndexOf(";") - 1);
+                String meth_name = ""; //  = line.substring(line.lastIndexOf(";") + 2, line.length() - 1);
+                StringTokenizer aToken = new StringTokenizer(line, ";");
+                if (aToken.countTokens() < 3)
+                {
+                    System.out.println("Wrong format: Line '" + line + "' is not supported.");
+                    continue;
+                }
+                if (aToken.hasMoreTokens())
+                {
+                    unknown = StringHelper.removeQuoteIfExists(aToken.nextToken());
+                }
+                if (aToken.hasMoreTokens())
+                {
+                    ifc_name = StringHelper.removeQuoteIfExists(aToken.nextToken());
+                }
+                if (aToken.hasMoreTokens())
+                {
+                    meth_name = StringHelper.removeQuoteIfExists(aToken.nextToken());
+                }
 
-                    methDesc = new DescEntry();
+                // String ifc_name = line.substring(line.indexOf(";") + 2, line.lastIndexOf(";") - 1);
+                // String meth_name = line.substring(line.lastIndexOf(";") + 2, line.length() - 1);
 
-                    if (meth_name.indexOf("#optional") > 0) {
-                        methDesc.isOptional = true;
-                        meth_name = meth_name.substring(0, 
-                                                        meth_name.indexOf("#"));
-                    }
+                DescEntry methDesc = createDescEntry(meth_name, ifc_name, parent);
+                meth_names.add(methDesc);
 
-                    if (meth_name.endsWith("()")) {
-                        methDesc.EntryType = "method";
-                        entryType = "interface";
-                    } else {
-                        methDesc.EntryType = "property";
-                        entryType = "service";
-                    }
+                if (!ifc_name.equals(old_ifc_name))
+                {
+                    if (ifcDesc != null)
+                    {
+                        ifcDesc.SubEntries = getDescArray(meth_names.toArray());
+                        ifcDesc.SubEntryCount = meth_names.size();
 
-                    methDesc.entryName = meth_name;
-                    methDesc.isToTest = true;
+                        //mark service/interface as optional if all methods/properties are optional
+                        boolean allOptional = true;
 
-                    String withoutHash = ifc_name;
-
-                    if (ifc_name.indexOf("#optional") > 0) {
-                        withoutHash = ifc_name.substring(0, 
-                                                         ifc_name.indexOf("#"));
-                    }
-
-                    methDesc.longName = parent.entryName + "::" + 
-                                        withoutHash + "::" + meth_name;
-
-                    if (!ifc_name.equals(old_ifc_name)) {
-                        if (ifcDesc != null) {
-                            ifcDesc.SubEntries = getDescArray(
-                                                         meth_names.toArray());
-                            ifcDesc.SubEntryCount = meth_names.size();
-
-                            //mark service/interface as optional if all methods/properties are optional
-                            boolean allOptional = true;
-
-                            for (int k = 0; k < ifcDesc.SubEntryCount; k++) {
-                                if (!ifcDesc.SubEntries[k].isOptional) {
-                                    allOptional = false;
-                                }
-                            }
-
-                            if (!ifcDesc.isOptional && allOptional) {
-                                ifcDesc.isOptional = allOptional;
-                            }
-
-                            meth_names.clear();
-                            ifc_names.add(ifcDesc);
-                        }
-
-                        ifcDesc = new DescEntry();
-                        ifcDesc.isToTest = true;
-                        old_ifc_name = ifc_name;
-
-                        if (ifc_name.indexOf("#optional") > 0) {
-                            ifcDesc.isOptional = true;
-                            ifc_name = ifc_name.substring(0, 
-                                                          ifc_name.indexOf("#"));
-                        }
-
-                        StringTokenizer st = new StringTokenizer(ifc_name, ":");
-                        String className = "";
-
-                        int count = 3;
-
-                        if (ifc_name.startsWith("drafts")) {
-                            count = 4;
-                        }
-
-                        for (int i = 0; st.hasMoreTokens(); i++) {
-                            String token = st.nextToken();
-
-                            // skipping (drafts.)com.sun.star
-                            if (i >= count) {
-                                if (!st.hasMoreTokens()) {
-                                    // inserting '_' before the last token
-                                    token = "_" + token;
-                                }
-
-                                className += ("." + token);
+                        for (int k = 0; k < ifcDesc.SubEntryCount; k++)
+                        {
+                            if (!ifcDesc.SubEntries[k].isOptional)
+                            {
+                                allOptional = false;
                             }
                         }
 
-                        ifcDesc.EntryType = entryType;
-                        ifcDesc.entryName = "ifc" + className;
-                        ifcDesc.longName = parent.entryName + "::" + 
-                                           ifc_name;
+                        if (!ifcDesc.isOptional && allOptional)
+                        {
+                            ifcDesc.isOptional = allOptional;
+                        }
+
+                        meth_names.clear();
+                        ifc_names.add(ifcDesc);
                     }
 
-                    meth_names.add(methDesc);
+                    ifcDesc = new DescEntry();
+                    ifcDesc.isToTest = true;
+                    old_ifc_name = ifc_name;
+
+                    if (ifc_name.indexOf("#optional") > 0)
+                    {
+                        ifcDesc.isOptional = true;
+                        ifc_name = ifc_name.substring(0, ifc_name.indexOf("#"));
+                    }
+
+                    StringTokenizer st = new StringTokenizer(ifc_name, ":");
+                    String className = "";
+
+                    int count = 3;
+
+                    if (ifc_name.startsWith("drafts"))
+                    {
+                        count = 4;
+                    }
+
+                    for (int i = 0; st.hasMoreTokens(); i++)
+                    {
+                        String token = st.nextToken();
+
+                        // skipping (drafts.)com.sun.star
+                        if (i >= count)
+                        {
+                            if (!st.hasMoreTokens())
+                            {
+                                // inserting '_' before the last token
+                                token = "_" + token;
+                            }
+
+                            className += ("." + token);
+                        }
+                    }
+
+                    ifcDesc.EntryType = entryType;
+                    ifcDesc.entryName = "ifc" + className;
+                    ifcDesc.longName = parent.entryName + "::" + ifc_name;
                 }
-            } catch (java.io.IOException ioe) {
+                
+            }
+            catch (java.io.IOException ioe)
+            {
                 parent.hasErrorMsg = true;
                 parent.ErrorMsg = "IOException while reading the description";
 
         //mark service/interface as optional if all methods/properties are optional
         boolean allOptional = true;
 
-        for (int k = 0; k < ifcDesc.SubEntryCount; k++) {
-            if (!ifcDesc.SubEntries[k].isOptional) {
+        for (int k = 0; k < ifcDesc.SubEntryCount; k++)
+        {
+            if (!ifcDesc.SubEntries[k].isOptional)
+            {
                 allOptional = false;
             }
         }
 
-        if (!ifcDesc.isOptional && allOptional) {
+        if (!ifcDesc.isOptional && allOptional)
+        {
             ifcDesc.isOptional = allOptional;
         }
 
         return getDescArray(makeArray(ifc_names));
     }
 
+    private static String entryType;
+    private static DescEntry createDescEntry(String meth_name, String ifc_name, DescEntry parent)
+    {
+        entryType = "service";
+        DescEntry methDesc = new DescEntry();
+
+        if (meth_name.indexOf("#optional") > 0)
+        {
+            methDesc.isOptional = true;
+            meth_name = meth_name.substring(0, meth_name.indexOf("#"));
+        }
+
+        if (meth_name.endsWith("()"))
+        {
+            methDesc.EntryType = "method";
+            entryType = "interface";
+        }
+        else
+        {
+            methDesc.EntryType = "property";
+            entryType = "service";
+        }
+
+        methDesc.entryName = meth_name;
+        methDesc.isToTest = true;
+
+
+        String withoutHash = ifc_name;
+
+        if (ifc_name.indexOf("#optional") > 0)
+        {
+            withoutHash = ifc_name.substring(0, ifc_name.indexOf("#"));
+        }
+
+        methDesc.longName = parent.entryName + "::" + withoutHash + "::" + meth_name;
+
+        return methDesc;
+    }
+
+    private static void createIfcName(String ifc_name, ArrayList meth_names, DescEntry ifcDesc)
+    {
+
+    }
     /**
      * This method ensures that XComponent will be the last in the list of interfaces
      */
-    protected static Object[] makeArray(ArrayList entries) {
+    protected static Object[] makeArray(ArrayList entries)
+    {
         Object[] entriesArray = entries.toArray();
         ArrayList returnArray = new ArrayList();
         Object addAtEnd = null;
 
-        for (int k = 0; k < entriesArray.length; k++) {
+        for (int k = 0; k < entriesArray.length; k++)
+        {
             DescEntry entry = (DescEntry) entriesArray[k];
 
-            if (entry.entryName.equals("ifc.lang._XComponent")) {
+            if (entry.entryName.equals("ifc.lang._XComponent"))
+            {
                 addAtEnd = entry;
-            } else {
+            }
+            else
+            {
                 returnArray.add(entry);
             }
         }
 
-        if (addAtEnd != null) {
+        if (addAtEnd != null)
+        {
             returnArray.add(addAtEnd);
         }
 
         return returnArray.toArray();
     }
 
-    protected static DescEntry setErrorDescription(DescEntry entry, 
-                                                   String ErrorMsg) {
+    protected static DescEntry setErrorDescription(DescEntry entry,
+            String ErrorMsg)
+    {
         if (entry == null)
+        {
             entry = new DescEntry();
+        }
         entry.hasErrorMsg = true;
-        entry.ErrorMsg = "Error while getting description for test '" + 
-            fullJob + "' as an API test: " + ErrorMsg;
+        entry.ErrorMsg = "Error while getting description for test '" +
+                fullJob + "' as an API test: " + ErrorMsg;
 
         return entry;
     }
 
-    protected static DescEntry[] getDescArray(Object[] list) {
+    protected static DescEntry[] getDescArray(Object[] list)
+    {
         DescEntry[] entries = new DescEntry[list.length];
 
-        for (int i = 0; i < list.length; i++) {
+        for (int i = 0; i < list.length; i++)
+        {
             entries[i] = (DescEntry) list[i];
         }
 
         return entries;
     }
 
-    protected DescEntry getFromClassPath(String aEntry, boolean debug) {
+    protected DescEntry getFromClassPath(String aEntry, boolean debug)
+    {
         int dotindex = aEntry.indexOf('.');
 
-        if (dotindex == -1) {
+        if (dotindex == -1)
+        {
             return null;
         }
 
         String module = null;
         String shortName = null;
 
-        if (aEntry.indexOf(".uno") == -1) {
+        if (aEntry.indexOf(".uno") == -1)
+        {
             module = aEntry.substring(0, aEntry.indexOf('.'));
             shortName = aEntry.substring(aEntry.indexOf('.') + 1);
-        } else {
+        }
+        else
+        {
             module = aEntry.substring(0, aEntry.lastIndexOf('.'));
             shortName = aEntry.substring(aEntry.lastIndexOf('.') + 1);
         }
 
         java.net.URL url = this.getClass().getResource("/objdsc/" + module);
 
-        if (url == null) {
-            return setErrorDescription(theEntry, 
-                                       "couldn't find module '" + module + "'");
+        if (url == null)
+        {
+            return setErrorDescription(theEntry,
+                    "couldn't find module '" + module + "'");
         }
 
-        try {
+        try
+        {
             java.net.URLConnection con = url.openConnection();
 
-            if (con instanceof java.net.JarURLConnection) {
+            String sEndsWithCSVName = "." + shortName.trim() + ".csv";
+            if (con instanceof java.net.JarURLConnection)
+            {
                 // get Jar file from connection
                 java.util.jar.JarFile f = ((java.net.JarURLConnection) con).getJarFile();
 
                 // Enumerate over all entries
                 java.util.Enumeration e = f.entries();
 
-                while (e.hasMoreElements()) {
+                String sStartModule = "/" + module + "/";
+                while (e.hasMoreElements())
+                {
 
                     String entry = e.nextElement().toString();
 
 //                        System.out.println("### Read from connetion: " + entry);
 //                    }
 
-                    if ((entry.lastIndexOf("/" + module + "/") != -1) &&
-                        entry.endsWith("." + shortName.trim() + ".csv")) {
-                        InputStream input = this.getClass()
-                                                .getResourceAsStream("/" + 
-                                                                     entry);
-                        csvFile = new BufferedReader(
-                                          new InputStreamReader(input));
-
+                    if ((entry.lastIndexOf(sStartModule) != -1) &&
+                            entry.endsWith(sEndsWithCSVName))
+                    {
+                        InputStream input = this.getClass().getResourceAsStream("/" + entry);
+                        csvFile = new BufferedReader(new InputStreamReader(input));
                         break;
                     }
                 }
-            } else {
+            }
+            else
+            {
                 InputStream in = con.getInputStream();
-                java.io.BufferedReader buf = new java.io.BufferedReader(
-                                                     new InputStreamReader(in));
+                java.io.BufferedReader buf = new java.io.BufferedReader(new InputStreamReader(in));
                 boolean found = false;
 
-                while (buf.ready() && !found) {
+                while (buf.ready() && !found)
+                {
                     String entry = buf.readLine();
 
-                    if (entry.endsWith(shortName.trim() + ".csv")) {
+                    if (entry.endsWith(sEndsWithCSVName))
+                    {
                         System.out.println("FOUND  ####");
-                        InputStream input = this.getClass()
-                                                .getResourceAsStream("/objdsc/" + 
-                                                                     module + 
-                                                                     "/" + 
-                                                                     entry);
+                        InputStream input = this.getClass().getResourceAsStream("/objdsc/" +
+                                module +
+                                "/" +
+                                entry);
                         csvFile = new BufferedReader(
-                                          new InputStreamReader(input));
+                                new InputStreamReader(input));
                         found = true;
                     }
                 }
 
                 buf.close();
             }
-        } catch (java.io.IOException e) {
+        }
+        catch (java.io.IOException e)
+        {
             e.printStackTrace();
         }
 
-        if (csvFile == null) {
-            return setErrorDescription(theEntry, 
-                                       "couldn't find component '" + 
-                                       theEntry.entryName + "'");
+        if (csvFile == null)
+        {
+            return setErrorDescription(theEntry,
+                    "couldn't find component '" +
+                    theEntry.entryName + "'");
         }
 
         DescEntry[] subEntries = getSubEntries(csvFile, theEntry, debug);
         return theEntry;
     }
 
-    protected static DescEntry getFromDirectory(String descPath, String entry, 
-                                                boolean debug) {
+    protected static DescEntry getFromDirectory(String descPath, String entry,
+            boolean debug)
+    {
         int dotindex = entry.indexOf('.');
 
-        if (dotindex == -1) {
+        if (dotindex == -1)
+        {
             return null;
         }
 
         String module = null;
         String shortName = null;
 
-        if (entry.indexOf(".uno") == -1) {
+        if (entry.indexOf(".uno") == -1)
+        {
             module = entry.substring(0, entry.indexOf('.'));
             shortName = entry.substring(entry.indexOf('.') + 1);
-        } else {
+        }
+        else
+        {
             module = entry.substring(0, entry.lastIndexOf('.'));
             shortName = entry.substring(entry.lastIndexOf('.') + 1);
         }
         aEntry.EntryType = "component";
         aEntry.isToTest = true;
 
-        if (debug) {
+        if (debug)
+        {
             System.out.println("Parsing Description Path: " + descPath);
             System.out.println("Searching module: " + module);
             System.out.println("For the Component " + shortName);
 
         File modPath = new File(descPath + fs + module);
 
-        if (!modPath.exists()) {
-            return setErrorDescription(aEntry, 
-                                       "couldn't find module '" + module + "'");
+        if (!modPath.exists())
+        {
+            return setErrorDescription(aEntry,
+                    "couldn't find module '" + module + "'");
         }
 
         String[] files = modPath.list();
         String found = "none";
 
-        for (int i = 0; i < files.length; i++) {
-            if (files[i].endsWith("." + shortName + ".csv")) {
+        for (int i = 0; i < files.length; i++)
+        {
+            if (files[i].endsWith("." + shortName + ".csv"))
+            {
                 found = files[i];
                 System.out.println("found " + found);
                 break;
             }
         }
 
-        if (found.equals("none")) {
-            return setErrorDescription(aEntry, 
-                                       "couldn't find component '" + entry + "'");
+        if (found.equals("none"))
+        {
+            return setErrorDescription(aEntry,
+                    "couldn't find component '" + entry + "'");
         }
 
         String aUrl = descPath + fs + module + fs + found;
 
         BufferedReader csvFile = null;
 
-        try {
+        try
+        {
             csvFile = new BufferedReader(new FileReader(aUrl));
-        } catch (java.io.FileNotFoundException fnfe) {
+        }
+        catch (java.io.FileNotFoundException fnfe)
+        {
             return setErrorDescription(aEntry, "couldn't find file '" + aUrl + "'");
         }
 
         return aEntry;
     }
 
-    protected ArrayList getSubInterfaces(String job) {
+    protected ArrayList getSubInterfaces(String job)
+    {
         ArrayList namesList = new ArrayList();
         StringTokenizer st = new StringTokenizer(job, ",");
 
-        for (int i = 0; st.hasMoreTokens(); i++) {
+        for (int i = 0; st.hasMoreTokens(); i++)
+        {
             String token = st.nextToken();
 
-            if (token.indexOf(".") < 0) {
+            if (token.indexOf(".") < 0)
+            {
                 namesList.add(token);
             }
         }
 
         return namesList;
     }
-    
-    protected ArrayList getSubObjects(String job) {
+
+    protected ArrayList getSubObjects(String job)
+    {
         ArrayList namesList = new ArrayList();
         StringTokenizer st = new StringTokenizer(job, ",");
 
-        for (int i = 0; st.hasMoreTokens(); i++) {
+        for (int i = 0; st.hasMoreTokens(); i++)
+        {
             namesList.add(st.nextToken());
         }
 
         return namesList;
     }